@@ -35,46 +35,68 @@ global_job_config:
35
35
36
36
37
37
blocks :
38
- - name : " Linux arm64 : Build and test"
38
+ - name : " Linux amd64 (musl) : Build and test"
39
39
dependencies : [ ]
40
40
task :
41
41
agent :
42
42
machine :
43
- type : s1-prod-ubuntu20-04-arm64-1
44
- jobs :
45
- - name : " Build from source and test"
46
- commands :
47
- - npm install # this will actually not build anything if we have a release, but rather, fetch things using node-pre-gyp - so change this later.
48
- - make test
49
-
50
- - name : ' macOS arm64/m1: Build and test'
51
- dependencies : []
52
- task :
53
- agent :
54
- machine :
55
- type : s1-prod-macos-arm64
43
+ type : s1-prod-ubuntu20-04-amd64-2
56
44
jobs :
57
- - name : ' Build from source and test'
45
+ - name : " Build from source and test for musl "
58
46
commands :
59
- - npm install # this will actually not build anything if we have a release, but rather, fetch things using node-pre-gyp - so change this later.
60
- - make test
47
+ - docker run -v "$(pwd):/v" node:18-alpine /v/.semaphore/build-docker.sh
61
48
62
- - name : " Linux amd64 : Build, test, lint "
49
+ - name : " Linux arm64 (musl) : Build and test "
63
50
dependencies : [ ]
64
51
task :
65
52
agent :
66
53
machine :
67
- type : s1-prod-ubuntu20-04-amd64-2
68
- prologue :
69
- commands :
70
- - npm install # this will actually not build anything if we have a release, but rather, fetch things using node-pre-gyp - so change this later.
54
+ type : s1-prod-ubuntu20-04-arm64-1
71
55
jobs :
72
- - name : " Test"
73
- commands :
74
- - make test
75
- - name : " ESLint"
56
+ - name : " Build from source and test for musl"
76
57
commands :
77
- - npx eslint lib/kafkajs
58
+ - docker run -v "$(pwd):/v" node:18-alpine /v/.semaphore/build-docker.sh
59
+
60
+ # - name: "Linux arm64: Build and test"
61
+ # dependencies: [ ]
62
+ # task:
63
+ # agent:
64
+ # machine:
65
+ # type: s1-prod-ubuntu20-04-arm64-1
66
+ # jobs:
67
+ # - name: "Build from source and test"
68
+ # commands:
69
+ # - npm install # this will actually not build anything if we have a release, but rather, fetch things using node-pre-gyp - so change this later.
70
+ # - make test
71
+
72
+ # - name: 'macOS arm64/m1: Build and test'
73
+ # dependencies: []
74
+ # task:
75
+ # agent:
76
+ # machine:
77
+ # type: s1-prod-macos-arm64
78
+ # jobs:
79
+ # - name: 'Build from source and test'
80
+ # commands:
81
+ # - npm install # this will actually not build anything if we have a release, but rather, fetch things using node-pre-gyp - so change this later.
82
+ # - make test
83
+
84
+ # - name: "Linux amd64: Build, test, lint"
85
+ # dependencies: [ ]
86
+ # task:
87
+ # agent:
88
+ # machine:
89
+ # type: s1-prod-ubuntu20-04-amd64-2
90
+ # prologue:
91
+ # commands:
92
+ # - npm install # this will actually not build anything if we have a release, but rather, fetch things using node-pre-gyp - so change this later.
93
+ # jobs:
94
+ # - name: "Test"
95
+ # commands:
96
+ # - make test
97
+ # - name: "ESLint"
98
+ # commands:
99
+ # - npx eslint lib/kafkajs
78
100
79
101
80
102
- name : " Linux amd64: Release"
@@ -164,6 +186,83 @@ blocks:
164
186
- npx node-pre-gyp package
165
187
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
166
188
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
189
+
190
+ - name : " Linux amd64 musl: Release"
191
+ dependencies : [ ]
192
+ run :
193
+ when : " tag =~ '^v[0-9]\\ .'"
194
+ task :
195
+ agent :
196
+ machine :
197
+ type : s1-prod-ubuntu20-04-amd64-1
198
+ env_vars :
199
+ - name : ARCHITECTURE
200
+ value : " x64"
201
+ - name : PLATFORM
202
+ value : " linux"
203
+ - name : LIBC
204
+ value : " musl"
205
+ jobs :
206
+ - name : " Release: LTS:18"
207
+ commands :
208
+ - export NODE_ABI=108
209
+ - export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-linux-${LIBC}-${ARCHITECTURE}.tar.gz"
210
+ - docker run -v "$(pwd):/v" node:18-alpine /v/.semaphore/build-docker.sh
211
+ - ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
212
+ - artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
213
+ - name : " Release: LTS:20"
214
+ commands :
215
+ - export NODE_ABI=115
216
+ - export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-linux-${LIBC}-${ARCHITECTURE}.tar.gz"
217
+ - docker run -v "$(pwd):/v" node:20-alpine /v/.semaphore/build-docker.sh
218
+ - ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
219
+ - artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
220
+ - name : " Release: latest: 21"
221
+ commands :
222
+ - export NODE_ABI=120
223
+ - export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-linux-${LIBC}-${ARCHITECTURE}.tar.gz"
224
+ - docker run -v "$(pwd):/v" node:21-alpine /v/.semaphore/build-docker.sh
225
+ - ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
226
+ - artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
227
+
228
+ - name : " Linux arm64 musl: Release"
229
+ dependencies : [ ]
230
+ run :
231
+ when : " tag =~ '^v[0-9]\\ .'"
232
+ task :
233
+ agent :
234
+ machine :
235
+ type : s1-prod-ubuntu20-04-arm64-1
236
+ env_vars :
237
+ - name : ARCHITECTURE
238
+ value : " arm64"
239
+ - name : PLATFORM
240
+ value : " linux"
241
+ - name : LIBC
242
+ value : " musl"
243
+ jobs :
244
+ - name : " Release: LTS:18"
245
+ commands :
246
+ - export NODE_ABI=108
247
+ - export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-linux-${LIBC}-${ARCHITECTURE}.tar.gz"
248
+ - docker run -v "$(pwd):/v" node:18-alpine /v/.semaphore/build-docker.sh
249
+ - ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
250
+ - artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
251
+ - name : " Release: LTS:20"
252
+ commands :
253
+ - export NODE_ABI=115
254
+ - export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-linux-${LIBC}-${ARCHITECTURE}.tar.gz"
255
+ - docker run -v "$(pwd):/v" node:20-alpine /v/.semaphore/build-docker.sh
256
+ - ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
257
+ - artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
258
+ - name : " Release: latest: 21"
259
+ commands :
260
+ - export NODE_ABI=120
261
+ - export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-linux-${LIBC}-${ARCHITECTURE}.tar.gz"
262
+ - docker run -v "$(pwd):/v" node:21-alpine /v/.semaphore/build-docker.sh
263
+ - ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
264
+ - artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
265
+
167
266
- name : " macOS arm64/m1: Release"
168
267
dependencies : [ ]
169
268
run :
0 commit comments