Skip to content

Commit

Permalink
ci: upgrade toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Dec 9, 2022
1 parent 25fb299 commit ed2c892
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 129 deletions.
4 changes: 2 additions & 2 deletions .cirrus.yml
Expand Up @@ -35,15 +35,15 @@ 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
PATH: /usr/local/cargo/bin:$PATH
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:
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/android-armv7.yml
Expand Up @@ -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

Expand All @@ -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
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/android.yml
Expand Up @@ -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

Expand All @@ -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

Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/bench.yaml
Expand Up @@ -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'

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cli-binary.yml
Expand Up @@ -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'

Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Pass -p and --cargo-name to build
run: |
node ./cli/scripts/index.js build -p napi-examples-binary --cargo-name napi-examples-binary
node ./cli/scripts/index.js build -p napi-examples-binary --cargo-name napi-examples-binary
./napi-examples-binary
env:
RUST_BACKTRACE: 1
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/lint.yaml
Expand Up @@ -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'

Expand All @@ -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

Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/linux-aarch64-musl.yaml
Expand Up @@ -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:
Expand All @@ -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

Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/linux-aarch64.yaml
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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'

Expand All @@ -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
Expand Down
25 changes: 9 additions & 16 deletions .github/workflows/linux-armv7.yaml
Expand Up @@ -2,7 +2,6 @@ name: Linux-armv7

env:
DEBUG: 'napi:*'
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: 'arm-linux-gnueabihf-gcc'

on:
push:
Expand All @@ -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:
Expand All @@ -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'

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux-musl.yaml
Expand Up @@ -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:
Expand All @@ -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'

Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/memory-test.yml
Expand Up @@ -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'

Expand All @@ -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

Expand All @@ -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
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/msrv.yml
Expand Up @@ -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:
Expand All @@ -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'

Expand All @@ -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

Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/test.yaml
Expand Up @@ -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

Expand Down

1 comment on commit ed2c892

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: ed2c892 Previous: 25fb299 Ratio
noop#napi-rs 64065999 ops/sec (±0.28%) 59122567 ops/sec (±0.3%) 0.92
noop#JavaScript 710751551 ops/sec (±0.17%) 594391664 ops/sec (±0.12%) 0.84
Plus number#napi-rs 20036180 ops/sec (±0.64%) 20889332 ops/sec (±0.18%) 1.04
Plus number#JavaScript 706058341 ops/sec (±0.26%) 594034114 ops/sec (±0.21%) 0.84
Create buffer#napi-rs 383244 ops/sec (±9.31%) 443872 ops/sec (±6.96%) 1.16
Create buffer#JavaScript 1760764 ops/sec (±5.4%) 1962245 ops/sec (±7.79%) 1.11
createArray#createArrayJson 39637 ops/sec (±0.09%) 43683 ops/sec (±0.15%) 1.10
createArray#create array for loop 7619 ops/sec (±0.11%) 8440 ops/sec (±0.13%) 1.11
createArray#create array with serde trait 7638 ops/sec (±0.11%) 8512 ops/sec (±0.16%) 1.11
getArrayFromJs#get array from json string 16780 ops/sec (±0.13%) 17231 ops/sec (±0.14%) 1.03
getArrayFromJs#get array from serde 10403 ops/sec (±0.08%) 11179 ops/sec (±0.09%) 1.07
getArrayFromJs#get array with for loop 12456 ops/sec (±0.05%) 12367 ops/sec (±0.15%) 0.99
Get Set property#Get Set from native#u32 425926 ops/sec (±6%) 375666 ops/sec (±4.19%) 0.88
Get Set property#Get Set from JavaScript#u32 358682 ops/sec (±6.16%) 330761 ops/sec (±4.86%) 0.92
Get Set property#Get Set from native#string 390619 ops/sec (±6.01%) 352694 ops/sec (±4.76%) 0.90
Get Set property#Get Set from JavaScript#string 349749 ops/sec (±6.29%) 316919 ops/sec (±4.73%) 0.91
Async task#spawn task 36806 ops/sec (±0.86%) 34650 ops/sec (±1.16%) 0.94
Async task#ThreadSafeFunction 1251 ops/sec (±16.51%) 2327 ops/sec (±1.75%) 1.86
Async task#Tokio future to Promise 31055 ops/sec (±2.85%) 30343 ops/sec (±3.25%) 0.98
Query#query * 100 1913 ops/sec (±5.38%) 1994 ops/sec (±3.92%) 1.04
Query#query * 1 29500 ops/sec (±6.91%) 31675 ops/sec (±0.44%) 1.07

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.