Skip to content

Commit

Permalink
fix: attempt to fix unix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalabru committed Oct 12, 2023
1 parent 9b44083 commit a629349
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/ordhook-sdk-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/
Expand All @@ -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
Expand All @@ -147,13 +146,15 @@ 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 }}
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 }}
working-directory: ./components/ordhook-sdk-js
if: ${{ !matrix.settings.docker }}
shell: bash
- name: Upload artifact
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand All @@ -263,21 +270,25 @@ 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
with:
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 }}
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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'
Expand All @@ -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
Expand Down

0 comments on commit a629349

Please sign in to comment.