/ proof-of-concept / math-webgpu-sandbox
Sign in
proof-of-concept / math-webgpu-sandbox
math-webgpu-sandbox / .github / workflows / ci.yml
42 lines · 1.6 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 — those need no build — and the CPU
19 # comparison imports `numbl/browser`, whose dist-browser/ is NOT
20 # committed, so it is built here. Pinned so a change to the internals
21 # cannot silently break this repo — the surface we rely on is written
22 # down in src/mgpu/numbl.d.ts.
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 both times: npm would run numbl's `prepare` (husky).
31 - name: Build numbl/browser (dist-browser)
32 run: |
33 cd "$GITHUB_WORKSPACE/../../numbl"
34 npm ci --ignore-scripts
35 npm run build:browser
36 - run: npm ci --ignore-scripts
37 # The suite compiles MATLAB to compute shaders, so it needs a GPU; the
38 # browser run below falls back to SwiftShader when there is none.
39 - run: npm run test:node -- --skip-without-gpu
40 - run: npm run test:gpu
41 env:
42 CHROME_PATH: /usr/bin/google-chrome
↑↓ move↵openescclose