Skip to content

Commit d0e2be9

Browse files
authored
Skip f32.wast etc. on linux due to Alpine-x86_64 issue + add CI testing (#8558)
This was noticed during creating the 129 release: #8557 (comment) Add an alpine build to CI for x86_64, mirroring our release builds, so we do not lack coverage (which led to the issue only showing on release, not CI). Also make the alpine CI build identical to alpine release (copied from `create_release`).
1 parent 2ff34a2 commit d0e2be9

File tree

3 files changed

+31
-6
lines changed

3 files changed

+31
-6
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,19 +219,30 @@ jobs:
219219
- name: test
220220
run: python check.py --binaryen-bin=out/bin
221221

222-
# Build with gcc 6.3 and run tests on Alpine Linux (inside chroot).
222+
# Run tests on Alpine Linux, which we use to make our release builds.
223223
# Note: Alpine uses musl libc.
224-
# Keep in sync with build_release.yml
224+
# Keep in sync with build_release.yml. The only difference is that here we
225+
# do not have the "archive" and "upload tarball" jobs.
225226
build-alpine:
226227
name: alpine
227-
runs-on: ubuntu-24.04-arm
228+
runs-on: ${{ matrix.os }}
229+
strategy:
230+
matrix:
231+
os: [ubuntu-latest, ubuntu-24.04-arm]
228232
steps:
233+
- uses: actions/setup-python@v5
234+
with:
235+
python-version: '3.x'
229236
- uses: actions/checkout@v4
230237
with:
231238
submodules: true
239+
232240
- name: start docker
233241
run: |
234-
docker run -w /src -dit --platform=linux/arm64 --name alpine -v $PWD:/src node:lts-alpine
242+
if [[ "${{ matrix.docker_platform }}" == "ubuntu-24.04-arm" ]]; then
243+
platform="--platform=linux/arm64"
244+
fi
245+
docker run -w /src -dit $platform --name alpine -v $PWD:/src node:lts-alpine
235246
echo 'docker exec alpine "$@";' > ./alpine.sh
236247
chmod +x ./alpine.sh
237248
@@ -249,7 +260,7 @@ jobs:
249260

250261
- name: cmake
251262
run: |
252-
./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
263+
./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
253264
254265
- name: build
255266
run: |

scripts/test/shared.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,15 @@ def get_tests(test_dir, extensions=[], recursive=False):
443443
'token.wast', # Lexer should require spaces between strings and non-paren tokens
444444
]
445445

446+
if get_platform() == 'linux':
447+
SPEC_TESTSUITE_TESTS_TO_SKIP += [
448+
# Errors on Linux x86_64 with musl, https://github.com/WebAssembly/binaryen/pull/8557
449+
'f32.wast',
450+
'f64.wast',
451+
'simd_f32x4_rounding.wast',
452+
'simd_f64x2_rounding.wast',
453+
]
454+
446455

447456
def _can_run_spec_test(test):
448457
test = Path(test)

scripts/test/wasm2js.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,15 @@ def check_for_stale_files():
4242
all_tests = basic_tests + spec_tests + wasm2js_tests
4343
all_tests = [os.path.basename(os.path.splitext(t)[0]) for t in all_tests]
4444

45+
assert_test_prefixes = [t.split('.')[0] for t in assert_tests]
46+
skipped_test_prefixes = [t.split('.')[0] for t in shared.SPEC_TESTSUITE_TESTS_TO_SKIP]
47+
4548
all_files = os.listdir(shared.get_test_dir('wasm2js'))
4649
for f in all_files:
4750
prefix = f.split('.')[0]
48-
if prefix in [t.split('.')[0] for t in assert_tests]:
51+
if prefix in assert_test_prefixes:
52+
continue
53+
if prefix in skipped_test_prefixes:
4954
continue
5055
if prefix not in all_tests:
5156
shared.fail_with_error(f'orphan test output: {f}')

0 commit comments

Comments
 (0)