-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upgrade dependencies and lockfile (#751)
- Loading branch information
1 parent
cac0c8b
commit 70d7fa7
Showing
30 changed files
with
1,588 additions
and
795 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,17 +19,13 @@ on: | |
|
||
jobs: | ||
build: | ||
if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
settings: | ||
- host: macos-latest | ||
target: 'x86_64-apple-darwin' | ||
build: | | ||
yarn build | ||
strip -x packages/*/*.node | ||
build: yarn build --target x86_64-apple-darwin | ||
- host: windows-latest | ||
build: yarn build | ||
target: 'x86_64-pc-windows-msvc' | ||
|
@@ -40,16 +36,10 @@ jobs: | |
target: 'i686-pc-windows-msvc' | ||
- host: ubuntu-latest | ||
target: 'x86_64-unknown-linux-gnu' | ||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian | ||
build: >- | ||
set -e && | ||
rustup target add x86_64-unknown-linux-gnu && | ||
yarn build --target x86_64-unknown-linux-gnu && | ||
strip packages/*/*.node | ||
build: CC=clang yarn build --target x86_64-unknown-linux-gnu --use-napi-cross | ||
- host: ubuntu-latest | ||
target: 'x86_64-unknown-linux-musl' | ||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine | ||
build: yarn build | ||
build: yarn build --target x86_64-unknown-linux-musl -x | ||
- host: macos-latest | ||
target: 'aarch64-apple-darwin' | ||
build: | | ||
|
@@ -59,63 +49,44 @@ jobs: | |
SYSROOT=$(xcrun --sdk macosx --show-sdk-path); | ||
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT"; | ||
yarn build --target aarch64-apple-darwin | ||
strip -x packages/*/*.node | ||
- host: ubuntu-latest | ||
target: aarch64-unknown-linux-gnu | ||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64 | ||
build: >- | ||
rustup target add aarch64-unknown-linux-gnu && | ||
yarn build --target aarch64-unknown-linux-gnu && | ||
llvm-strip packages/*/*.node | ||
build: CC=clang yarn build --target aarch64-unknown-linux-gnu --use-napi-cross | ||
- host: ubuntu-latest | ||
target: 'armv7-unknown-linux-gnueabihf' | ||
setup: | | ||
sudo apt-get update | ||
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y | ||
build: yarn build --target armv7-unknown-linux-gnueabihf | ||
build: CC=clang yarn build --target armv7-unknown-linux-gnueabihf --use-napi-cross | ||
- host: ubuntu-latest | ||
target: aarch64-linux-android | ||
build: | | ||
yarn build --target aarch64-linux-android | ||
${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip packages/*/*.node | ||
build: yarn build --target aarch64-linux-android | ||
- host: ubuntu-latest | ||
architecture: x64 | ||
target: armv7-linux-androideabi | ||
build: | | ||
yarn build --target armv7-linux-androideabi | ||
${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip packages/*/*.node | ||
build: yarn build --target armv7-linux-androideabi | ||
- host: ubuntu-latest | ||
target: 'aarch64-unknown-linux-musl' | ||
downloadTarget: 'aarch64-unknown-linux-musl' | ||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine | ||
build: >- | ||
set -e && | ||
rustup target add aarch64-unknown-linux-musl && | ||
yarn build --target aarch64-unknown-linux-musl | ||
build: yarn build --target aarch64-unknown-linux-musl -x | ||
- host: windows-latest | ||
target: 'aarch64-pc-windows-msvc' | ||
build: | | ||
npm i -g @napi-rs/cli | ||
yarn build --target aarch64-pc-windows-msvc | ||
build: yarn build --target aarch64-pc-windows-msvc | ||
|
||
name: stable - ${{ matrix.settings.target }} - node@18 | ||
name: stable - ${{ matrix.settings.target }} - node@20 | ||
runs-on: ${{ matrix.settings.host }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
if: ${{ !matrix.settings.docker }} | ||
with: | ||
node-version: 18 | ||
node-version: 20 | ||
cache: yarn | ||
|
||
- name: Install | ||
uses: dtolnay/rust-toolchain@stable | ||
if: ${{ !matrix.settings.docker }} | ||
with: | ||
toolchain: nightly-2023-10-25 | ||
toolchain: nightly-2023-12-23 | ||
targets: ${{ matrix.settings.target }} | ||
|
||
- name: Cache cargo registry | ||
|
@@ -124,8 +95,8 @@ jobs: | |
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
~/.napi-rs | ||
target | ||
.cargo-cache | ||
key: ${{ matrix.settings.target }}-cargo-registry | ||
|
||
- name: Setup toolchain | ||
|
@@ -134,7 +105,7 @@ jobs: | |
shell: bash | ||
|
||
- uses: goto-bus-stop/setup-zig@v2 | ||
if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }} | ||
if: ${{ contains(matrix.settings.target, 'musl') }} | ||
with: | ||
version: 0.11.0 | ||
|
||
|
@@ -149,25 +120,15 @@ jobs: | |
- name: 'Build TypeScript' | ||
run: yarn build:ts | ||
|
||
- name: Build in docker | ||
uses: addnab/docker-run-action@v3 | ||
if: ${{ matrix.settings.docker }} | ||
with: | ||
image: ${{ matrix.settings.docker }} | ||
options: --user 0:0 -v ${{ github.workspace }}/.cargo-cache/.cargo/git:/usr/local/cargo/git -v ${{ github.workspace }}/.cargo-cache/.cargo/registry:/usr/local/cargo/registry -v ${{ github.workspace }}:/build -w /build | ||
run: ${{ matrix.settings.build }} | ||
|
||
- name: Setup node x86 | ||
uses: actions/setup-node@v4 | ||
if: matrix.settings.target == 'i686-pc-windows-msvc' | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
node-version: 20 | ||
architecture: x86 | ||
|
||
- name: 'Build' | ||
run: ${{ matrix.settings.build }} | ||
if: ${{ !matrix.settings.docker }} | ||
shell: bash | ||
|
||
- name: Upload artifact | ||
|
@@ -181,7 +142,7 @@ jobs: | |
runs-on: macos-12 | ||
name: Build FreeBSD | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Build | ||
id: build | ||
uses: cross-platform-actions/[email protected] | ||
|
@@ -202,7 +163,7 @@ jobs: | |
sudo pkg install -y -f curl node libnghttp2 npm | ||
sudo npm install -g yarn --ignore-scripts | ||
curl https://sh.rustup.rs -sSf --output rustup.sh | ||
sh rustup.sh -y --default-toolchain nightly-2023-10-25 | ||
sh rustup.sh -y --default-toolchain nightly-2023-12-23 | ||
source "$HOME/.cargo/env" | ||
echo "~~~~ rustc --version ~~~~" | ||
rustc --version | ||
|
@@ -221,7 +182,7 @@ jobs: | |
strip -x packages/*/*.node | ||
rm -rf node_modules | ||
rm -rf target | ||
rm -rf .yarn/cache | ||
rm -rf .yarn | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -246,7 +207,7 @@ jobs: | |
runs-on: ${{ matrix.settings.host }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
|
@@ -273,13 +234,7 @@ jobs: | |
run: yarn build:ts | ||
|
||
- name: Test bindings | ||
run: | | ||
yarn test packages/argon2 | ||
yarn test packages/bcrypt | ||
yarn test packages/crc32 | ||
yarn test packages/jieba | ||
yarn test packages/jsonwebtoken | ||
yarn test packages/xxhash | ||
run: yarn workspaces foreach -A -j 1 run test | ||
|
||
test-linux-x64-gnu-binding: | ||
name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }} | ||
|
@@ -292,7 +247,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
|
@@ -325,8 +280,7 @@ jobs: | |
with: | ||
image: node:${{ matrix.node }}-slim | ||
options: -v ${{ github.workspace }}:/build -w /build | ||
run: | | ||
yarn test | ||
run: yarn test -s | ||
|
||
test-linux-x64-centos-7: | ||
name: Test bindings on Linux-x64-glibc-2.17 | ||
|
@@ -379,7 +333,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
|
@@ -415,7 +369,7 @@ jobs: | |
image: node:${{ matrix.node }}-alpine | ||
options: -v ${{ github.workspace }}:/build -w /build | ||
run: | | ||
yarn test | ||
yarn test -s | ||
test-linux-aarch64-gnu-binding: | ||
name: Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }} | ||
|
@@ -428,7 +382,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
|
@@ -472,10 +426,14 @@ jobs: | |
needs: | ||
- build | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: ['18', '20'] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
|
@@ -487,7 +445,7 @@ jobs: | |
uses: actions/download-artifact@v4 | ||
with: | ||
name: bindings-aarch64-unknown-linux-musl | ||
path: packages | ||
path: artifacts | ||
|
||
- name: Move artifacts | ||
run: yarn artifacts | ||
|
@@ -511,7 +469,7 @@ jobs: | |
run: | | ||
set -e | ||
yarn build:ts | ||
yarn test | ||
yarn test -s | ||
test-linux-arm-gnueabihf-binding: | ||
name: Test bindings on armv7-unknown-linux-gnueabihf - node@${{ matrix.node }} | ||
|
@@ -524,7 +482,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
|
@@ -559,7 +517,7 @@ jobs: | |
run: | | ||
set -e | ||
yarn build:ts | ||
yarn test | ||
yarn test -s | ||
ls -la | ||
publish: | ||
|
@@ -571,15 +529,16 @@ jobs: | |
- test-linux-x64-centos-7 | ||
- test-linux-x64-musl-binding | ||
- test-linux-aarch64-gnu-binding | ||
- test-linux-aarch64-musl-binding | ||
- test-linux-arm-gnueabihf-binding | ||
- test-macOS-windows-binding | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
node-version: 20 | ||
cache: yarn | ||
|
||
- name: 'Install dependencies' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
#[cfg(all( | ||
not(all(target_os = "linux", target_env = "musl", target_arch = "aarch64")), | ||
not(debug_assertions) | ||
))] | ||
#[global_allocator] | ||
static ALLOC: mimalloc_rust::GlobalMiMalloc = mimalloc_rust::GlobalMiMalloc; | ||
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc; |
Oops, something went wrong.