ci: upgrade toolchain (#1382)

This commit is contained in:
LongYinan 2022-12-09 17:29:03 +08:00 committed by GitHub
parent 25fb299ac6
commit e1864d68ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 53 additions and 129 deletions

View file

@ -35,7 +35,7 @@ build_and_test: &BUILD_AND_TEST
freebsd_task:
name: FreeBSD
freebsd_instance:
image: freebsd-13-0-release-amd64
image: freebsd-13-1-release-amd64
env:
RUSTUP_HOME: /usr/local/rustup
CARGO_HOME: /usr/local/cargo
@ -43,7 +43,7 @@ freebsd_task:
RUSTUP_IO_THREADS: '1'
setup_script:
- pkg update
- pkg install -y -f curl node16 libnghttp2
- pkg install -y -f curl node libnghttp2
<<: *BUILD_AND_TEST
macos_arm64_task:

View file

@ -19,7 +19,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'yarn'
check-latest: true
@ -41,13 +41,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: stable-linux-android-armv7-node@16-cargo-cache
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-linux-android-node@16
key: stable-linux-android-armv7-node@18-cargo-cache
- name: Install dependencies
run: yarn install --immutable --mode=skip-build

View file

@ -19,7 +19,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'yarn'
check-latest: true
@ -43,12 +43,6 @@ jobs:
target
key: stable-linux-android-node@16-cargo-cache
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-linux-android-node@16
- name: Install dependencies
run: yarn install --immutable --mode=skip-build

View file

@ -21,7 +21,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true
cache: 'yarn'
@ -41,12 +41,6 @@ jobs:
target
key: bench-cargo-cache
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: bench-yarn-cache
- name: 'Install dependencies'
run: yarn install --immutable --mode=skip-build

View file

@ -19,7 +19,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true
cache: 'yarn'

View file

@ -17,7 +17,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true
cache: 'yarn'
@ -37,12 +37,6 @@ jobs:
~/.cargo/git
key: lint-cargo-cache
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: lint-yarn-cache
- name: 'Install dependencies'
run: yarn install --immutable --mode=skip-build

View file

@ -11,7 +11,7 @@ on:
jobs:
build:
name: stable - aarch64-unknown-linux-gnu - node@16
name: stable - aarch64-unknown-linux-gnu - node@18
runs-on: ubuntu-latest
steps:
@ -22,16 +22,10 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true
cache: 'yarn'
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-linux-aarch64-gnu-node@16
- name: Install dependencies
run: yarn install --immutable --mode=skip-build

View file

@ -2,7 +2,7 @@ name: Linux-aarch64
env:
DEBUG: 'napi:*'
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: 'aarch64-linux-gnu-gcc'
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: 'aarch64-linux-gnu-gcc-9'
on:
push:
@ -12,7 +12,7 @@ on:
jobs:
build:
name: stable - aarch64-unknown-linux-gnu - node@16
name: stable - aarch64-unknown-linux-gnu - node@18
runs-on: ubuntu-latest
steps:
@ -23,7 +23,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true
cache: 'yarn'
@ -43,16 +43,10 @@ jobs:
~/.cargo/git
key: stable-linux-aarch64-gnu-node@16-cargo-cache
- name: Cache NPM dependencies
uses: actions/cache@v3
- name: Install ziglang
uses: goto-bus-stop/setup-zig@v2
with:
path: .yarn/cache
key: npm-cache-linux-aarch64-gnu-node@16
- name: Install cross compile toolchain
run: |
sudo apt-get update
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y
version: 0.10.0
- name: Install dependencies
run: yarn install --immutable --mode=skip-build

View file

@ -2,7 +2,6 @@ name: Linux-armv7
env:
DEBUG: 'napi:*'
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: 'arm-linux-gnueabihf-gcc'
on:
push:
@ -12,7 +11,7 @@ on:
jobs:
build:
name: stable - armv7-unknown-linux-gnu - node@16
name: stable - armv7-unknown-linux-gnu - node@18
runs-on: ubuntu-latest
steps:
@ -23,7 +22,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true
cache: 'yarn'
@ -35,25 +34,19 @@ jobs:
override: true
target: armv7-unknown-linux-gnueabihf
- name: Install ziglang
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.10.0
- name: Cache cargo
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: stable-linux-armv7-gnu-node@16-cargo-cache
- name: Cache NPM dependencies
uses: actions/cache@v2
with:
path: node_modules
key: npm-cache-linux-armv7-gnu-node@16-${{ hashFiles('yarn.lock') }}
- name: Install cross compile toolchain
run: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf -y
key: stable-linux-armv7-gnu-node@18-cargo-cache
- name: Install dependencies
run: yarn install --immutable --mode=skip-build

View file

@ -11,7 +11,7 @@ on:
jobs:
build:
name: stable - x86_64-unknown-linux-musl - node@lts
name: stable - x86_64-unknown-linux-musl - node@18
runs-on: ubuntu-latest
steps:
@ -20,7 +20,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true
cache: 'yarn'

View file

@ -20,7 +20,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true
cache: 'yarn'
@ -35,17 +35,15 @@ jobs:
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache/registry/index/
.cargo-cache/registry/cache/
.cargo-cache/git/db/
target/
key: stable-memory-leak-detect-cargo-cache
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: memory-leak-detect
- name: 'Install dependencies'
run: yarn install --immutable
@ -55,8 +53,12 @@ jobs:
- name: 'Pull docker image'
run: docker pull node:lts-slim
- name: 'Build memory test specs'
run: yarn build:memory
- name: Build in docker
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
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: yarn build:memory
- name: Memory leak tests
run: yarn test:memory

View file

@ -11,7 +11,7 @@ on:
jobs:
test-msrv-rust:
name: 1.57.0 - ubuntu-latest - node@16
name: 1.57.0 - ubuntu-latest - node@18
runs-on: ubuntu-latest
steps:
@ -20,7 +20,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true
cache: 'yarn'
@ -39,12 +39,6 @@ jobs:
~/.cargo/git
key: stable-ubuntu-latest-node@16-cargo-cache
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-ubuntu-latest-node@16
- name: 'Install dependencies'
run: yarn install --mode=skip-build --immutable

View file

@ -47,12 +47,6 @@ jobs:
target
key: stable-${{ matrix.os }}-node@${{ matrix.node }}-cargo-cache
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-${{ matrix.os }}-node@${{ matrix.node }}
- name: 'Install dependencies'
run: yarn install --mode=skip-build --immutable

View file

@ -11,7 +11,7 @@ on:
jobs:
build_and_test:
name: stable - windows-latest - arm64 - node@16
name: stable - windows-latest - arm64 - node@18
runs-on: windows-latest
steps:
@ -20,7 +20,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true
cache: 'yarn'
@ -38,12 +38,6 @@ jobs:
override: true
target: aarch64-pc-windows-msvc
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-windows-aarch64-msvc-node@16
- name: Cache cargo
uses: actions/cache@v3
with:

View file

@ -11,7 +11,7 @@ on:
jobs:
build_and_test:
name: stable - windows-latest - i686 - node@16
name: stable - windows-latest - i686 - node@18
runs-on: windows-latest
steps:
@ -20,17 +20,11 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true
architecture: 'x64'
cache: 'yarn'
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-windows-i686-msvc-node@16
- name: 'Install dependencies'
run: |
yarn install --mode=skip-build --immutable

View file

@ -29,7 +29,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true
cache: 'yarn'
- name: Install
@ -50,14 +50,9 @@ jobs:
- name: Install aarch64 toolchain
run: rustup target add aarch64-unknown-linux-gnu
- name: Install ziglang
uses: goto-bus-stop/setup-zig@v1
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.10.0
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-ubuntu-latest-gnu-node@16
- name: Install dependencies
run: yarn install --immutable --mode=skip-build
- name: 'Build TypeScript'
@ -67,19 +62,18 @@ jobs:
with:
# Testing for compatibility with node v12.x
node-version: 12
check-latest: true
- name: Cross build native tests
run: |
yarn workspace compat-mode-examples build --target ${{ matrix.target }} --zig
yarn workspace examples build --target ${{ matrix.target }} --zig
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: compat-${{ matrix.target }}
path: ./examples/napi-compat-mode/index.node
if-no-files-found: error
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: napi-${{ matrix.target }}
path: ./examples/napi/index.node
@ -108,14 +102,9 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true
cache: 'yarn'
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-${{ matrix.settings.host }}-node@16
- name: Install dependencies
run: yarn install --immutable --mode=skip-build
- name: Download artifacts