3636 build : |
3737 yarn build
3838 strip -x *.node
39- - host : ubuntu-latest
40- target : x86_64-unknown-linux-gnu
41- docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
42- build : |-
43- set -e &&
44- yarn build --target x86_64-unknown-linux-gnu &&
45- strip *.node
4639 - host : macos-latest
4740 target : aarch64-apple-darwin
4841 build : |
5346 export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
5447 yarn build --target aarch64-apple-darwin
5548 strip -x *.node
49+ - host : ubuntu-latest
50+ target : x86_64-unknown-linux-gnu
51+ docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
52+ build : |-
53+ set -e &&
54+ yarn build --target x86_64-unknown-linux-gnu &&
55+ strip *.node
56+ - host : ubuntu-latest
57+ target : ' x86_64-unknown-linux-musl'
58+ docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
59+ build : yarn build
60+ - host : ubuntu-latest
61+ target : aarch64-unknown-linux-gnu
62+ docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
63+ build : |-
64+ set -e &&
65+ apt install pkg-config libssl-dev -y &&
66+ yarn build --target aarch64-unknown-linux-gnu &&
67+ aarch64-unknown-linux-gnu-strip *.node
68+ - host : ubuntu-latest
69+ target : aarch64-unknown-linux-musl
70+ docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
71+ build : |-
72+ set -e &&
73+ rustup target add aarch64-unknown-linux-musl &&
74+ export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-gcc &&
75+ yarn build --target aarch64-unknown-linux-musl &&
76+ /aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
77+ - host : ubuntu-latest
78+ target : armv7-unknown-linux-gnueabihf
79+ setup : |
80+ sudo apt-get update
81+ sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
82+ build : |-
83+ export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc &&
84+ yarn build --target=armv7-unknown-linux-gnueabihf &&
85+ arm-linux-gnueabihf-strip *.node
5686 name : stable - ${{ matrix.settings.target }} - node@16
5787 runs-on : ${{ matrix.settings.host }}
5888 steps :
6494 node-version : 16
6595 check-latest : true
6696 cache : yarn
67- architecture : ${{ matrix.settings.architecture }}
6897 - name : Install
6998 uses : actions-rs/toolchain@v1
7099 if : ${{ !matrix.settings.docker }}
@@ -73,21 +102,18 @@ jobs:
73102 override : true
74103 toolchain : stable
75104 target : ${{ matrix.settings.target }}
76- - name : Generate Cargo.lock
77- uses : actions-rs/cargo@v1
78- if : ${{ !matrix.settings.docker }}
79- with :
80- command : generate-lockfile
81105 - name : Cache cargo
82- uses : actions/cache@v2
83- with :
84- path : ~/.cargo/registry
85- key : ${{ matrix.settings.target }}-cargo-registry
86- - name : Cache cargo index
87- uses : actions/cache@v2
106+ uses : actions/cache@v3
88107 with :
89- path : ~/.cargo/git
90- key : ${{ matrix.settings.target }}-cargo-index
108+ path : |
109+ ~/.cargo/registry/index/
110+ ~/.cargo/registry/cache/
111+ ~/.cargo/git/db/
112+ .cargo-cache/registry/index/
113+ .cargo-cache/registry/cache/
114+ .cargo-cache/git/db/
115+ target/
116+ key : ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }}
91117 - name : Cache NPM dependencies
92118 uses : actions/cache@v2
93119 with :
@@ -97,8 +123,20 @@ jobs:
97123 run : ${{ matrix.settings.setup }}
98124 if : ${{ matrix.settings.setup }}
99125 shell : bash
126+ - name : Setup node x86
127+ if : matrix.settings.target == 'i686-pc-windows-msvc'
128+ run : yarn config set supportedArchitectures.cpu "ia32"
129+ shell : bash
100130 - name : Install dependencies
101131 run : yarn install
132+ - name : Setup node x86
133+ uses : actions/setup-node@v3
134+ if : matrix.settings.target == 'i686-pc-windows-msvc'
135+ with :
136+ node-version : 16
137+ check-latest : true
138+ cache : yarn
139+ architecture : x86
102140 - name : Build in docker
103141 uses : addnab/docker-run-action@v3
104142 if : ${{ matrix.settings.docker }}
0 commit comments