From ea8ad56617929a8e9170f6c4b03ba869c6580b31 Mon Sep 17 00:00:00 2001 From: darksaid98 Date: Fri, 10 May 2024 16:38:53 +0200 Subject: [PATCH] chore(ci): tweak builds --- .github/workflows/CI.yml | 42 ++++++++++++++-------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 70b01cf..1587d53 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -27,11 +27,9 @@ jobs: settings: - host: macos-latest target: x86_64-apple-darwin - build: | - yarn build - strip -x *.node + build: yarn build --target x86_64-apple-darwin - host: windows-latest - build: yarn build + build: yarn build --target x86_64-pc-windows-msvc target: x86_64-pc-windows-msvc - host: windows-latest build: | @@ -41,19 +39,14 @@ jobs: - host: ubuntu-latest target: x86_64-unknown-linux-gnu docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian - build: |- - set -e && - yarn build --target x86_64-unknown-linux-gnu && - strip *.node - # - host: ubuntu-latest - # target: x86_64-unknown-linux-musl - # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine - # build: set -e && yarn build && strip *.node + build: yarn build --target x86_64-unknown-linux-gnu + - host: ubuntu-latest + target: x86_64-unknown-linux-musl + docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine + build: yarn build --target x86_64-unknown-linux-musl - host: macos-latest target: aarch64-apple-darwin - build: | - yarn build --target aarch64-apple-darwin - strip -x *.node + build: yarn build --target aarch64-apple-darwin - host: ubuntu-latest target: aarch64-unknown-linux-gnu docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64 @@ -65,17 +58,12 @@ jobs: sudo apt-get install gcc-arm-linux-gnueabihf -y build: | yarn build --target armv7-unknown-linux-gnueabihf - arm-linux-gnueabihf-strip *.node - host: ubuntu-latest target: aarch64-linux-android - build: | - yarn build --target aarch64-linux-android - ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip *.node - # - host: ubuntu-latest - # target: armv7-linux-androideabi - # build: | - # yarn build --target armv7-linux-androideabi - # ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip *.node + build: yarn build --target aarch64-linux-android + - host: ubuntu-latest + target: armv7-linux-androideabi + build: yarn build --target armv7-linux-androideabi - host: ubuntu-latest target: aarch64-unknown-linux-musl docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine @@ -105,7 +93,7 @@ jobs: toolchain: stable targets: ${{ matrix.settings.target }} - name: Cache cargo - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cargo/registry/index/ @@ -117,7 +105,7 @@ jobs: - uses: goto-bus-stop/setup-zig@v2 if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }} with: - version: 0.10.1 + version: 0.12.0 - name: Setup toolchain run: ${{ matrix.settings.setup }} if: ${{ matrix.settings.setup }} @@ -147,7 +135,7 @@ jobs: if: ${{ !matrix.settings.docker }} shell: bash - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: bindings-${{ matrix.settings.target }} path: ${{ env.APP_NAME }}.*.node