|
41 | 41 | docker tag $DOCKER_REGISTRY_URL/napi-rs/napi-rs/nodejs-rust:lts-debian builder |
42 | 42 | build: | |
43 | 43 | docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/build -w /build builder yarn build && strip *.node |
44 | | - - host: ubuntu-latest |
45 | | - target: x86_64-unknown-linux-musl |
46 | | - architecture: x64 |
47 | | - docker: | |
48 | | - docker pull $DOCKER_REGISTRY_URL/napi-rs/napi-rs/nodejs-rust:lts-alpine |
49 | | - docker tag $DOCKER_REGISTRY_URL/napi-rs/napi-rs/nodejs-rust:lts-alpine builder |
50 | | - build: docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/build -w /build builder yarn build && strip *.node |
51 | 44 | - host: macos-latest |
52 | 45 | target: aarch64-apple-darwin |
53 | 46 | build: | |
|
62 | 55 | build: | |
63 | 56 | yarn build --target=aarch64-unknown-linux-gnu |
64 | 57 | aarch64-linux-gnu-strip *.node |
65 | | - - host: ubuntu-latest |
66 | | - architecture: x64 |
67 | | - target: armv7-unknown-linux-gnueabihf |
68 | | - setup: | |
69 | | - sudo apt-get update |
70 | | - sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y |
71 | | - build: | |
72 | | - yarn build --target=armv7-unknown-linux-gnueabihf |
73 | | - arm-linux-gnueabihf-strip *.node |
74 | | - - host: ubuntu-latest |
75 | | - architecture: x64 |
76 | | - target: aarch64-linux-android |
77 | | - build: | |
78 | | - export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang" |
79 | | - export CC="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang" |
80 | | - export CXX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang++" |
81 | | - export PATH="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}" |
82 | | - yarn build --target aarch64-linux-android |
83 | | - ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip *.node |
84 | | - - host: ubuntu-latest |
85 | | - architecture: x64 |
86 | | - target: armv7-linux-androideabi |
87 | | - build: | |
88 | | - export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang" |
89 | | - export CC="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang" |
90 | | - export CXX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang++" |
91 | | - export PATH="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}" |
92 | | - yarn build --target armv7-linux-androideabi |
93 | | - ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip *.node |
94 | | - - host: ubuntu-latest |
95 | | - architecture: x64 |
96 | | - target: aarch64-unknown-linux-musl |
97 | | - downloadTarget: aarch64-unknown-linux-musl |
98 | | - docker: | |
99 | | - docker pull ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine |
100 | | - docker tag ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine builder |
101 | | - build: | |
102 | | - docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/build -w /build builder sh -c "yarn build --target=aarch64-unknown-linux-musl && /aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node" |
103 | | - - host: windows-latest |
104 | | - architecture: x64 |
105 | | - target: aarch64-pc-windows-msvc |
106 | | - build: yarn build --target aarch64-pc-windows-msvc |
107 | 58 | name: stable - ${{ matrix.settings.target }} - node@16 |
108 | 59 | runs-on: ${{ matrix.settings.host }} |
109 | 60 | steps: |
@@ -161,55 +112,6 @@ jobs: |
161 | 112 | name: bindings-${{ matrix.settings.target }} |
162 | 113 | path: ${{ env.APP_NAME }}.*.node |
163 | 114 | if-no-files-found: error |
164 | | - build-freebsd: |
165 | | - runs-on: macos-10.15 |
166 | | - name: Build FreeBSD |
167 | | - steps: |
168 | | - - uses: actions/checkout@v2 |
169 | | - - name: Build |
170 | | - id: build |
171 | | - |
172 | | - env: |
173 | | - DEBUG: napi:* |
174 | | - RUSTUP_HOME: /usr/local/rustup |
175 | | - CARGO_HOME: /usr/local/cargo |
176 | | - RUSTUP_IO_THREADS: 1 |
177 | | - with: |
178 | | - envs: DEBUG RUSTUP_HOME CARGO_HOME RUSTUP_IO_THREADS |
179 | | - usesh: true |
180 | | - mem: 3000 |
181 | | - prepare: | |
182 | | - pkg install -y curl node14 python2 |
183 | | - curl -qL https://www.npmjs.com/install.sh | sh |
184 | | - npm install -g yarn |
185 | | - curl https://sh.rustup.rs -sSf --output rustup.sh |
186 | | - sh rustup.sh -y --profile minimal --default-toolchain stable |
187 | | - export PATH="/usr/local/cargo/bin:$PATH" |
188 | | - echo "~~~~ rustc --version ~~~~" |
189 | | - rustc --version |
190 | | - echo "~~~~ node -v ~~~~" |
191 | | - node -v |
192 | | - echo "~~~~ yarn --version ~~~~" |
193 | | - yarn --version |
194 | | - run: | |
195 | | - export PATH="/usr/local/cargo/bin:$PATH" |
196 | | - pwd |
197 | | - ls -lah |
198 | | - whoami |
199 | | - env |
200 | | - freebsd-version |
201 | | - yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000 |
202 | | - yarn build |
203 | | - strip -x *.node |
204 | | - yarn test |
205 | | - rm -rf node_modules |
206 | | - rm -rf target |
207 | | - - name: Upload artifact |
208 | | - uses: actions/upload-artifact@v2 |
209 | | - with: |
210 | | - name: bindings-freebsd |
211 | | - path: ${{ env.APP_NAME }}.*.node |
212 | | - if-no-files-found: error |
213 | 115 | test-macOS-windows-binding: |
214 | 116 | name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} |
215 | 117 | needs: |
@@ -287,43 +189,6 @@ jobs: |
287 | 189 | shell: bash |
288 | 190 | - name: Test bindings |
289 | 191 | run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim yarn test |
290 | | - test-linux-x64-musl-binding: |
291 | | - name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }} |
292 | | - needs: |
293 | | - - build |
294 | | - strategy: |
295 | | - fail-fast: false |
296 | | - matrix: |
297 | | - node: |
298 | | - - '12' |
299 | | - - '14' |
300 | | - - '16' |
301 | | - runs-on: ubuntu-latest |
302 | | - steps: |
303 | | - - uses: actions/checkout@v2 |
304 | | - - name: Setup node |
305 | | - uses: actions/setup-node@v2 |
306 | | - with: |
307 | | - node-version: ${{ matrix.node }} |
308 | | - check-latest: true |
309 | | - cache: yarn |
310 | | - - name: Cache NPM dependencies |
311 | | - uses: actions/cache@v2 |
312 | | - with: |
313 | | - path: node_modules |
314 | | - key: npm-cache-test-x86_64-unknown-linux-musl-${{ matrix.node }}-${{ hashFiles('yarn.lock') }} |
315 | | - - name: Install dependencies |
316 | | - run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000 |
317 | | - - name: Download artifacts |
318 | | - uses: actions/download-artifact@v2 |
319 | | - with: |
320 | | - name: bindings-x86_64-unknown-linux-musl |
321 | | - path: . |
322 | | - - name: List packages |
323 | | - run: ls -R . |
324 | | - shell: bash |
325 | | - - name: Test bindings |
326 | | - run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine yarn test |
327 | 192 | test-linux-aarch64-gnu-binding: |
328 | 193 | name: Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }} |
329 | 194 | needs: |
@@ -363,88 +228,13 @@ jobs: |
363 | 228 | set -e |
364 | 229 | yarn test |
365 | 230 | ls -la |
366 | | - test-linux-aarch64-musl-binding: |
367 | | - name: Test bindings on aarch64-unknown-linux-musl - node@${{ matrix.node }} |
368 | | - needs: |
369 | | - - build |
370 | | - runs-on: ubuntu-latest |
371 | | - steps: |
372 | | - - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset |
373 | | - - uses: actions/checkout@v2 |
374 | | - - name: Download artifacts |
375 | | - uses: actions/download-artifact@v2 |
376 | | - with: |
377 | | - name: bindings-aarch64-unknown-linux-musl |
378 | | - path: . |
379 | | - - name: List packages |
380 | | - run: ls -R . |
381 | | - shell: bash |
382 | | - - name: Cache NPM dependencies |
383 | | - uses: actions/cache@v2 |
384 | | - with: |
385 | | - path: node_modules |
386 | | - key: npm-cache-test-linux-aarch64-musl-${{ matrix.node }}-${{ hashFiles('yarn.lock') }} |
387 | | - - name: Install dependencies |
388 | | - run: yarn install --ignore-scripts --ignore-platform --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000 |
389 | | - - name: Setup and run tests |
390 | | - uses: addnab/docker-run-action@v3 |
391 | | - with: |
392 | | - image: multiarch/alpine:aarch64-latest-stable |
393 | | - options: '-v ${{ github.workspace }}:/build -w /build' |
394 | | - run: | |
395 | | - set -e |
396 | | - apk add nodejs npm yarn |
397 | | - yarn test |
398 | | - test-linux-arm-gnueabihf-binding: |
399 | | - name: Test bindings on armv7-unknown-linux-gnueabihf - node@${{ matrix.node }} |
400 | | - needs: |
401 | | - - build |
402 | | - strategy: |
403 | | - fail-fast: false |
404 | | - matrix: |
405 | | - node: |
406 | | - - '12' |
407 | | - - '14' |
408 | | - - '16' |
409 | | - runs-on: ubuntu-latest |
410 | | - steps: |
411 | | - - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset |
412 | | - - uses: actions/checkout@v2 |
413 | | - - name: Download artifacts |
414 | | - uses: actions/download-artifact@v2 |
415 | | - with: |
416 | | - name: bindings-armv7-unknown-linux-gnueabihf |
417 | | - path: . |
418 | | - - name: List packages |
419 | | - run: ls -R . |
420 | | - shell: bash |
421 | | - - name: Cache NPM dependencies |
422 | | - uses: actions/cache@v2 |
423 | | - with: |
424 | | - path: node_modules |
425 | | - key: npm-cache-test-linux-arm-gnueabihf-${{ matrix.node }}-${{ hashFiles('yarn.lock') }} |
426 | | - - name: Install dependencies |
427 | | - run: yarn install --ignore-scripts --ignore-platform --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000 |
428 | | - - name: Setup and run tests |
429 | | - uses: addnab/docker-run-action@v3 |
430 | | - with: |
431 | | - image: ghcr.io/napi-rs/napi-rs/nodejs:armhf-${{ matrix.node }} |
432 | | - options: '-v ${{ github.workspace }}:/build -w /build' |
433 | | - run: | |
434 | | - set -e |
435 | | - yarn test |
436 | | - ls -la |
437 | 231 | publish: |
438 | 232 | name: Publish |
439 | 233 | runs-on: ubuntu-latest |
440 | 234 | needs: |
441 | | - - build-freebsd |
442 | 235 | - test-macOS-windows-binding |
443 | 236 | - test-linux-x64-gnu-binding |
444 | | - - test-linux-x64-musl-binding |
445 | 237 | - test-linux-aarch64-gnu-binding |
446 | | - - test-linux-aarch64-musl-binding |
447 | | - - test-linux-arm-gnueabihf-binding |
448 | 238 | steps: |
449 | 239 | - uses: actions/checkout@v2 |
450 | 240 | - name: Setup node |
|
0 commit comments