@@ -29,7 +29,7 @@ global_job_config:
2929 - cd deps/librdkafka
3030 - git fetch origin
3131 - cd ../../
32- - export MKL_DEBUG=1
32+ - cache clear
3333
3434blocks :
3535 - name : " Linux amd64 (musl): Build and test"
@@ -303,13 +303,90 @@ blocks:
303303 - ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
304304 - artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
305305
306+ - name : " Windows x64: Release"
307+ dependencies : [ ]
308+ # run:
309+ # when: "tag =~ '^v[0-9]\\.'"
310+ task :
311+ agent :
312+ machine :
313+ type : s1-prod-windows
314+ env_vars :
315+ # Disable vcpkg telemetry
316+ - name : VCPKG_DISABLE_METRICS
317+ value : ' yes'
318+ - name : ARCHITECTURE
319+ value : " x64"
320+ - name : PLATFORM
321+ value : " win32"
322+ - name : LIBC
323+ value : " unknown"
324+ prologue :
325+ commands :
326+ # The semaphore agent already comes with an installed version of node. We, however, need to use a different
327+ # version of node for the release (as many as we need to cover all the different ABIs).
328+ # The node installer does not allow us to downgrade, so we need to uninstall the current version.
329+ # The method below isn't particularly robust (as it depends on the particular format of the URL), but it
330+ # works and can be easily fixed if it breaks (the node --version in the below jobs can be checked if there are
331+ # any issues in the build).
332+ - $env:InstalledMajor = (Get-Command node).Version.Major
333+ - $env:InstalledMinor = (Get-Command node).Version.Minor
334+ - $env:InstalledBuild = (Get-Command node).Version.Build
335+ - $env:InstalledVersion = "v${env:InstalledMajor}.${env:InstalledMinor}.${env:InstalledBuild}"
336+ - echo "https://nodejs.org/dist/${env:InstalledVersion}/node-${env:InstalledVersion}-x64.msi"
337+ - Invoke-WebRequest "https://nodejs.org/dist/${env:InstalledVersion}/node-${env:InstalledVersion}-x64.msi" -OutFile node_old.msi
338+ - msiexec /qn /l* node-old-log.txt /uninstall node_old.msi
339+ - cat .\node-old-log.txt
340+ jobs :
341+ - name : " Release: LTS:18"
342+ commands :
343+ - Invoke-WebRequest "https://nodejs.org/download/release/v18.19.0/node-v18.19.0-x64.msi" -OutFile node.msi
344+ - msiexec /qn /l* node-log.txt /i node.msi
345+ - cat .\node-log.txt
346+ - node --version
347+ - pip install setuptools
348+ - $env:NODE_ABI = 108
349+ - $env:ARTIFACT_KEY = "confluent-kafka-javascript-${env:SEMAPHORE_GIT_TAG_NAME}-node-v${env:NODE_ABI}-${env:PLATFORM}-${env:LIBC}-${env:ARCHITECTURE}.tar.gz"
350+ - echo "$env:ARTIFACT_KEY"
351+ - npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
352+ - npx node-pre-gyp package
353+ - ls "build/stage/${env:SEMAPHORE_GIT_TAG_NAME}/${env:ARTIFACT_KEY}"
354+ - artifact push workflow "build/stage/${env:SEMAPHORE_GIT_TAG_NAME}/${env:ARTIFACT_KEY}" --destination "releases/${env:SEMAPHORE_GIT_TAG_NAME}/${env:ARTIFACT_KEY}"
355+ - name : " Release: LTS:20"
356+ commands :
357+ - Invoke-WebRequest "https://nodejs.org/dist/v20.11.0/node-v20.11.0-x64.msi" -OutFile node.msi
358+ - msiexec /qn /l* node-log.txt /i node.msi
359+ - node --version
360+ - pip install setuptools
361+ - $env:NODE_ABI = 115
362+ - $env:ARTIFACT_KEY = "confluent-kafka-javascript-${env:SEMAPHORE_GIT_TAG_NAME}-node-v${env:NODE_ABI}-${env:PLATFORM}-${env:LIBC}-${env:ARCHITECTURE}.tar.gz"
363+ - echo "$env:ARTIFACT_KEY"
364+ - npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
365+ - npx node-pre-gyp package
366+ - ls "build/stage/${env:SEMAPHORE_GIT_TAG_NAME}/${env:ARTIFACT_KEY}"
367+ - artifact push workflow "build/stage/${env:SEMAPHORE_GIT_TAG_NAME}/${env:ARTIFACT_KEY}" --destination "releases/${env:SEMAPHORE_GIT_TAG_NAME}/${env:ARTIFACT_KEY}"
368+ - name : " Release: latest: 21"
369+ commands :
370+ - Invoke-WebRequest "https://nodejs.org/dist/v21.6.1/node-v21.6.1-x64.msi" -OutFile node.msi
371+ - msiexec /qn /l* node-log.txt /i node.msi
372+ - node --version
373+ - pip install setuptools
374+ - $env:NODE_ABI = 120
375+ - $env:ARTIFACT_KEY = "confluent-kafka-javascript-${env:SEMAPHORE_GIT_TAG_NAME}-node-v${env:NODE_ABI}-${env:PLATFORM}-${env:LIBC}-${env:ARCHITECTURE}.tar.gz"
376+ - echo "$env:ARTIFACT_KEY"
377+ - npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
378+ - npx node-pre-gyp package
379+ - ls "build/stage/${env:SEMAPHORE_GIT_TAG_NAME}/${env:ARTIFACT_KEY}"
380+ - artifact push workflow "build/stage/${env:SEMAPHORE_GIT_TAG_NAME}/${env:ARTIFACT_KEY}" --destination "releases/${env:SEMAPHORE_GIT_TAG_NAME}/${env:ARTIFACT_KEY}"
381+
306382 - name : ' Packaging: tar all release artifacts'
307383 dependencies :
308384 - ' Linux amd64: Release'
309385 - ' Linux arm64: Release'
310386 - ' Linux amd64 musl: Release'
311387 - ' Linux arm64 musl: Release'
312388 - ' macOS arm64/m1: Release'
389+ - ' Windows x64: Release'
313390 run :
314391 when : " tag =~ '^v[0-9]\\ .'"
315392 task :
0 commit comments