-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (50 loc) · 1.81 KB
/
Copy pathci.yml
File metadata and controls
64 lines (50 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: npm
- name: Cache HDF5 / zlib sources and WASM build trees
uses: actions/cache@v4
with:
path: |
.cache/sources
.cache/build-wasm
key: hdf5-wasm-official-${{ hashFiles('scripts/hdf5-source-pin.env', 'scripts/fetch-hdf5-source.sh', 'scripts/docker-emcc-full.sh', 'scripts/build-full-wasm-docker.sh', 'scripts/patches/hdf5-1.14.6-H5Tinit_float-fe-invalid.patch', 'scripts/wasm-node-smoke.mjs') }}
restore-keys: |
hdf5-wasm-official-
- name: Install dependencies
run: npm ci
- name: Build production WASM (Docker + Emscripten)
run: bash scripts/build-full-wasm-docker.sh
# Docker runs as root; bind-mounted dist/ (and parts of .cache/) become root-owned → tsc cannot emit into dist/.
- name: Restore workspace ownership after Docker
run: sudo chown -R "$(id -u):$(id -g)" "$GITHUB_WORKSPACE"
- name: TypeScript build
run: npm run build
# Does not rebuild WASM: loads dist/wasm from the step above and opens real HDF5 fixtures (see scripts/wasm-node-smoke.mjs).
- name: Validate WASM in Node (real fixtures)
run: npm run smoke:wasm
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Upload WASM artifact
uses: actions/upload-artifact@v4
with:
name: ioai-hdf5-wasm
path: dist/wasm/