From a6293496eab7c313fbadcff47bed1ce4e38dea83 Mon Sep 17 00:00:00 2001 From: Ludo Galabru Date: Thu, 12 Oct 2023 08:43:57 -0400 Subject: [PATCH] fix: attempt to fix unix CI --- .github/workflows/ordhook-sdk-js.yml | 38 ++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ordhook-sdk-js.yml b/.github/workflows/ordhook-sdk-js.yml index 41126846..6f73b507 100644 --- a/.github/workflows/ordhook-sdk-js.yml +++ b/.github/workflows/ordhook-sdk-js.yml @@ -93,15 +93,11 @@ jobs: build: yarn build --target aarch64-pc-windows-msvc name: stable - ${{ matrix.settings.target }} - node@18 runs-on: ${{ matrix.settings.host }} - defaults: - run: - working-directory: ./components/ordhook-sdk-js steps: - uses: actions/checkout@v3 - - name: Change directory - working-directory: ./components/ordhook-sdk-js - name: Setup node uses: actions/setup-node@v3 + working-directory: ./components/ordhook-sdk-js if: ${{ !matrix.settings.docker }} with: node-version: 18 @@ -115,6 +111,7 @@ jobs: targets: ${{ matrix.settings.target }} - name: Cache cargo uses: actions/cache@v3 + working-directory: ./components/ordhook-sdk-js with: path: | ~/.cargo/registry/index/ @@ -136,9 +133,11 @@ jobs: run: yarn config set supportedArchitectures.cpu "ia32" shell: bash - name: Install dependencies + working-directory: ./components/ordhook-sdk-js run: yarn install - name: Setup node x86 uses: actions/setup-node@v3 + working-directory: ./components/ordhook-sdk-js if: matrix.settings.target == 'i686-pc-windows-msvc' with: node-version: 18 @@ -147,6 +146,7 @@ jobs: architecture: x86 - name: Build in docker uses: addnab/docker-run-action@v3 + working-directory: ./components/ordhook-sdk-js if: ${{ matrix.settings.docker }} with: image: ${{ matrix.settings.docker }} @@ -154,6 +154,7 @@ jobs: run: ${{ matrix.settings.build }} - name: Build run: ${{ matrix.settings.build }} + working-directory: ./components/ordhook-sdk-js if: ${{ !matrix.settings.docker }} shell: bash - name: Upload artifact @@ -170,6 +171,7 @@ jobs: - name: Build id: build uses: vmactions/freebsd-vm@v0 + working-directory: ./components/ordhook-sdk-js env: DEBUG: napi:* RUSTUP_HOME: /usr/local/rustup @@ -231,21 +233,26 @@ jobs: - uses: actions/checkout@v3 - name: Setup node uses: actions/setup-node@v3 + working-directory: ./components/ordhook-sdk-js with: node-version: ${{ matrix.node }} check-latest: true cache: yarn - name: Install dependencies + working-directory: ./components/ordhook-sdk-js run: yarn install - name: Download artifacts uses: actions/download-artifact@v3 + working-directory: ./components/ordhook-sdk-js with: name: bindings-${{ matrix.settings.target }} path: . - name: List packages + working-directory: ./components/ordhook-sdk-js run: ls -R . shell: bash - name: Test bindings + working-directory: ./components/ordhook-sdk-js run: yarn test test-linux-x64-gnu-binding: name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }} @@ -263,11 +270,13 @@ jobs: - uses: actions/checkout@v3 - name: Setup node uses: actions/setup-node@v3 + working-directory: ./components/ordhook-sdk-js with: node-version: ${{ matrix.node }} check-latest: true cache: yarn - name: Install dependencies + working-directory: ./components/ordhook-sdk-js run: yarn install - name: Download artifacts uses: actions/download-artifact@v3 @@ -275,9 +284,11 @@ jobs: name: bindings-x86_64-unknown-linux-gnu path: . - name: List packages + working-directory: ./components/ordhook-sdk-js run: ls -R . shell: bash - name: Test bindings + working-directory: ./components/ordhook-sdk-js run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim yarn test test-linux-x64-musl-binding: name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }} @@ -294,16 +305,19 @@ jobs: steps: - uses: actions/checkout@v3 - name: Setup node + working-directory: ./components/ordhook-sdk-js uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} check-latest: true cache: yarn - name: Install dependencies + working-directory: ./components/ordhook-sdk-js run: | yarn config set supportedArchitectures.libc "musl" yarn install - name: Download artifacts + working-directory: ./components/ordhook-sdk-js uses: actions/download-artifact@v3 with: name: bindings-x86_64-unknown-linux-musl @@ -329,23 +343,28 @@ jobs: - uses: actions/checkout@v3 - name: Download artifacts uses: actions/download-artifact@v3 + working-directory: ./components/ordhook-sdk-js with: name: bindings-aarch64-unknown-linux-gnu path: . - name: List packages + working-directory: ./components/ordhook-sdk-js run: ls -R . shell: bash - name: Install dependencies + working-directory: ./components/ordhook-sdk-js run: | yarn config set supportedArchitectures.cpu "arm64" yarn config set supportedArchitectures.libc "glibc" yarn install - name: Set up QEMU + working-directory: ./components/ordhook-sdk-js uses: docker/setup-qemu-action@v2 with: platforms: arm64 - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - name: Setup and run tests + working-directory: ./components/ordhook-sdk-js uses: addnab/docker-run-action@v3 with: image: node:${{ matrix.node }}-slim @@ -363,24 +382,29 @@ jobs: - uses: actions/checkout@v3 - name: Download artifacts uses: actions/download-artifact@v3 + working-directory: ./components/ordhook-sdk-js with: name: bindings-aarch64-unknown-linux-musl path: . - name: List packages + working-directory: ./components/ordhook-sdk-js run: ls -R . shell: bash - name: Install dependencies + working-directory: ./components/ordhook-sdk-js run: | yarn config set supportedArchitectures.cpu "arm64" yarn config set supportedArchitectures.libc "musl" yarn install - name: Set up QEMU + working-directory: ./components/ordhook-sdk-js uses: docker/setup-qemu-action@v2 with: platforms: arm64 - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - name: Setup and run tests uses: addnab/docker-run-action@v3 + working-directory: ./components/ordhook-sdk-js with: image: node:lts-alpine options: '--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build' @@ -407,18 +431,22 @@ jobs: name: bindings-armv7-unknown-linux-gnueabihf path: . - name: List packages + working-directory: ./components/ordhook-sdk-js run: ls -R . shell: bash - name: Install dependencies + working-directory: ./components/ordhook-sdk-js run: | yarn config set supportedArchitectures.cpu "arm" yarn install - name: Set up QEMU + working-directory: ./components/ordhook-sdk-js uses: docker/setup-qemu-action@v2 with: platforms: arm - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - name: Setup and run tests + working-directory: ./components/ordhook-sdk-js uses: addnab/docker-run-action@v3 with: image: node:${{ matrix.node }}-bullseye-slim