Disable build symbol check by default (#624) #1558
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [push, pull_request] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| buildlibc: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| env: ${{ matrix.env || fromJSON('{}') }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Test a number of operating systems and architectures to make sure | |
| # wasi-libc builds on these platforms by default. | |
| - name: Build on Linux x86_64 | |
| os: ubuntu-24.04 | |
| clang_version: 19 | |
| upload: linux-x86_64-clang-19 | |
| - name: Build on Linux aarch64 | |
| os: ubuntu-24.04-arm | |
| clang_version: 19 | |
| upload: linux-aarch64-clang-19 | |
| - name: Build on macOS aarch64 | |
| os: macos-15 | |
| clang_version: 15.0.7 | |
| llvm_asset_suffix: arm64-apple-darwin22.0 | |
| upload: macos-clang-15 | |
| - name: Build on Windows x86_64 | |
| os: windows-2025 | |
| clang_version: 20.1.8 | |
| upload: windows-clang-20 | |
| # Other versions of LLVM | |
| - name: Build with LLVM 11 | |
| os: ubuntu-22.04 | |
| clang_version: 11 | |
| upload: linux-x86_64-clang-11 | |
| env: | |
| BUILD_LIBSETJMP: no | |
| - name: Build with LLVM 18 | |
| os: ubuntu-24.04 | |
| clang_version: 18 | |
| upload: linux-x86_64-clang-18 | |
| env: | |
| MAKE_TARGETS: "default libc_so" | |
| # Test various combinations of target triples. | |
| # | |
| # Configuration here can happen through `env` which is inherited to | |
| # jobs below. For now this only runs tests on Linux with Clang 16, | |
| # but that can be expanded as necessary in the future too. Note that | |
| # some targets run the build for the `libc_so` makefile target to | |
| # ensure the PIC build works. | |
| - name: Test wasm32-wasi | |
| os: ubuntu-24.04 | |
| clang_version: 19 | |
| test: true | |
| upload: wasm32-wasi | |
| env: | |
| TARGET_TRIPLE: wasm32-wasi | |
| MAKE_TARGETS: "default libc_so" | |
| - name: Test wasm32-wasip1 | |
| os: ubuntu-24.04 | |
| clang_version: 19 | |
| test: true | |
| upload: wasm32-wasip1 | |
| env: | |
| TARGET_TRIPLE: wasm32-wasip1 | |
| MAKE_TARGETS: "default libc_so" | |
| - name: Test wasm32-wasip2 | |
| os: ubuntu-24.04 | |
| clang_version: 19 | |
| test: true | |
| upload: wasm32-wasip2 | |
| env: | |
| TARGET_TRIPLE: wasm32-wasip2 | |
| WASI_SNAPSHOT: p2 | |
| MAKE_TARGETS: "default libc_so" | |
| - name: Test wasm32-wasi-threads | |
| os: ubuntu-24.04 | |
| clang_version: 19 | |
| test: true | |
| upload: wasm32-wasi-threads | |
| env: | |
| TARGET_TRIPLE: wasm32-wasi-threads | |
| THREAD_MODEL: posix | |
| - name: Test wasm32-wasip1-threads | |
| os: ubuntu-24.04 | |
| clang_version: 19 | |
| test: true | |
| upload: wasm32-wasip1-threads | |
| env: | |
| TARGET_TRIPLE: wasm32-wasip1-threads | |
| THREAD_MODEL: posix | |
| - name: Test wasm32-wasip1 in V8 | |
| os: ubuntu-24.04 | |
| clang_version: 19 | |
| test: true | |
| test_with_v8: true | |
| env: | |
| TARGET_TRIPLE: wasm32-wasip1 | |
| - name: Test wasm32-wasip1-threads in V8 | |
| os: ubuntu-24.04 | |
| clang_version: 19 | |
| test: true | |
| test_with_v8: true | |
| env: | |
| TARGET_TRIPLE: wasm32-wasip1-threads | |
| THREAD_MODEL: posix | |
| - name: Test wasm32-wasi-simd | |
| os: ubuntu-24.04 | |
| clang_version: 19 | |
| test: true | |
| upload: wasm32-wasi-simd | |
| env: | |
| MAKE_TARGETS: "no-check-symbols" | |
| EXTRA_CFLAGS: "-O2 -DNDEBUG -msimd128 -mrelaxed-simd -mbulk-memory -D__wasilibc_simd_string" | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| submodules: true | |
| - uses: ./.github/actions/setup | |
| with: | |
| clang_version: ${{ matrix.clang_version }} | |
| llvm_asset_suffix: ${{ matrix.llvm_asset_suffix }} | |
| - name: Build libc | |
| run: make -j4 $MAKE_TARGETS CHECK_SYMBOLS=yes | |
| - name: Download Test dependencies | |
| if: matrix.test | |
| run: cd test && make download | |
| - name: Install V8 dependencies | |
| if: matrix.test_with_v8 | |
| run: | | |
| npm -C test/scripts/browser-test install | |
| npx -C test/scripts/browser-test playwright install chromium-headless-shell | |
| echo ENGINE="$PWD/test/scripts/browser-test/harness.mjs" >> $GITHUB_ENV | |
| - name: Test | |
| if: matrix.test | |
| run: make -C test test | |
| - uses: actions/[email protected] | |
| if: matrix.upload | |
| with: | |
| name: ${{ format( 'sysroot-{0}.tgz', matrix.upload) }} | |
| path: sysroot | |
| # Disable the headerstest job for now, while WASI transitions from the | |
| # witx snapshots to wit proposals, and we have a few manual edits to the | |
| # generated header to make life easier for folks. | |
| headerstest: | |
| if: ${{ false }} # Disable the headers test for now. | |
| name: wasi-headers test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-15, windows-2025] | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| submodules: true | |
| - name: Install Rust (rustup) | |
| run: rustup update stable --no-self-update && rustup default stable | |
| if: matrix.os != 'macos-15' | |
| - name: Install Rust (macos) | |
| run: | | |
| curl https://sh.rustup.rs | sh -s -- -y | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| if: matrix.os == 'macos-15' | |
| - run: cargo fetch | |
| working-directory: tools/wasi-headers | |
| - run: cargo build | |
| working-directory: tools/wasi-headers | |
| - run: cargo test | |
| working-directory: tools/wasi-headers | |
| rustfmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| submodules: true | |
| - name: Install Rust | |
| run: rustup update stable && rustup default stable && rustup component add rustfmt | |
| - run: cargo fmt -- --check | |
| working-directory: tools/wasi-headers |