Skip to content

Commit

Permalink
chore(cli): update CI template
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Jan 3, 2023
1 parent c58972e commit 68a804e
Showing 1 changed file with 8 additions and 66 deletions.
74 changes: 8 additions & 66 deletions cli/src/new/ci-template.ts
Expand Up @@ -77,21 +77,11 @@ jobs:
- host: ubuntu-latest
target: 'aarch64-linux-android'
build: |
export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="\${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
export CC="\${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
export CXX="\${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang++"
export AR="\${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
export PATH="\${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:\${PATH}"
yarn build --target aarch64-linux-android
\${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip *.node
- host: ubuntu-latest
target: 'armv7-linux-androideabi'
build: |
export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="\${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"
export CC="\${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"
export CXX="\${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang++"
export AR="\${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
export PATH="\${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:\${PATH}"
yarn build --target armv7-linux-androideabi
\${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip *.node
- host: ubuntu-latest
Expand All @@ -106,7 +96,7 @@ jobs:
target: 'aarch64-pc-windows-msvc'
build: yarn build --target aarch64-pc-windows-msvc
name: stable - \${{ matrix.settings.target }} - node@16
name: stable - \${{ matrix.settings.target }} - node@18
runs-on: \${{ matrix.settings.host }}
steps:
Expand All @@ -116,18 +106,16 @@ jobs:
uses: actions/setup-node@v3
if: \${{ !matrix.settings.docker }}
with:
node-version: 16
node-version: 18
check-latest: true
cache: yarn
- name: Install
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
if: \${{ !matrix.settings.docker }}
with:
profile: minimal
override: true
toolchain: stable
target: \${{ matrix.settings.target }}
targets: \${{ matrix.settings.target }}
- name: Cache cargo
uses: actions/cache@v3
Expand Down Expand Up @@ -162,7 +150,7 @@ jobs:
uses: actions/setup-node@v3
if: matrix.settings.target == 'i686-pc-windows-msvc'
with:
node-version: 16
node-version: 18
check-latest: true
cache: yarn
architecture: x86
Expand Down Expand Up @@ -230,6 +218,7 @@ jobs:
yarn test
rm -rf node_modules
rm -rf target
rm -rf .yarn/cache
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -262,12 +251,6 @@ jobs:
check-latest: true
cache: 'yarn'
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-test-\${{ matrix.settings.target }}-\${{ matrix.node }}-\${{ hashFiles('yarn.lock') }}
- name: 'Install dependencies'
run: yarn install
Expand Down Expand Up @@ -304,12 +287,6 @@ jobs:
check-latest: true
cache: 'yarn'
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-test-linux-x64-gnu-\${{ matrix.node }}
- name: 'Install dependencies'
run: yarn install
Expand Down Expand Up @@ -346,12 +323,6 @@ jobs:
check-latest: true
cache: 'yarn'
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-test-x86_64-unknown-linux-musl-\${{ matrix.node }}
- name: 'Install dependencies'
run: |
yarn config set supportedArchitectures.libc "musl"
Expand Down Expand Up @@ -395,12 +366,6 @@ jobs:
run: ls -R .
shell: bash
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-test-linux-aarch64-gnu-\${{ matrix.node }}
- name: Install dependencies
run: |
yarn config set supportedArchitectures.cpu "arm64"
Expand Down Expand Up @@ -439,12 +404,6 @@ jobs:
run: ls -R .
shell: bash
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-test-linux-aarch64-musl-\${{ matrix.node }}
- name: Install dependencies
run: |
yarn config set supportedArchitectures.cpu "arm64"
Expand Down Expand Up @@ -486,12 +445,6 @@ jobs:
run: ls -R .
shell: bash
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-test-linux-arm-gnueabihf-\${{ matrix.node }}
- name: Install dependencies
run: |
yarn config set supportedArchitectures.cpu "arm"
Expand Down Expand Up @@ -519,16 +472,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-test-x86_64-apple-darwin-16-\${{ hashFiles('yarn.lock') }}
- name: 'Install dependencies'
run: yarn install
Expand Down Expand Up @@ -571,15 +518,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-ubuntu-latest-publish
- name: 'Install dependencies'
run: yarn install
Expand Down

1 comment on commit 68a804e

@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: 68a804e Previous: c58972e Ratio
noop#napi-rs 54617974 ops/sec (±1.14%) 57061686 ops/sec (±1.04%) 1.04
noop#JavaScript 759137743 ops/sec (±1.2%) 708805415 ops/sec (±1.01%) 0.93
Plus number#napi-rs 15441688 ops/sec (±0.81%) 16587218 ops/sec (±1.3%) 1.07
Plus number#JavaScript 728416984 ops/sec (±0.88%) 703637255 ops/sec (±0.92%) 0.97
Create buffer#napi-rs 303901 ops/sec (±11.39%) 350581 ops/sec (±10.55%) 1.15
Create buffer#JavaScript 1322227 ops/sec (±5.69%) 1840407 ops/sec (±5.05%) 1.39
createArray#createArrayJson 34372 ops/sec (±0.99%) 36883 ops/sec (±1.04%) 1.07
createArray#create array for loop 6314 ops/sec (±0.98%) 6488 ops/sec (±0.9%) 1.03
createArray#create array with serde trait 6312 ops/sec (±1.04%) 6600 ops/sec (±0.88%) 1.05
getArrayFromJs#get array from json string 14994 ops/sec (±0.9%) 16083 ops/sec (±2.6%) 1.07
getArrayFromJs#get array from serde 7777 ops/sec (±1.28%) 8804 ops/sec (±0.8%) 1.13
getArrayFromJs#get array with for loop 9956 ops/sec (±1.08%) 11064 ops/sec (±1.07%) 1.11
Get Set property#Get Set from native#u32 354660 ops/sec (±6.9%) 370432 ops/sec (±6.34%) 1.04
Get Set property#Get Set from JavaScript#u32 298682 ops/sec (±6.76%) 315050 ops/sec (±6.41%) 1.05
Get Set property#Get Set from native#string 315462 ops/sec (±6.37%) 335860 ops/sec (±6.37%) 1.06
Get Set property#Get Set from JavaScript#string 265999 ops/sec (±6.73%) 294619 ops/sec (±6.43%) 1.11
Async task#spawn task 25272 ops/sec (±2.69%) 31200 ops/sec (±2.86%) 1.23
Async task#ThreadSafeFunction 1522 ops/sec (±6.27%) 2356 ops/sec (±4.74%) 1.55
Async task#Tokio future to Promise 23200 ops/sec (±1.81%) 30492 ops/sec (±2.26%) 1.31
Query#query * 100 1488 ops/sec (±3.84%) 1701 ops/sec (±2.66%) 1.14
Query#query * 1 19490 ops/sec (±2.94%) 27477 ops/sec (±2.45%) 1.41

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

Please sign in to comment.