/ concept-collection / turing-surface
Sign in
concept-collection / turing-surface
47 lines · 2.1 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: we use its compiler internals
17 # (parser, lowerer, IR, inline pass) and its interpreter, which its
18 # published package `exports` do not expose. Clone it where that relative
19 # path expects it. Pinned so a change to those internals cannot silently
20 # break the build — the surface we rely on is written down in
21 # src/mgpu/numbl.d.ts.
22 #
23 # numbl's own dependencies are NOT needed: the slice we import is
24 # self-contained TypeScript, verified by building against a checkout with no
25 # node_modules. One file in it is generated rather than committed, though —
26 # the interpreter's stdlib bundle, which numbl gitignores — so a bare
27 # checkout is missing it and `executeCode.ts` fails to resolve it. Its
28 # generator only reads .m files off disk, so plain `node` (type-stripping,
29 # unflagged since 22.18) runs it without installing anything.
30 - name: Check out numbl (sibling dependency)
31 env:
32 NUMBL_REF: main
33 run: |
34 git clone --filter=blob:none --no-checkout \
35 https://github.com/flatironinstitute/numbl.git "$GITHUB_WORKSPACE/../../numbl"
36 git -C "$GITHUB_WORKSPACE/../../numbl" checkout --quiet "$NUMBL_REF"
37 node "$GITHUB_WORKSPACE/../../numbl/scripts/bundle-stdlib.ts"
38 # --ignore-scripts: npm runs a linked package's `prepare` script, and
39 # numbl's is husky, which is not installed here.
40 - run: npm ci --ignore-scripts
41 # The checks compile MATLAB to compute shaders, so they need a GPU; the
42 # browser suite below runs the same modules on SwiftShader if there is none.
43 - run: npm run test:node -- --skip-without-gpu
44 # headless Chrome + SwiftShader software WebGPU
45 - run: npm run test:gpu
46 env:
47 CHROME_PATH: /usr/bin/google-chrome
moveopenescclose