fix: drop win32 V8 target, use macos-latest for darwin-x64 #132
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: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| typecheck-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # --- Rust / WASM build --- | |
| - name: Set up Rust toolchain | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| toolchain: nightly-2026-03-01 | |
| targets: wasm32-wasip1 | |
| components: rust-src | |
| - name: Install wasm-opt (binaryen) | |
| run: sudo apt-get update && sudo apt-get install -y binaryen | |
| - name: Cache WASM build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| native/wasmvm/target | |
| native/wasmvm/vendor | |
| key: wasm-${{ runner.os }}-${{ hashFiles('native/wasmvm/Cargo.lock', 'native/wasmvm/rust-toolchain.toml') }} | |
| - name: Build WASM binary | |
| run: cd native/wasmvm && make wasm | |
| # --- C toolchain (wasi-sdk + patched sysroot + C test fixtures) --- | |
| - name: Cache wasi-sdk | |
| id: cache-wasi-sdk | |
| uses: actions/cache@v4 | |
| with: | |
| path: native/wasmvm/c/vendor/wasi-sdk | |
| key: wasi-sdk-25-${{ runner.os }}-${{ runner.arch }} | |
| - name: Download wasi-sdk | |
| if: steps.cache-wasi-sdk.outputs.cache-hit != 'true' | |
| run: make -C native/wasmvm/c wasi-sdk | |
| - name: Cache patched wasi-libc sysroot | |
| id: cache-sysroot | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| native/wasmvm/c/sysroot | |
| native/wasmvm/c/vendor/wasi-libc | |
| key: wasi-libc-sysroot-${{ runner.os }}-${{ hashFiles('native/wasmvm/patches/wasi-libc/*.patch', 'native/wasmvm/scripts/patch-wasi-libc.sh') }} | |
| - name: Build patched wasi-libc sysroot | |
| if: steps.cache-sysroot.outputs.cache-hit != 'true' | |
| run: make -C native/wasmvm/c sysroot | |
| - name: Build C test fixtures (WASM + native) | |
| run: make -C native/wasmvm/c programs native | |
| # --- Node.js / TypeScript --- | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 8.15.6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Type check | |
| run: pnpm check-types | |
| - name: Run tests | |
| run: pnpm test |