Skip to content

Commit f801972

Browse files
committed
Consolidate Android build into Linux matrix job
Merge the separate build-android job into build-linux by adding aarch64_linux_android to the target matrix. This simplifies the workflow and reduces duplication. Also refactor build-macos to use a matrix pattern for consistency and future extensibility. Remove max-parallel limit from build-linux to allow faster CI runs.
1 parent 816e827 commit f801972

1 file changed

Lines changed: 7 additions & 39 deletions

File tree

.github/workflows/nix.yml

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ jobs:
4343
needs: check
4444
strategy:
4545
fail-fast: false
46-
max-parallel: 3
4746
matrix:
4847
target:
4948
- x86_64_unknown_linux_gnu
5049
- aarch64_unknown_linux_gnu
5150
- x86_64_unknown_linux_musl
5251
- aarch64_unknown_linux_musl
52+
- aarch64_linux_android
5353
include:
5454
# x86_64 glibc uses 'default' - the native build on ubuntu runners
5555
- target: x86_64_unknown_linux_gnu
@@ -78,47 +78,16 @@ jobs:
7878
path: result/lib/*.node
7979
if-no-files-found: error
8080

81-
build-android:
81+
build-macos:
8282
name: Build - ${{ matrix.target }}
83-
runs-on: ubuntu-latest
83+
runs-on: ${{ matrix.runner }}
8484
needs: check
8585
strategy:
8686
fail-fast: false
8787
matrix:
88-
target:
89-
- aarch64_linux_android
90-
steps:
91-
- uses: actions/checkout@v4
92-
93-
- name: Install Nix
94-
uses: DeterminateSystems/nix-installer-action@main
95-
with:
96-
extra-conf: |
97-
extra-substituters = https://cache.nixos.org
98-
extra-trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
99-
100-
- name: Enable Nix cache
101-
uses: DeterminateSystems/magic-nix-cache-action@main
102-
103-
- name: Build ${{ matrix.target }}
104-
run: nix build .#${{ matrix.target }} --print-out-paths
105-
106-
- name: List output
107-
run: |
108-
ls -la result/lib/
109-
file result/lib/*.node
110-
111-
- name: Upload artifact
112-
uses: actions/upload-artifact@v4
113-
with:
114-
name: bindings-${{ matrix.target }}
115-
path: result/lib/*.node
116-
if-no-files-found: error
117-
118-
build-macos:
119-
name: Build - macOS arm64
120-
runs-on: macos-latest
121-
needs: check
88+
include:
89+
- target: darwin-arm64
90+
runner: macos-latest
12291
steps:
12392
- uses: actions/checkout@v4
12493

@@ -139,7 +108,7 @@ jobs:
139108
- name: Upload artifact
140109
uses: actions/upload-artifact@v4
141110
with:
142-
name: bindings-darwin-arm64
111+
name: bindings-${{ matrix.target }}
143112
path: result/lib/*.node
144113
if-no-files-found: error
145114

@@ -151,7 +120,6 @@ jobs:
151120
needs:
152121
- check
153122
- build-linux
154-
- build-android
155123
- build-macos
156124
steps:
157125
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)