38
38
- host : ubuntu-latest
39
39
target : ' x86_64-unknown-linux-gnu'
40
40
docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
41
- # Node.js in Baidu need to compatible with `GLIBC_2.12`
42
41
build : >-
43
42
set -e &&
44
- rustup toolchain install $(cat ./rust-toolchain) &&
45
- rustup target add x86_64-unknown-linux-gnu &&
46
43
yarn lerna exec "yarn build --target x86_64-unknown-linux-gnu" --concurrency 1 --stream --no-prefix &&
47
44
strip packages/*/*.node
48
45
- host : ubuntu-latest
@@ -59,17 +56,13 @@ jobs:
59
56
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
60
57
yarn lerna exec "yarn build --target aarch64-apple-darwin" --concurrency 1 --stream --no-prefix
61
58
strip -x packages/*/*.node
62
- - host : ubuntu-18.04
59
+ - host : ubuntu-latest
63
60
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
67
62
build : |
68
- rustup toolchain install $(cat ./rust-toolchain)
69
- rustup target add aarch64-unknown-linux-gnu
70
63
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
73
66
target : ' armv7-unknown-linux-gnueabihf'
74
67
setup : |
75
68
sudo apt-get update
@@ -78,22 +71,12 @@ jobs:
78
71
- host : ubuntu-latest
79
72
target : aarch64-linux-android
80
73
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}"
86
74
yarn lerna exec "yarn build --target aarch64-linux-android" --concurrency 1 --stream --no-prefix
87
75
${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip packages/*/*.node
88
76
- host : ubuntu-latest
89
77
architecture : x64
90
78
target : armv7-linux-androideabi
91
79
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"
97
80
yarn lerna exec "yarn build --target armv7-linux-androideabi" --concurrency 1 --stream --no-prefix
98
81
${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip packages/*/*.node
99
82
- host : ubuntu-latest
@@ -102,14 +85,13 @@ jobs:
102
85
docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
103
86
build : >-
104
87
set -e &&
105
- rustup toolchain install $(cat ./rust-toolchain) &&
106
88
rustup target add aarch64-unknown-linux-musl &&
107
89
yarn lerna exec "yarn build --target aarch64-unknown-linux-musl" --concurrency 1 --stream --no-prefix
108
90
- host : windows-latest
109
91
target : ' aarch64-pc-windows-msvc'
110
92
build : yarn lerna exec "yarn build --target aarch64-pc-windows-msvc" --concurrency 1 --stream --no-prefix
111
93
112
- name : stable - ${{ matrix.settings.target }} - node@16
94
+ name : stable - ${{ matrix.settings.target }} - node@18
113
95
runs-on : ${{ matrix.settings.host }}
114
96
115
97
steps :
@@ -119,23 +101,16 @@ jobs:
119
101
uses : actions/setup-node@v3
120
102
if : ${{ !matrix.settings.docker }}
121
103
with :
122
- node-version : 16
104
+ node-version : 18
123
105
check-latest : true
124
106
cache : yarn
125
107
126
108
- name : Install
127
- uses : actions-rs/ toolchain@v1
109
+ uses : dtolnay/rust- toolchain@stable
128
110
if : ${{ !matrix.settings.docker }}
129
111
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 }}
139
114
140
115
- name : Cache cargo registry
141
116
uses : actions/cache@v3
@@ -147,17 +122,16 @@ jobs:
147
122
.cargo-cache
148
123
key : ${{ matrix.settings.target }}-cargo-registry
149
124
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
-
156
125
- name : Setup toolchain
157
126
run : ${{ matrix.settings.setup }}
158
127
if : ${{ matrix.settings.setup }}
159
128
shell : bash
160
129
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
+
161
135
- name : Setup node x86
162
136
if : matrix.settings.target == 'i686-pc-windows-msvc'
163
137
run : yarn config set supportedArchitectures.cpu "ia32"
@@ -181,7 +155,7 @@ jobs:
181
155
uses : actions/setup-node@v3
182
156
if : matrix.settings.target == 'i686-pc-windows-msvc'
183
157
with :
184
- node-version : 16
158
+ node-version : 18
185
159
check-latest : true
186
160
cache : yarn
187
161
architecture : x86
@@ -216,7 +190,7 @@ jobs:
216
190
usesh : true
217
191
mem : 3000
218
192
prepare : |
219
- pkg install -y curl python2 node14
193
+ pkg install -y -f curl node libnghttp2
220
194
curl -qL https://www.npmjs.com/install.sh | sh
221
195
npm install --location=global --ignore-scripts yarn
222
196
curl https://sh.rustup.rs -sSf --output rustup.sh
@@ -592,16 +566,10 @@ jobs:
592
566
- name : Setup node
593
567
uses : actions/setup-node@v3
594
568
with :
595
- node-version : 16
569
+ node-version : 18
596
570
check-latest : true
597
571
cache : yarn
598
572
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
-
605
573
- name : ' Install dependencies'
606
574
run : yarn install --immutable --mode=skip-build
607
575
0 commit comments