Repository navigation
170 lines (140 loc) · 5.28 KB
/
Copy pathnode-addon-system.yml
File metadata and controls
170 lines (140 loc) · 5.28 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# CI for the node-addon-system packages under native/system. A separate
# workflow from ci.yml keeps the native OS/architecture matrix independent of
# the harness Node matrix. Each platform job builds once and tests those bytes
# under every supported Node release. Release assembly and publication use the
# companion Node Addon System Release workflow.
name: Node Addon System
on:
pull_request:
paths:
- '.github/workflows/node-addon-system.yml'
- '.github/workflows/node-addon-system-release.yml'
- 'native/system/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
push:
branches: [master]
paths:
- '.github/workflows/node-addon-system.yml'
- '.github/workflows/node-addon-system-release.yml'
- 'native/system/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
# CI runs must never report to the production telemetry endpoint baked
# into apps/cli/cordis.yml (AppCLIEntry disables the row when set).
DSH_TELEMETRY_DISABLED: '1'
defaults:
run:
working-directory: native/system
jobs:
matrix:
name: Matrix
runs-on: ubuntu-24.04
outputs:
ci: ${{ steps.matrix.outputs.ci }}
steps:
- uses: actions/checkout@v7.0.1
- id: matrix
run: echo "ci=$(node ./scripts/github-matrix.mjs ci)" >> "$GITHUB_OUTPUT"
native:
name: ${{ matrix.platform }}
needs: matrix
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.ci) }}
steps:
- uses: actions/checkout@v7.0.1
# pnpm v11 ships no darwin-x64 standalone binary, and the pnpm/action-setup
# v6 self-update path needs one; this job stays on the v5 npm-install line.
- uses: pnpm/action-setup@v5.0.0
with:
package_json_file: package.json
- uses: actions/setup-node@v7.0.0
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --filter @deepseek-ai/node-addon-system-workspace... --frozen-lockfile
- name: Install musl toolchain
if: runner.os == 'Linux'
run: |
sudo apt-get update -q
sudo apt-get install -yq musl-tools
- name: Build TypeScript
run: pnpm build:ts
- name: Typecheck
run: pnpm typecheck
- name: Build native binaries (this architecture is the builder of record)
run: pnpm build:native
- name: Entry tests (keyless)
run: node ./test/entry.test.js
# NALR_REQUIRE_LANDLOCK: a self-skip on the very platform that exists to
# prove enforcement would be a false green, so an unenforcing kernel
# fails the leg instead of skipping.
- name: Launcher tests (real kernel enforcement)
if: runner.os == 'Linux'
run: node ./test/launcher.test.js
env:
NALR_REQUIRE_LANDLOCK: 1
- name: Pack rehearsal (pack → install → confine, this platform only)
run: |
node ./scripts/pack-release.mjs .release/npm --current-platform-only
node ./scripts/verify-packed-install.mjs .release/npm --current-platform-only
env:
NALR_REQUIRE_LANDLOCK: ${{ runner.os == 'Linux' && '1' || '0' }}
- name: Verify platform payload rules (Node 24)
run: pnpm test:packaging
- name: Flock behavior (Node 24, built addon)
run: |
pnpm build:test-oracle
pnpm test:flock
- name: Test the same musl addon on Node 24 without a compiler
if: runner.os == 'Linux'
run: >-
docker run --rm -v "$PWD:$PWD" -w "$PWD"
node:24-alpine
node --test ./test/flock.test.js ./test/package-matrix.test.js
- uses: actions/setup-node@v7.0.0
with:
node-version: 20
- name: Test the same binaries on Node 20
run: node --test ./test/flock.test.js ./test/package-matrix.test.js
- name: Test the same musl addon on Node 20 without a compiler
if: runner.os == 'Linux'
run: >-
docker run --rm -v "$PWD:$PWD" -w "$PWD"
node:20-alpine
node --test ./test/flock.test.js ./test/package-matrix.test.js
- uses: actions/setup-node@v7.0.0
with:
node-version: 22
- name: Test the same binaries on Node 22
run: node --test ./test/flock.test.js ./test/package-matrix.test.js
- name: Test the same musl addon on Node 22 without a compiler
if: runner.os == 'Linux'
run: >-
docker run --rm -v "$PWD:$PWD" -w "$PWD"
node:22-alpine
node --test ./test/flock.test.js ./test/package-matrix.test.js
- uses: actions/setup-node@v7.0.0
with:
node-version: 26
- name: Test the same binaries on Node 26
run: node --test ./test/flock.test.js ./test/package-matrix.test.js
- name: Test the same musl addon on Node 26 without a compiler
if: runner.os == 'Linux'
run: >-
docker run --rm -v "$PWD:$PWD" -w "$PWD"
node:26-alpine
node --test ./test/flock.test.js ./test/package-matrix.test.js