36
36
build : |
37
37
yarn build
38
38
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
46
39
- host : macos-latest
47
40
target : aarch64-apple-darwin
48
41
build : |
53
46
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
54
47
yarn build --target aarch64-apple-darwin
55
48
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
56
86
name : stable - ${{ matrix.settings.target }} - node@16
57
87
runs-on : ${{ matrix.settings.host }}
58
88
steps :
64
94
node-version : 16
65
95
check-latest : true
66
96
cache : yarn
67
- architecture : ${{ matrix.settings.architecture }}
68
97
- name : Install
69
98
uses : actions-rs/toolchain@v1
70
99
if : ${{ !matrix.settings.docker }}
@@ -73,21 +102,18 @@ jobs:
73
102
override : true
74
103
toolchain : stable
75
104
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
81
105
- 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
88
107
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 }}
91
117
- name : Cache NPM dependencies
92
118
uses : actions/cache@v2
93
119
with :
@@ -97,8 +123,20 @@ jobs:
97
123
run : ${{ matrix.settings.setup }}
98
124
if : ${{ matrix.settings.setup }}
99
125
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
100
130
- name : Install dependencies
101
131
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
102
140
- name : Build in docker
103
141
uses : addnab/docker-run-action@v3
104
142
if : ${{ matrix.settings.docker }}
0 commit comments