|
29 | 29 | runs-on: ubuntu-latest |
30 | 30 | steps: |
31 | 31 | - uses: actions/checkout@v6 |
| 32 | + - name: install system deps |
| 33 | + run: sudo apt install libasound2-dev libpulse-dev |
32 | 34 | - name: setup pnpm |
33 | 35 | uses: pnpm/action-setup@v4 |
34 | 36 | - name: Setup node |
@@ -64,22 +66,22 @@ jobs: |
64 | 66 | target: i686-pc-windows-msvc |
65 | 67 | - host: ubuntu-latest |
66 | 68 | target: x86_64-unknown-linux-gnu |
67 | | - build: pnpm build --target x86_64-unknown-linux-gnu --use-napi-cross |
| 69 | + build: pnpm build --target x86_64-unknown-linux-gnu |
68 | 70 | - host: ubuntu-latest |
69 | 71 | target: x86_64-unknown-linux-musl |
70 | | - build: pnpm build --target x86_64-unknown-linux-musl -x |
| 72 | + build: pnpm build --target x86_64-unknown-linux-musl --use-cross |
71 | 73 | - host: macos-latest |
72 | 74 | target: aarch64-apple-darwin |
73 | 75 | build: pnpm build --target aarch64-apple-darwin |
74 | | - - host: ubuntu-latest |
| 76 | + - host: ubuntu-24.04-arm |
75 | 77 | target: aarch64-unknown-linux-gnu |
76 | | - build: pnpm build --target aarch64-unknown-linux-gnu --use-napi-cross |
| 78 | + build: pnpm build --target aarch64-unknown-linux-gnu |
77 | 79 | - host: ubuntu-latest |
78 | 80 | target: armv7-unknown-linux-gnueabihf |
79 | | - build: pnpm build --target armv7-unknown-linux-gnueabihf --use-napi-cross |
80 | | - - host: ubuntu-latest |
81 | | - target: aarch64-unknown-linux-musl |
82 | | - build: pnpm build --target aarch64-unknown-linux-musl -x |
| 81 | + build: pnpm build --target armv7-unknown-linux-gnueabihf --use-cross |
| 82 | + # - host: ubuntu-latest |
| 83 | + # target: aarch64-unknown-linux-musl |
| 84 | + # build: pnpm build --target aarch64-unknown-linux-musl --use-cross |
83 | 85 | - host: windows-latest |
84 | 86 | target: aarch64-pc-windows-msvc |
85 | 87 | build: pnpm build --target aarch64-pc-windows-msvc |
@@ -110,20 +112,18 @@ jobs: |
110 | 112 | .cargo-cache |
111 | 113 | target/ |
112 | 114 | key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }} |
113 | | - - uses: mlugg/setup-zig@v2 |
114 | | - if: ${{ contains(matrix.settings.target, 'musl') }} |
115 | | - with: |
116 | | - version: 0.15.2 |
117 | | - - name: Install cargo-zigbuild |
| 115 | + - name: Install cross |
118 | 116 | uses: taiki-e/install-action@v2 |
119 | | - if: ${{ contains(matrix.settings.target, 'musl') }} |
| 117 | + if: ${{ contains(matrix.settings.build, '--use-cross') }} |
120 | 118 | env: |
121 | 119 | GITHUB_TOKEN: ${{ github.token }} |
122 | 120 | with: |
123 | | - tool: cargo-zigbuild |
124 | | - - name: Install libasound2-dev |
125 | | - run: sudo apt install libasound2-dev |
126 | | - if: ${{ contains(matrix.settings.target, 'linux') }} |
| 121 | + tool: cross |
| 122 | + - name: Install libasound / libpulse |
| 123 | + run: | |
| 124 | + sudo apt update |
| 125 | + sudo apt install libasound2-dev libpulse-dev |
| 126 | + if: ${{ matrix.settings.target == 'x86_64-unknown-linux-gnu' || matrix.settings.target == 'aarch64-unknown-linux-gnu' }} |
127 | 127 | - name: Setup toolchain |
128 | 128 | run: ${{ matrix.settings.setup }} |
129 | 129 | if: ${{ matrix.settings.setup }} |
@@ -208,9 +208,9 @@ jobs: |
208 | 208 | fail-fast: false |
209 | 209 | matrix: |
210 | 210 | settings: |
211 | | - - host: windows-latest |
212 | | - target: x86_64-pc-windows-msvc |
213 | | - architecture: x64 |
| 211 | + # - host: windows-latest |
| 212 | + # target: x86_64-pc-windows-msvc |
| 213 | + # architecture: x64 |
214 | 214 | - host: macos-latest |
215 | 215 | target: x86_64-apple-darwin |
216 | 216 | architecture: x64 |
@@ -244,85 +244,85 @@ jobs: |
244 | 244 | shell: bash |
245 | 245 | - name: Test bindings |
246 | 246 | run: pnpm test |
247 | | - test-linux-binding: |
248 | | - name: Test ${{ matrix.target }} - node@${{ matrix.node }} |
249 | | - needs: |
250 | | - - build |
251 | | - strategy: |
252 | | - fail-fast: false |
253 | | - matrix: |
254 | | - target: |
255 | | - - x86_64-unknown-linux-gnu |
256 | | - - x86_64-unknown-linux-musl |
257 | | - - aarch64-unknown-linux-gnu |
258 | | - - aarch64-unknown-linux-musl |
259 | | - - armv7-unknown-linux-gnueabihf |
260 | | - node: |
261 | | - - "20" |
262 | | - - "22" |
263 | | - - "24" |
264 | | - runs-on: ${{ contains(matrix.target, 'aarch64') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} |
265 | | - steps: |
266 | | - - uses: actions/checkout@v6 |
267 | | - - name: setup pnpm |
268 | | - uses: pnpm/action-setup@v4 |
269 | | - - name: Setup node |
270 | | - uses: actions/setup-node@v6 |
271 | | - with: |
272 | | - node-version: ${{ matrix.node }} |
273 | | - cache: pnpm |
274 | | - - name: Output docker params |
275 | | - id: docker |
276 | | - run: | |
277 | | - node -e " |
278 | | - if ('${{ matrix.target }}'.startsWith('aarch64')) { |
279 | | - console.log('PLATFORM=linux/arm64') |
280 | | - } else if ('${{ matrix.target }}'.startsWith('armv7')) { |
281 | | - console.log('PLATFORM=linux/arm/v7') |
282 | | - } else { |
283 | | - console.log('PLATFORM=linux/amd64') |
284 | | - } |
285 | | - " >> $GITHUB_OUTPUT |
286 | | - node -e " |
287 | | - if ('${{ matrix.target }}'.endsWith('-musl')) { |
288 | | - console.log('IMAGE=node:${{ matrix.node }}-alpine') |
289 | | - } else { |
290 | | - console.log('IMAGE=node:${{ matrix.node }}-slim') |
291 | | - } |
292 | | - " >> $GITHUB_OUTPUT |
293 | | - echo "PNPM_STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT |
294 | | - - name: Install dependencies |
295 | | - run: pnpm install --force |
296 | | - - name: Download artifacts |
297 | | - uses: actions/download-artifact@v8 |
298 | | - with: |
299 | | - name: bindings-${{ matrix.target }} |
300 | | - path: . |
301 | | - - name: List packages |
302 | | - run: ls -R . |
303 | | - shell: bash |
304 | | - - name: Set up QEMU |
305 | | - uses: docker/setup-qemu-action@v4 |
306 | | - if: ${{ contains(matrix.target, 'armv7') }} |
307 | | - with: |
308 | | - platforms: all |
309 | | - - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes |
310 | | - if: ${{ contains(matrix.target, 'armv7') }} |
311 | | - - name: Test bindings |
312 | | - uses: tj-actions/docker-run@v2 |
313 | | - with: |
314 | | - image: ${{ steps.docker.outputs.IMAGE }} |
315 | | - name: test-binding |
316 | | - options: "-v ${{ steps.docker.outputs.PNPM_STORE_PATH }}:${{ steps.docker.outputs.PNPM_STORE_PATH }} -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }} --platform ${{ steps.docker.outputs.PLATFORM }}" |
317 | | - args: npm run test |
| 247 | + # test-linux-binding: |
| 248 | + # name: Test ${{ matrix.target }} - node@${{ matrix.node }} |
| 249 | + # needs: |
| 250 | + # - build |
| 251 | + # strategy: |
| 252 | + # fail-fast: false |
| 253 | + # matrix: |
| 254 | + # target: |
| 255 | + # - x86_64-unknown-linux-gnu |
| 256 | + # - x86_64-unknown-linux-musl |
| 257 | + # - aarch64-unknown-linux-gnu |
| 258 | + # - aarch64-unknown-linux-musl |
| 259 | + # - armv7-unknown-linux-gnueabihf |
| 260 | + # node: |
| 261 | + # - "20" |
| 262 | + # - "22" |
| 263 | + # - "24" |
| 264 | + # runs-on: ${{ contains(matrix.target, 'aarch64') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} |
| 265 | + # steps: |
| 266 | + # - uses: actions/checkout@v6 |
| 267 | + # - name: setup pnpm |
| 268 | + # uses: pnpm/action-setup@v4 |
| 269 | + # - name: Setup node |
| 270 | + # uses: actions/setup-node@v6 |
| 271 | + # with: |
| 272 | + # node-version: ${{ matrix.node }} |
| 273 | + # cache: pnpm |
| 274 | + # - name: Output docker params |
| 275 | + # id: docker |
| 276 | + # run: | |
| 277 | + # node -e " |
| 278 | + # if ('${{ matrix.target }}'.startsWith('aarch64')) { |
| 279 | + # console.log('PLATFORM=linux/arm64') |
| 280 | + # } else if ('${{ matrix.target }}'.startsWith('armv7')) { |
| 281 | + # console.log('PLATFORM=linux/arm/v7') |
| 282 | + # } else { |
| 283 | + # console.log('PLATFORM=linux/amd64') |
| 284 | + # } |
| 285 | + # " >> $GITHUB_OUTPUT |
| 286 | + # node -e " |
| 287 | + # if ('${{ matrix.target }}'.endsWith('-musl')) { |
| 288 | + # console.log('IMAGE=node:${{ matrix.node }}-alpine') |
| 289 | + # } else { |
| 290 | + # console.log('IMAGE=node:${{ matrix.node }}-slim') |
| 291 | + # } |
| 292 | + # " >> $GITHUB_OUTPUT |
| 293 | + # echo "PNPM_STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT |
| 294 | + # - name: Install dependencies |
| 295 | + # run: pnpm install --force |
| 296 | + # - name: Download artifacts |
| 297 | + # uses: actions/download-artifact@v8 |
| 298 | + # with: |
| 299 | + # name: bindings-${{ matrix.target }} |
| 300 | + # path: . |
| 301 | + # - name: List packages |
| 302 | + # run: ls -R . |
| 303 | + # shell: bash |
| 304 | + # - name: Set up QEMU |
| 305 | + # uses: docker/setup-qemu-action@v4 |
| 306 | + # if: ${{ contains(matrix.target, 'armv7') }} |
| 307 | + # with: |
| 308 | + # platforms: all |
| 309 | + # - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes |
| 310 | + # if: ${{ contains(matrix.target, 'armv7') }} |
| 311 | + # - name: Test bindings |
| 312 | + # uses: tj-actions/docker-run@v2 |
| 313 | + # with: |
| 314 | + # image: ${{ steps.docker.outputs.IMAGE }} |
| 315 | + # name: test-binding |
| 316 | + # options: "-v ${{ steps.docker.outputs.PNPM_STORE_PATH }}:${{ steps.docker.outputs.PNPM_STORE_PATH }} -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }} --platform ${{ steps.docker.outputs.PLATFORM }}" |
| 317 | + # args: npm run test |
318 | 318 | publish: |
319 | 319 | name: Publish |
320 | 320 | runs-on: ubuntu-latest |
321 | 321 | needs: |
322 | 322 | - lint |
323 | 323 | # - build-freebsd |
324 | 324 | - test-macOS-windows-binding |
325 | | - - test-linux-binding |
| 325 | + # - test-linux-binding |
326 | 326 | steps: |
327 | 327 | - uses: actions/checkout@v6 |
328 | 328 | - name: setup pnpm |
|
0 commit comments