diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2eac27a..b29f410 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -33,30 +33,28 @@ jobs: - host: windows-latest build: yarn build target: x86_64-pc-windows-msvc + - host: macos-latest + target: aarch64-apple-darwin + build: | + yarn build --target aarch64-apple-darwin + strip -x *.node - 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: macos-latest - target: aarch64-apple-darwin - build: | - yarn build --target aarch64-apple-darwin - strip -x *.node - host: ubuntu-latest target: aarch64-unknown-linux-gnu - docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64 + cross: gcc-aarch64-linux-gnu build: |- - apt-get install -y gcc-multilib set -e && yarn build --target aarch64-unknown-linux-gnu && aarch64-unknown-linux-gnu-strip *.node - host: windows-latest target: aarch64-pc-windows-msvc build: yarn build --target aarch64-pc-windows-msvc - name: stable - ${{ matrix.settings.target }} - node@18 + name: stable - ${{ matrix.settings.target }} - node@20 runs-on: ${{ matrix.settings.host }} steps: - uses: actions/checkout@v3 @@ -64,7 +62,7 @@ jobs: uses: actions/setup-node@v3 if: ${{ !matrix.settings.docker }} with: - node-version: 18 + node-version: 20 check-latest: true cache: yarn - name: Install @@ -83,38 +81,17 @@ jobs: .cargo-cache target/ key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }} - - uses: goto-bus-stop/setup-zig@v2 - if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }} - with: - version: 0.10.1 - name: Setup toolchain run: ${{ matrix.settings.setup }} if: ${{ matrix.settings.setup }} shell: bash - - name: Setup node x86 - if: matrix.settings.target == 'i686-pc-windows-msvc' - run: yarn config set supportedArchitectures.cpu "ia32" - shell: bash + - name: Setup cross compiler + if: ${{ matrix.settings.cross }} + run: apt-get update && apt-get install -y ${{ matrix.settings.cross }} - name: Install dependencies run: yarn install - - name: Setup node x86 - uses: actions/setup-node@v3 - if: matrix.settings.target == 'i686-pc-windows-msvc' - with: - node-version: 18 - check-latest: true - cache: yarn - architecture: x86 - - name: Build in docker - uses: addnab/docker-run-action@v3 - if: ${{ matrix.settings.docker }} - with: - image: ${{ matrix.settings.docker }} - options: '--user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build' - run: ${{ matrix.settings.build }} - name: Build run: ${{ matrix.settings.build }} - if: ${{ !matrix.settings.docker }} shell: bash - name: Upload artifact uses: actions/upload-artifact@v3 @@ -122,6 +99,7 @@ jobs: name: bindings-${{ matrix.settings.target }} path: ${{ env.APP_NAME }}.*.node if-no-files-found: error + test-macOS-windows-binding: name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} needs: