19
19
- x64
20
20
cpp_arch :
21
21
- x64
22
- docker :
23
- - " "
24
- docker_cmd :
22
+ dockerfile :
25
23
- " "
26
24
27
25
include :
44
42
45
43
# Alpine
46
44
- os : ubuntu-22.04
47
- docker : node:18-alpine
48
- docker_cmd :
49
- apk add --no-cache bash build-base curl git g++ make ninja-build
50
- pkgconfig unzip zip python3 tar cmake ninja musl-dev && cp
51
- /usr/lib/ninja-build/bin/ninja /usr/bin/ninja && npm i -g pnpm &&
52
- pnpm install && pnpm run build
45
+ dockerfile : docker/alpine.dockerfile
53
46
node_arch : x64
54
47
cpp_arch : x64
55
48
82
75
shell : bash
83
76
84
77
- name : Setup Cpp
85
- if : ${{ !matrix.docker }}
78
+ if : ${{ !matrix.dockerfile }}
86
79
uses : aminya/setup-cpp@v1
87
80
with :
88
81
vcvarsall : ${{ contains(matrix.os, 'windows') }}
@@ -98,34 +91,34 @@ jobs:
98
91
brew install gnutls autoconf automake libtool
99
92
100
93
- uses : pnpm/action-setup@v4
101
- if : ${{ !matrix.docker }}
94
+ if : ${{ !matrix.dockerfile }}
102
95
with :
103
96
version : 9
104
97
105
98
- name : Install Node 20
106
- if : ${{ !matrix.docker }}
99
+ if : ${{ !matrix.dockerfile }}
107
100
uses : actions/setup-node@v4
108
101
with :
109
102
node-version : 20
110
103
architecture : ${{ env.setup_node_arch }}
111
104
112
105
- name : Install and Build Native
113
- if : ${{ !matrix.docker }}
106
+ if : ${{ !matrix.dockerfile }}
114
107
run : pnpm install
115
108
116
109
- name : Build JavaScript
117
- if : ${{ !matrix.docker }}
110
+ if : ${{ !matrix.dockerfile }}
118
111
run : pnpm run build.js
119
112
120
113
- name : Install Node 10
121
- if : ${{ !matrix.docker && matrix.os != 'macos-14' }}
114
+ if : ${{ !matrix.dockerfile && matrix.os != 'macos-14' }}
122
115
uses : actions/setup-node@v4
123
116
with :
124
117
node-version : 10
125
118
architecture : ${{ env.setup_node_arch }}
126
119
127
120
- name : Build Native
128
- if : ${{ !matrix.docker && matrix.node_arch != 'ia32' }}
121
+ if : ${{ !matrix.dockerfile && matrix.node_arch != 'ia32' }}
129
122
run : npm run build.native
130
123
131
124
- name : Build Native Windows 32
@@ -135,19 +128,19 @@ jobs:
135
128
windows-x86
136
129
137
130
- name : Use Node 20
138
- if : ${{ !matrix.docker }}
131
+ if : ${{ !matrix.dockerfile }}
139
132
uses : actions/setup-node@v4
140
133
with :
141
134
node-version : 20
142
135
architecture : ${{ env.setup_node_arch }}
143
136
144
137
- name : Prebuild Docker
145
- if : ${{ matrix.docker }}
138
+ if : ${{ matrix.dockerfile }}
146
139
run : |
147
- docker login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
148
- docker pull ${{ matrix.docker }}
149
- docker tag ${{ matrix.docker }} builder
150
- docker run --volume ${{ github.workspace }}:/app --workdir /app --privileged builder sh -c "${{ matrix.docker_cmd }}"
140
+ docker build -t zeromq -f ${{ matrix.dockerfile }} .
141
+ docker create --name zeromq-temp zeromq
142
+ docker cp zeromq-temp:/app/build ./build
143
+ docker rm -f zeromq-temp
151
144
152
145
- name : Upload build
153
146
uses : actions/upload-artifact@v4
@@ -157,11 +150,11 @@ jobs:
157
150
overwrite : true
158
151
159
152
- name : Lint
160
- if : " ${{ contains(matrix.os, 'ubuntu') && !matrix.docker }}"
153
+ if : " ${{ contains(matrix.os, 'ubuntu') && !matrix.dockerfile }}"
161
154
run : pnpm run lint-test
162
155
163
156
- name : Test
164
- if : ${{ !matrix.docker }}
157
+ if : ${{ !matrix.dockerfile }}
165
158
uses : nick-fields/retry@v3
166
159
with :
167
160
timeout_minutes : 5
@@ -175,7 +168,7 @@ jobs:
175
168
shell : bash
176
169
177
170
- name : Test Compatibility
178
- if : ${{ !matrix.docker }}
171
+ if : ${{ !matrix.dockerfile }}
179
172
uses : nick-fields/retry@v3
180
173
with :
181
174
timeout_minutes : 5
@@ -189,7 +182,7 @@ jobs:
189
182
shell : bash
190
183
191
184
- name : Test Electron Windows/MacOS
192
- if : " ${{ !matrix.docker }}"
185
+ if : " ${{ !matrix.dockerfile }}"
193
186
uses : nick-fields/retry@v3
194
187
with :
195
188
timeout_minutes : 5
@@ -199,7 +192,7 @@ jobs:
199
192
continue-on-error : true
200
193
201
194
- name : Test Electron Linux
202
- if : " ${{ contains(matrix.os, 'ubuntu') && !matrix.docker }}"
195
+ if : " ${{ contains(matrix.os, 'ubuntu') && !matrix.dockerfile }}"
203
196
uses : nick-fields/retry@v3
204
197
with :
205
198
timeout_minutes : 5
0 commit comments