|
@@ -18,7 +18,6 @@ env:
|
|
|
pull_request: null
|
|
|
jobs:
|
|
|
build:
|
|
|
- if: "!contains(github.event.head_commit.message, 'skip ci')"
|
|
|
strategy:
|
|
|
fail-fast: false
|
|
|
matrix:
|
|
@@ -108,6 +107,7 @@ jobs:
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
if: ${{ !matrix.settings.docker }}
|
|
|
with:
|
|
|
+ toolchain: stable
|
|
|
targets: ${{ matrix.settings.target }}
|
|
|
- name: Cache cargo
|
|
|
uses: actions/cache@v3
|
|
@@ -118,11 +118,11 @@ jobs:
|
|
|
~/.cargo/git/db/
|
|
|
.cargo-cache
|
|
|
target/
|
|
|
- key: ${{ matrix.settings.target }}-cargo-registry
|
|
|
+ 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.0
|
|
|
+ version: 0.10.1
|
|
|
- name: Setup toolchain
|
|
|
run: ${{ matrix.settings.setup }}
|
|
|
if: ${{ matrix.settings.setup }}
|
|
@@ -146,7 +146,7 @@ jobs:
|
|
|
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
|
|
|
+ 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 }}
|
|
@@ -180,7 +180,7 @@ jobs:
|
|
|
curl -qL https://www.npmjs.com/install.sh | sh
|
|
|
npm install --location=global --ignore-scripts yarn
|
|
|
curl https://sh.rustup.rs -sSf --output rustup.sh
|
|
|
- sh rustup.sh -y --profile minimal --default-toolchain stable
|
|
|
+ sh rustup.sh -y --profile minimal --default-toolchain beta
|
|
|
export PATH="/usr/local/cargo/bin:$PATH"
|
|
|
echo "~~~~ rustc --version ~~~~"
|
|
|
rustc --version
|
|
@@ -322,7 +322,6 @@ jobs:
|
|
|
- '18'
|
|
|
runs-on: ubuntu-latest
|
|
|
steps:
|
|
|
- - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
|
|
- uses: actions/checkout@v3
|
|
|
- name: Download artifacts
|
|
|
uses: actions/download-artifact@v3
|
|
@@ -337,11 +336,16 @@ jobs:
|
|
|
yarn config set supportedArchitectures.cpu "arm64"
|
|
|
yarn config set supportedArchitectures.libc "glibc"
|
|
|
yarn install
|
|
|
+ - name: Set up QEMU
|
|
|
+ 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
|
|
|
with:
|
|
|
- image: ghcr.io/napi-rs/napi-rs/nodejs:aarch64-${{ matrix.node }}
|
|
|
- options: '-v ${{ github.workspace }}:/build -w /build'
|
|
|
+ image: node:${{ matrix.node }}-slim
|
|
|
+ options: '--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build'
|
|
|
run: |
|
|
|
set -e
|
|
|
yarn test
|
|
@@ -352,7 +356,6 @@ jobs:
|
|
|
- build
|
|
|
runs-on: ubuntu-latest
|
|
|
steps:
|
|
|
- - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
|
|
- uses: actions/checkout@v3
|
|
|
- name: Download artifacts
|
|
|
uses: actions/download-artifact@v3
|
|
@@ -367,14 +370,18 @@ jobs:
|
|
|
yarn config set supportedArchitectures.cpu "arm64"
|
|
|
yarn config set supportedArchitectures.libc "musl"
|
|
|
yarn install
|
|
|
+ - name: Set up QEMU
|
|
|
+ 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
|
|
|
with:
|
|
|
- image: multiarch/alpine:aarch64-latest-stable
|
|
|
- options: '-v ${{ github.workspace }}:/build -w /build'
|
|
|
+ image: node:lts-alpine
|
|
|
+ options: '--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build'
|
|
|
run: |
|
|
|
set -e
|
|
|
- apk add nodejs npm yarn
|
|
|
yarn test
|
|
|
test-linux-arm-gnueabihf-binding:
|
|
|
name: Test bindings on armv7-unknown-linux-gnueabihf - node@${{ matrix.node }}
|
|
@@ -389,7 +396,6 @@ jobs:
|
|
|
- '18'
|
|
|
runs-on: ubuntu-latest
|
|
|
steps:
|
|
|
- - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
|
|
- uses: actions/checkout@v3
|
|
|
- name: Download artifacts
|
|
|
uses: actions/download-artifact@v3
|
|
@@ -403,11 +409,16 @@ jobs:
|
|
|
run: |
|
|
|
yarn config set supportedArchitectures.cpu "arm"
|
|
|
yarn install
|
|
|
+ - name: Set up QEMU
|
|
|
+ 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
|
|
|
uses: addnab/docker-run-action@v3
|
|
|
with:
|
|
|
- image: ghcr.io/napi-rs/napi-rs/nodejs:armhf-${{ matrix.node }}
|
|
|
- options: '-v ${{ github.workspace }}:/build -w /build'
|
|
|
+ image: node:${{ matrix.node }}-bullseye-slim
|
|
|
+ options: '--platform linux/arm/v7 -v ${{ github.workspace }}:/build -w /build'
|
|
|
run: |
|
|
|
set -e
|
|
|
yarn test
|