/ concept-collection / math-webgpu-sandbox
Sign in
concept-collection / math-webgpu-sandbox
math-webgpu-sandbox / .github / workflows / ci.yml
38 lines · 1.5 KBBlameHistoryRaw
1name: ci
2on:
3 push:
4 branches: [main]
5 pull_request:
7jobs:
8 test:
9 runs-on: ubuntu-latest
10 steps:
11 - uses: actions/checkout@v4
12 - uses: actions/setup-node@v4
13 with:
14 node-version: 24
15 cache: npm
16 # numbl is a `file:../../numbl` dependency: the GPU compiler reaches its
17 # JIT internals (parser, lowerer, IR, inline pass, builtin registry)
18 # through the `numbl-src` vite alias. Clone it where that relative path
19 # expects it. Pinned so a change to those internals cannot silently
20 # break this repo — the surface we rely on is written down in
21 # src/mgpu/numbl.d.ts. numbl's own dependencies are NOT needed: the
22 # slice we import is self-contained TypeScript.
23 - name: Check out numbl (sibling dependency)
24 env:
25 NUMBL_REF: 38ce14046d64d03ecf05cb57def53057a6bc64ab
26 run: |
27 git clone --filter=blob:none --no-checkout \
28 https://github.com/flatironinstitute/numbl.git "$GITHUB_WORKSPACE/../../numbl"
29 git -C "$GITHUB_WORKSPACE/../../numbl" checkout --quiet "$NUMBL_REF"
30 # --ignore-scripts: npm runs a linked package's `prepare` script, and
31 # numbl's is husky, which is not installed here.
32 - run: npm ci --ignore-scripts
33 # The suite compiles MATLAB to compute shaders, so it needs a GPU; the
34 # browser run below falls back to SwiftShader when there is none.
35 - run: npm run test:node -- --skip-without-gpu
36 - run: npm run test:gpu
37 env:
38 CHROME_PATH: /usr/bin/google-chrome
moveopenescclose