Skip to content

Commit 23f884a

Browse files
committed
fix(ci): force nodejs v20 on alpine, fix linkers for riscv64/armv7, use cross-compile for armv7-musl
1 parent 06a1a5a commit 23f884a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/CI.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ jobs:
5353
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
5454
build: |
5555
set -e &&
56+
rm -f /usr/local/bin/node /usr/local/bin/npm /usr/local/bin/npx &&
57+
apk del nodejs npm || true &&
5658
apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/v3.20/main --repository=http://dl-cdn.alpinelinux.org/alpine/v3.20/community nodejs npm &&
59+
node -v &&
5760
rustup update stable &&
5861
npm install &&
5962
npm run build -- --target x86_64-unknown-linux-musl
@@ -78,13 +81,14 @@ jobs:
7881
sudo apt-get update
7982
sudo apt-get install gcc-arm-linux-gnueabihf -y
8083
build: |
84+
export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc
8185
rustup target add armv7-unknown-linux-gnueabihf &&
8286
npm run build -- --target armv7-unknown-linux-gnueabihf
8387
- host: ubuntu-latest
8488
target: armv7-unknown-linux-musleabihf
8589
build: |
8690
rustup target add armv7-unknown-linux-musleabihf &&
87-
npm run build -- --target armv7-unknown-linux-musleabihf
91+
npm run build -- --target armv7-unknown-linux-musleabihf --cross-compile
8892
- host: ubuntu-latest
8993
target: aarch64-linux-android
9094
build: |
@@ -100,7 +104,10 @@ jobs:
100104
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
101105
build: |-
102106
set -e &&
107+
rm -f /usr/local/bin/node /usr/local/bin/npm /usr/local/bin/npx &&
108+
apk del nodejs npm || true &&
103109
apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/v3.20/main --repository=http://dl-cdn.alpinelinux.org/alpine/v3.20/community nodejs npm &&
110+
node -v &&
104111
rustup update stable &&
105112
npm install &&
106113
rustup target add aarch64-unknown-linux-musl &&
@@ -116,6 +123,7 @@ jobs:
116123
sudo apt-get update
117124
sudo apt-get install gcc-riscv64-linux-gnu -y
118125
build: |
126+
export CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER=riscv64-linux-gnu-gcc
119127
rustup target add riscv64gc-unknown-linux-gnu &&
120128
npm run build -- --target riscv64gc-unknown-linux-gnu
121129
name: stable - ${{ matrix.settings.target }} - node@20

0 commit comments

Comments
 (0)