Skip to content

Commit 0cc737c

Browse files
Merge pull request #1 from Blosc/wasm32
Wasm32 support
2 parents 20a9b2a + 3d84fbb commit 0cc737c

33 files changed

Lines changed: 4391 additions & 14 deletions

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: build and test
22

33
on:
4-
push:
5-
branches: [ mob ]
4+
workflow_dispatch:
65

76
jobs:
87
test-x86_64-linux:

.github/workflows/cmake-ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CMake Build and Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-and-test:
10+
name: build+test (${{ matrix.os }})
11+
runs-on: ${{ matrix.os }}
12+
timeout-minutes: 20
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os:
17+
- ubuntu-latest
18+
- macos-latest
19+
- windows-latest
20+
env:
21+
BUILD_CONFIG: Release
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Configure (Windows, clang-cl)
26+
if: runner.os == 'Windows'
27+
run: cmake -S . -B build -T ClangCL -DCMAKE_BUILD_TYPE=${{ env.BUILD_CONFIG }} -DMINICC_BUILD_SHARED_LIBTCC=ON -DMINICC_BUILD_WASM32_TCC=OFF -DMINICC_ENABLE_TESTING=ON
28+
29+
- name: Configure
30+
if: runner.os != 'Windows'
31+
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_CONFIG }} -DMINICC_BUILD_SHARED_LIBTCC=ON -DMINICC_BUILD_WASM32_TCC=OFF -DMINICC_ENABLE_TESTING=ON
32+
33+
- name: Build
34+
run: cmake --build build --config ${{ env.BUILD_CONFIG }} --parallel
35+
36+
- name: Run tests
37+
run: ctest --test-dir build -C ${{ env.BUILD_CONFIG }} --output-on-failure
38+
39+
wasm-backend:
40+
name: wasm backend (ubuntu-latest)
41+
runs-on: ubuntu-latest
42+
timeout-minutes: 20
43+
env:
44+
BUILD_CONFIG: Release
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- uses: actions/setup-node@v4
49+
with:
50+
node-version: "20"
51+
52+
- name: Configure (wasm enabled)
53+
run: cmake -S . -B build-wasm -DCMAKE_BUILD_TYPE=${{ env.BUILD_CONFIG }} -DMINICC_BUILD_SHARED_LIBTCC=ON -DMINICC_BUILD_WASM32_TCC=ON -DMINICC_ENABLE_TESTING=ON
54+
55+
- name: Build (wasm enabled)
56+
run: cmake --build build-wasm --config ${{ env.BUILD_CONFIG }} --parallel
57+
58+
- name: Verify wasm tests are discovered
59+
run: |
60+
ctest --test-dir build-wasm -N
61+
ctest --test-dir build-wasm -N | grep -q "minicc.wasm."
62+
63+
- name: Run wasm backend tests
64+
run: ctest --test-dir build-wasm -C ${{ env.BUILD_CONFIG }} -R "^minicc\\.wasm\\." --output-on-failure

0 commit comments

Comments
 (0)