Skip to content

Commit 9bcee34

Browse files
committed
Prepare WebAudio release coverage
1 parent 186b086 commit 9bcee34

5 files changed

Lines changed: 1538 additions & 820 deletions

File tree

.github/workflows/build.yml

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
name: Build Binaries
2+
3+
permissions:
4+
contents: write
5+
id-token: write
6+
attestations: write
7+
28
defaults:
39
run:
410
shell: bash
@@ -15,12 +21,10 @@ jobs:
1521
create_release:
1622
name: Create Release
1723
runs-on: ubuntu-latest
18-
1924
outputs:
2025
upload_url: ${{ steps.create_release.outputs.upload_url }}
2126

2227
steps:
23-
2428
- name: Fetch Repository
2529
uses: actions/checkout@v7
2630
with:
@@ -51,15 +55,46 @@ jobs:
5155
name: Release ${{ steps.package-version.outputs.version }}
5256

5357
build:
54-
name: Build
58+
name: Build ${{ matrix.target }}
59+
needs: create_release
5560
strategy:
56-
matrix:
57-
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2022, macos-26]
61+
fail-fast: false
62+
matrix:
63+
include:
64+
- target: windows-x64
65+
os: windows-2022
66+
node_arch: x64
67+
archflags: ''
68+
vs_prerelease: false
69+
- target: windows-arm64
70+
os: windows-11-vs2026-arm
71+
node_arch: arm64
72+
archflags: ''
73+
vs_prerelease: true
74+
- target: linux-x64
75+
os: ubuntu-22.04
76+
node_arch: x64
77+
archflags: ''
78+
vs_prerelease: false
79+
- target: linux-arm64
80+
os: ubuntu-22.04-arm
81+
node_arch: arm64
82+
archflags: ''
83+
vs_prerelease: false
84+
- target: darwin-x64
85+
os: macos-26
86+
node_arch: x64
87+
archflags: '-arch x86_64'
88+
vs_prerelease: false
89+
- target: darwin-arm64
90+
os: macos-26
91+
node_arch: arm64
92+
archflags: '-arch arm64'
93+
vs_prerelease: false
5894

5995
runs-on: ${{ matrix.os }}
6096

6197
steps:
62-
6398
- name: Fetch Repository
6499
uses: actions/checkout@v7
65100
with:
@@ -69,12 +104,22 @@ jobs:
69104
uses: actions/setup-node@v6
70105
with:
71106
node-version: 24.13.0
107+
architecture: ${{ matrix.node_arch }}
72108
cache: 'npm'
73109

110+
- name: Configure MSBuild
111+
if: startsWith(matrix.target, 'windows-')
112+
uses: microsoft/setup-msbuild@v3
113+
with:
114+
msbuild-architecture: ${{ matrix.node_arch }}
115+
vs-prerelease: ${{ matrix.vs_prerelease || false }}
116+
74117
- name: Install Modules
75118
run: npm ci
76119

77120
- name: Build Current Binary
121+
env:
122+
ARCHFLAGS: ${{ matrix.archflags }}
78123
run: npm run build:rebuild
79124

80125
- name: Get Package Version
@@ -88,7 +133,12 @@ jobs:
88133
89134
- name: Pack Files
90135
id: pack-files
91-
run: node -e "import('@node-3d/addon-tools').then((m) => m.actionPack())" >> $GITHUB_OUTPUT
136+
run: node -e "import('@node-3d/addon-tools').then((m) => m.actionPack())" >> "$GITHUB_OUTPUT"
137+
138+
- name: Attest Binary Archive
139+
uses: actions/attest@v4
140+
with:
141+
subject-path: ${{ steps.pack-files.outputs.pack }}
92142

93143
- name: Store Binaries
94144
uses: softprops/action-gh-release@v3

.github/workflows/cpplint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
jobs:
1515
cpplint:
1616
name: Cpplint
17-
runs-on: ubuntu-22.04
17+
runs-on: ubuntu-latest
1818

1919
steps:
2020

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
jobs:
1515
lint:
1616
name: Lint
17-
runs-on: ubuntu-22.04
17+
runs-on: ubuntu-latest
1818

1919
steps:
2020

.github/workflows/test.yml

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Test
2+
23
defaults:
34
run:
45
shell: bash
@@ -13,15 +14,51 @@ on:
1314

1415
jobs:
1516
unit-tests:
16-
name: Unit Tests
17+
name: Native Build and Audio Tests (${{ matrix.target }})
1718
strategy:
18-
matrix:
19-
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2022, macos-26]
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- target: windows-x64
23+
os: windows-2022
24+
node_arch: x64
25+
archflags: ''
26+
audio_runtime: true
27+
vs_prerelease: false
28+
- target: windows-arm64
29+
os: windows-11-vs2026-arm
30+
node_arch: arm64
31+
archflags: ''
32+
audio_runtime: false
33+
vs_prerelease: true
34+
- target: linux-x64
35+
os: ubuntu-22.04
36+
node_arch: x64
37+
archflags: ''
38+
audio_runtime: true
39+
vs_prerelease: false
40+
- target: linux-arm64
41+
os: ubuntu-22.04-arm
42+
node_arch: arm64
43+
archflags: ''
44+
audio_runtime: true
45+
vs_prerelease: false
46+
- target: darwin-x64
47+
os: macos-26
48+
node_arch: x64
49+
archflags: '-arch x86_64'
50+
audio_runtime: true
51+
vs_prerelease: false
52+
- target: darwin-arm64
53+
os: macos-26
54+
node_arch: arm64
55+
archflags: '-arch arm64'
56+
audio_runtime: true
57+
vs_prerelease: false
2058

2159
runs-on: ${{ matrix.os }}
2260

2361
steps:
24-
2562
- name: Fetch Repository
2663
uses: actions/checkout@v7
2764
with:
@@ -31,20 +68,30 @@ jobs:
3168
uses: actions/setup-node@v6
3269
with:
3370
node-version: 24.13.0
71+
architecture: ${{ matrix.node_arch }}
3472
cache: 'npm'
3573

74+
- name: Configure MSBuild
75+
if: startsWith(matrix.target, 'windows-')
76+
uses: microsoft/setup-msbuild@v3
77+
with:
78+
msbuild-architecture: ${{ matrix.node_arch }}
79+
vs-prerelease: ${{ matrix.vs_prerelease || false }}
80+
3681
- name: Install Modules
3782
run: npm ci
3883

3984
- name: Build Current Binary
85+
env:
86+
ARCHFLAGS: ${{ matrix.archflags }}
4087
run: npm run build:rebuild
4188

4289
- name: Audio Device - Unix
43-
if: matrix.os != 'windows-2022'
90+
if: matrix.audio_runtime && !startsWith(matrix.target, 'windows-')
4491
uses: LABSN/sound-ci-helpers@v1
4592

4693
- name: Audio Device - Windows
47-
if: matrix.os == 'windows-2022'
94+
if: matrix.audio_runtime && startsWith(matrix.target, 'windows-')
4895
shell: powershell
4996
run: |
5097
Start-Service audio*
@@ -59,4 +106,5 @@ jobs:
59106
C:\Scream\Install\helpers\devcon install Scream.inf *Scream
60107
61108
- name: Run Unit Tests
109+
if: matrix.audio_runtime
62110
run: npm run test:ci

0 commit comments

Comments
 (0)