|
@@ -25,20 +25,17 @@ jobs:
|
|
|
settings:
|
|
|
- host: macos-latest
|
|
|
target: x86_64-apple-darwin
|
|
|
- architecture: x64
|
|
|
build: |
|
|
|
yarn build
|
|
|
strip -x *.node
|
|
|
- host: windows-latest
|
|
|
build: yarn build
|
|
|
target: x86_64-pc-windows-msvc
|
|
|
- architecture: x64
|
|
|
- host: windows-latest
|
|
|
build: |
|
|
|
yarn build --target i686-pc-windows-msvc
|
|
|
yarn test
|
|
|
target: i686-pc-windows-msvc
|
|
|
- architecture: x86
|
|
|
- host: ubuntu-latest
|
|
|
target: x86_64-unknown-linux-gnu
|
|
|
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
|
|
@@ -68,7 +65,6 @@ jobs:
|
|
|
yarn build --target aarch64-unknown-linux-gnu &&
|
|
|
aarch64-unknown-linux-gnu-strip *.node
|
|
|
- host: ubuntu-latest
|
|
|
- architecture: x64
|
|
|
target: armv7-unknown-linux-gnueabihf
|
|
|
setup: |
|
|
|
sudo apt-get update
|
|
@@ -77,7 +73,6 @@ jobs:
|
|
|
yarn build --target=armv7-unknown-linux-gnueabihf
|
|
|
arm-linux-gnueabihf-strip *.node
|
|
|
- host: ubuntu-latest
|
|
|
- architecture: x64
|
|
|
target: aarch64-linux-android
|
|
|
build: |
|
|
|
export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
|
|
@@ -85,9 +80,8 @@ jobs:
|
|
|
export CXX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang++"
|
|
|
export PATH="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
|
|
|
yarn build --target aarch64-linux-android
|
|
|
- ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip *.node
|
|
|
+ ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip *.node
|
|
|
- host: ubuntu-latest
|
|
|
- architecture: x64
|
|
|
target: armv7-linux-androideabi
|
|
|
build: |
|
|
|
export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"
|
|
@@ -95,9 +89,8 @@ jobs:
|
|
|
export CXX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang++"
|
|
|
export PATH="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
|
|
|
yarn build --target armv7-linux-androideabi
|
|
|
- ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip *.node
|
|
|
+ ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip *.node
|
|
|
- host: ubuntu-latest
|
|
|
- architecture: x64
|
|
|
target: aarch64-unknown-linux-musl
|
|
|
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
|
|
build: |-
|
|
@@ -106,7 +99,6 @@ jobs:
|
|
|
yarn build --target aarch64-unknown-linux-musl &&
|
|
|
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
|
|
|
- host: windows-latest
|
|
|
- architecture: x64
|
|
|
target: aarch64-pc-windows-msvc
|
|
|
build: yarn build --target aarch64-pc-windows-msvc
|
|
|
name: stable - ${{ matrix.settings.target }} - node@16
|
|
@@ -120,7 +112,6 @@ jobs:
|
|
|
node-version: 16
|
|
|
check-latest: true
|
|
|
cache: yarn
|
|
|
- architecture: ${{ matrix.settings.architecture }}
|
|
|
- name: Install
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
if: ${{ !matrix.settings.docker }}
|
|
@@ -144,14 +135,26 @@ jobs:
|
|
|
- name: Cache NPM dependencies
|
|
|
uses: actions/cache@v3
|
|
|
with:
|
|
|
- path: node_modules
|
|
|
+ path: .yarn/cache
|
|
|
key: npm-cache-build-${{ matrix.settings.target }}-node@16
|
|
|
- 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: Install dependencies
|
|
|
- run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
|
|
+ run: yarn install
|
|
|
+ - name: Setup node x86
|
|
|
+ uses: actions/setup-node@v3
|
|
|
+ if: matrix.settings.target == 'i686-pc-windows-msvc'
|
|
|
+ with:
|
|
|
+ node-version: 16
|
|
|
+ check-latest: true
|
|
|
+ cache: yarn
|
|
|
+ architecture: x86
|
|
|
- name: Build in docker
|
|
|
uses: addnab/docker-run-action@v3
|
|
|
if: ${{ matrix.settings.docker }}
|
|
@@ -206,7 +209,7 @@ jobs:
|
|
|
whoami
|
|
|
env
|
|
|
freebsd-version
|
|
|
- yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
|
|
+ yarn install
|
|
|
yarn build
|
|
|
strip -x *.node
|
|
|
yarn test
|
|
@@ -244,10 +247,10 @@ jobs:
|
|
|
- name: Cache NPM dependencies
|
|
|
uses: actions/cache@v3
|
|
|
with:
|
|
|
- path: node_modules
|
|
|
+ path: .yarn/cache
|
|
|
key: npm-cache-test-${{ matrix.settings.target }}-${{ matrix.node }}
|
|
|
- name: Install dependencies
|
|
|
- run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
|
|
+ run: yarn install
|
|
|
- name: Download artifacts
|
|
|
uses: actions/download-artifact@v3
|
|
|
with:
|
|
@@ -281,10 +284,10 @@ jobs:
|
|
|
- name: Cache NPM dependencies
|
|
|
uses: actions/cache@v3
|
|
|
with:
|
|
|
- path: node_modules
|
|
|
+ path: .yarn/cache
|
|
|
key: npm-cache-test-linux-x64-gnu-${{ matrix.node }}
|
|
|
- name: Install dependencies
|
|
|
- run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
|
|
+ run: yarn install
|
|
|
- name: Download artifacts
|
|
|
uses: actions/download-artifact@v3
|
|
|
with:
|
|
@@ -318,10 +321,12 @@ jobs:
|
|
|
- name: Cache NPM dependencies
|
|
|
uses: actions/cache@v3
|
|
|
with:
|
|
|
- path: node_modules
|
|
|
+ path: .yarn/cache
|
|
|
key: npm-cache-test-x86_64-unknown-linux-musl-${{ matrix.node }}
|
|
|
- name: Install dependencies
|
|
|
- run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
|
|
+ run: |
|
|
|
+ yarn config set supportedArchitectures.libc "musl"
|
|
|
+ yarn install
|
|
|
- name: Download artifacts
|
|
|
uses: actions/download-artifact@v3
|
|
|
with:
|
|
@@ -358,10 +363,13 @@ jobs:
|
|
|
- name: Cache NPM dependencies
|
|
|
uses: actions/cache@v3
|
|
|
with:
|
|
|
- path: node_modules
|
|
|
+ path: .yarn/cache
|
|
|
key: npm-cache-test-linux-aarch64-gnu-${{ matrix.node }}
|
|
|
- name: Install dependencies
|
|
|
- run: yarn install --ignore-scripts --ignore-platform --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
|
|
+ run: |
|
|
|
+ yarn config set supportedArchitectures.cpu "arm64"
|
|
|
+ yarn config set supportedArchitectures.libc "glibc"
|
|
|
+ yarn install
|
|
|
- name: Setup and run tests
|
|
|
uses: addnab/docker-run-action@v3
|
|
|
with:
|
|
@@ -390,10 +398,13 @@ jobs:
|
|
|
- name: Cache NPM dependencies
|
|
|
uses: actions/cache@v3
|
|
|
with:
|
|
|
- path: node_modules
|
|
|
+ path: .yarn/cache
|
|
|
key: npm-cache-test-linux-aarch64-musl-${{ matrix.node }}
|
|
|
- name: Install dependencies
|
|
|
- run: yarn install --ignore-scripts --ignore-platform --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
|
|
+ run: |
|
|
|
+ yarn config set supportedArchitectures.cpu "arm64"
|
|
|
+ yarn config set supportedArchitectures.libc "musl"
|
|
|
+ yarn install
|
|
|
- name: Setup and run tests
|
|
|
uses: addnab/docker-run-action@v3
|
|
|
with:
|
|
@@ -429,10 +440,12 @@ jobs:
|
|
|
- name: Cache NPM dependencies
|
|
|
uses: actions/cache@v3
|
|
|
with:
|
|
|
- path: node_modules
|
|
|
+ path: .yarn/cache
|
|
|
key: npm-cache-test-linux-arm-gnueabihf-${{ matrix.node }}
|
|
|
- name: Install dependencies
|
|
|
- run: yarn install --ignore-scripts --ignore-platform --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
|
|
+ run: |
|
|
|
+ yarn config set supportedArchitectures.cpu "arm"
|
|
|
+ yarn install
|
|
|
- name: Setup and run tests
|
|
|
uses: addnab/docker-run-action@v3
|
|
|
with:
|
|
@@ -464,12 +477,12 @@ jobs:
|
|
|
- name: Cache NPM dependencies
|
|
|
uses: actions/cache@v3
|
|
|
with:
|
|
|
- path: node_modules
|
|
|
+ path: .yarn/cache
|
|
|
key: npm-cache-ubuntu-latest-publish
|
|
|
restore-keys: |
|
|
|
npm-cache-
|
|
|
- name: Install dependencies
|
|
|
- run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
|
|
+ run: yarn install
|
|
|
- name: Download all artifacts
|
|
|
uses: actions/download-artifact@v3
|
|
|
with:
|