Repository navigation
105 lines (90 loc) · 3.34 KB
/
Copy pathwindows.yml
File metadata and controls
105 lines (90 loc) · 3.34 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
name: Windows
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
native:
name: Windows ${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- arch: x64
runner: windows-latest
dist_script: dist:win:x64
- arch: arm64
runner: windows-11-arm
dist_script: dist:win:arm64
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Validate source installer guardrails
shell: powershell
run: |
$path = (Resolve-Path "install.ps1").Path
& .\scripts\install-windows.test.ps1 -InstallerPath $path
$beforeErrorPreference = $ErrorActionPreference
$beforeProgressPreference = $ProgressPreference
$env:SKILL_RECORDER_COMMIT = "main"
try {
& .\install.ps1
throw "install.ps1 accepted a mutable source reference"
} catch {
if ($_.Exception.Message -notmatch "full 40-character") {
throw
}
} finally {
Remove-Item Env:SKILL_RECORDER_COMMIT -ErrorAction SilentlyContinue
}
if (
$ErrorActionPreference -ne $beforeErrorPreference -or
$ProgressPreference -ne $beforeProgressPreference
) {
throw "install.ps1 leaked preference changes into the caller"
}
- name: Test commit-pinned source installation
shell: powershell
env:
SKILL_RECORDER_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
SKILL_RECORDER_INSTALL_ROOT: ${{ runner.temp }}\skill-recorder-source
SKILL_RECORDER_NO_LAUNCH: "1"
run: .\install.ps1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 24.19.0
architecture: ${{ matrix.arch }}
cache: npm
- name: Validate lockfile portability
run: npm run check:lockfile
- name: Cache compliance source downloads
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: .compliance-cache
key: compliance-windows-${{ matrix.arch }}-${{ hashFiles('third_party/compliance-policy.json') }}
restore-keys: compliance-windows-${{ matrix.arch }}-
- name: Install native dependencies
shell: pwsh
run: |
if ((node -p "process.arch") -ne "${{ matrix.arch }}") {
throw "Expected Node ${{ matrix.arch }}"
}
npm ci --ignore-scripts=false --dangerously-allow-all-scripts=false --strict-allow-scripts
node -e "require('sharp'); require('onnxruntime-node'); require('koffi')"
if (Select-String -Path package-lock.json -Pattern 'ffmpeg-static' -Quiet) {
throw "ffmpeg-static remains in the lockfile"
}
- name: Generate license inventory
run: npm run compliance:licenses
- name: Run tests
run: npm test
- name: Build
run: npm run build
- name: Package native installer
run: npm run ${{ matrix.dist_script }}
- name: Verify packaged architecture
run: node scripts/verify-windows-package.mjs ${{ matrix.arch }}