3838 - host : ubuntu-latest
3939 target : ' x86_64-unknown-linux-gnu'
4040 docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
41- # Node.js in Baidu need to compatible with `GLIBC_2.12`
4241 build : >-
4342 set -e &&
44- rustup toolchain install $(cat ./rust-toolchain) &&
45- rustup target add x86_64-unknown-linux-gnu &&
4643 yarn lerna exec "yarn build --target x86_64-unknown-linux-gnu" --concurrency 1 --stream --no-prefix &&
4744 strip packages/*/*.node
4845 - host : ubuntu-latest
@@ -59,17 +56,13 @@ jobs:
5956 export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
6057 yarn lerna exec "yarn build --target aarch64-apple-darwin" --concurrency 1 --stream --no-prefix
6158 strip -x packages/*/*.node
62- - host : ubuntu-18.04
59+ - host : ubuntu-latest
6360 target : aarch64-unknown-linux-gnu
64- setup : |
65- sudo apt-get update
66- sudo apt-get install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu -y
61+ docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
6762 build : |
68- rustup toolchain install $(cat ./rust-toolchain)
69- rustup target add aarch64-unknown-linux-gnu
7063 yarn lerna exec "yarn build --target aarch64-unknown-linux-gnu" --concurrency 1 --stream --no-prefix
71- aarch64-linux-gnu -strip packages/*/*.node
72- - host : ubuntu-18.04
64+ llvm -strip packages/*/*.node
65+ - host : ubuntu-latest
7366 target : ' armv7-unknown-linux-gnueabihf'
7467 setup : |
7568 sudo apt-get update
@@ -78,22 +71,12 @@ jobs:
7871 - host : ubuntu-latest
7972 target : aarch64-linux-android
8073 build : |
81- export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
82- export CC="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
83- export CXX="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang++"
84- export AR="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
85- export PATH="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
8674 yarn lerna exec "yarn build --target aarch64-linux-android" --concurrency 1 --stream --no-prefix
8775 ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip packages/*/*.node
8876 - host : ubuntu-latest
8977 architecture : x64
9078 target : armv7-linux-androideabi
9179 build : |
92- export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"
93- export CC="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"
94- export CXX="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang++"
95- export PATH="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
96- export AR="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
9780 yarn lerna exec "yarn build --target armv7-linux-androideabi" --concurrency 1 --stream --no-prefix
9881 ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip packages/*/*.node
9982 - host : ubuntu-latest
@@ -102,14 +85,13 @@ jobs:
10285 docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
10386 build : >-
10487 set -e &&
105- rustup toolchain install $(cat ./rust-toolchain) &&
10688 rustup target add aarch64-unknown-linux-musl &&
10789 yarn lerna exec "yarn build --target aarch64-unknown-linux-musl" --concurrency 1 --stream --no-prefix
10890 - host : windows-latest
10991 target : ' aarch64-pc-windows-msvc'
11092 build : yarn lerna exec "yarn build --target aarch64-pc-windows-msvc" --concurrency 1 --stream --no-prefix
11193
112- name : stable - ${{ matrix.settings.target }} - node@16
94+ name : stable - ${{ matrix.settings.target }} - node@18
11395 runs-on : ${{ matrix.settings.host }}
11496
11597 steps :
@@ -119,23 +101,16 @@ jobs:
119101 uses : actions/setup-node@v3
120102 if : ${{ !matrix.settings.docker }}
121103 with :
122- node-version : 16
104+ node-version : 18
123105 check-latest : true
124106 cache : yarn
125107
126108 - name : Install
127- uses : actions-rs/ toolchain@v1
109+ uses : dtolnay/rust- toolchain@stable
128110 if : ${{ !matrix.settings.docker }}
129111 with :
130- profile : minimal
131- override : true
132- target : ${{ matrix.settings.target }}
133-
134- - name : Generate Cargo.lock
135- uses : actions-rs/cargo@v1
136- if : ${{ !matrix.settings.docker }}
137- with :
138- command : generate-lockfile
112+ toolchain : stable
113+ targets : ${{ matrix.settings.target }}
139114
140115 - name : Cache cargo registry
141116 uses : actions/cache@v3
@@ -147,17 +122,16 @@ jobs:
147122 .cargo-cache
148123 key : ${{ matrix.settings.target }}-cargo-registry
149124
150- - name : Cache NPM dependencies
151- uses : actions/cache@v3
152- with :
153- path : node_modules
154- key : npm-cache-build-${{ matrix.settings.target }}-node@16
155-
156125 - name : Setup toolchain
157126 run : ${{ matrix.settings.setup }}
158127 if : ${{ matrix.settings.setup }}
159128 shell : bash
160129
130+ - uses : goto-bus-stop/setup-zig@v2
131+ if : ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }}
132+ with :
133+ version : 0.10.0
134+
161135 - name : Setup node x86
162136 if : matrix.settings.target == 'i686-pc-windows-msvc'
163137 run : yarn config set supportedArchitectures.cpu "ia32"
@@ -181,7 +155,7 @@ jobs:
181155 uses : actions/setup-node@v3
182156 if : matrix.settings.target == 'i686-pc-windows-msvc'
183157 with :
184- node-version : 16
158+ node-version : 18
185159 check-latest : true
186160 cache : yarn
187161 architecture : x86
@@ -216,7 +190,7 @@ jobs:
216190 usesh : true
217191 mem : 3000
218192 prepare : |
219- pkg install -y curl python2 node14
193+ pkg install -y -f curl node libnghttp2
220194 curl -qL https://www.npmjs.com/install.sh | sh
221195 npm install --location=global --ignore-scripts yarn
222196 curl https://sh.rustup.rs -sSf --output rustup.sh
@@ -592,16 +566,10 @@ jobs:
592566 - name : Setup node
593567 uses : actions/setup-node@v3
594568 with :
595- node-version : 16
569+ node-version : 18
596570 check-latest : true
597571 cache : yarn
598572
599- - name : Cache NPM dependencies
600- uses : actions/cache@v3
601- with :
602- path : node_modules
603- key : npm-cache-ubuntu-latest-publish-${{ hashFiles('yarn.lock') }}
604-
605573 - name : ' Install dependencies'
606574 run : yarn install --immutable --mode=skip-build
607575
0 commit comments