Skip to content

Commit

Permalink
Use just one builder
Browse files Browse the repository at this point in the history
  • Loading branch information
milindl committed Jan 10, 2025
1 parent 31c0a7e commit 4ed51e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 83 deletions.
84 changes: 6 additions & 78 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ blocks:
- bash -c '../../ci/tests/run_perf_test.sh'
- rm -rf ./node_modules

- name: "Linux amd64: Release - c++17"
- name: "Linux amd64: Release"
dependencies: [ ]
run:
when: "tag =~ '^v[0-9]\\.'"
Expand All @@ -165,8 +165,6 @@ blocks:
value: "linux"
- name: LIBC
value: "glibc"
- name: "CKJS_CPP_STD"
value: "c++17"
prologue:
commands:
- '[[ -z $DOCKERHUB_APIKEY ]] || docker login --username $DOCKERHUB_USER --password $DOCKERHUB_APIKEY'
Expand All @@ -179,49 +177,16 @@ blocks:
- 20,115
- 21,120
- 22,127
commands:
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
- export ARTIFACT_KEY="confluent-kafka-javascript-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
- docker run -v "$(pwd):/v" -e CKJS_CPP_STD="$CKJS_CPP_STD" node:${NODE_VERSION}-bullseye /v/.semaphore/build-docker-debian.sh
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"

- name: "Linux amd64: Release - c++20"
dependencies: [ ]
run:
when: "tag =~ '^v[0-9]\\.'"
task:
agent:
machine:
type: s1-prod-ubuntu22-04-amd64-2
env_vars:
- name: ARCHITECTURE
value: "x64"
- name: PLATFORM
value: "linux"
- name: LIBC
value: "glibc"
- name: "CKJS_CPP_STD"
value: "c++20"
prologue:
commands:
- '[[ -z $DOCKERHUB_APIKEY ]] || docker login --username $DOCKERHUB_USER --password $DOCKERHUB_APIKEY'
jobs:
- name: "Release"
matrix:
- env_var: NODE_VERSION_ABI
values:
- 23,131
commands:
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
- export ARTIFACT_KEY="confluent-kafka-javascript-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
- docker run -v "$(pwd):/v" -e CKJS_CPP_STD="$CKJS_CPP_STD" node:${NODE_VERSION}-bookworm /v/.semaphore/build-docker-debian.sh
- docker run -v "$(pwd):/v" node:${NODE_VERSION}-bullseye /v/.semaphore/build-docker-debian.sh
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"

- name: "Linux arm64: Release - c++17"
- name: "Linux arm64: Release"
dependencies: [ ]
run:
when: "tag =~ '^v[0-9]\\.'"
Expand All @@ -236,8 +201,6 @@ blocks:
value: "linux"
- name: LIBC
value: "glibc"
- name: "CKJS_CPP_STD"
value: "c++17"
prologue:
commands:
- '[[ -z $DOCKERHUB_APIKEY ]] || docker login --username $DOCKERHUB_USER --password $DOCKERHUB_APIKEY'
Expand All @@ -250,45 +213,12 @@ blocks:
- 20,115
- 21,120
- 22,127
commands:
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
- export ARTIFACT_KEY="confluent-kafka-javascript-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
- docker run -v "$(pwd):/v" -e CKJS_CPP_STD="$CKJS_CPP_STD" node:${NODE_VERSION}-bullseye /v/.semaphore/build-docker-debian.sh
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"

- name: "Linux arm64: Release - c++20"
dependencies: [ ]
run:
when: "tag =~ '^v[0-9]\\.'"
task:
agent:
machine:
type: s1-prod-ubuntu22-04-arm64-1
env_vars:
- name: ARCHITECTURE
value: "arm64"
- name: PLATFORM
value: "linux"
- name: LIBC
value: "glibc"
- name: "CKJS_CPP_STD"
value: "c++20"
prologue:
commands:
- '[[ -z $DOCKERHUB_APIKEY ]] || docker login --username $DOCKERHUB_USER --password $DOCKERHUB_APIKEY'
jobs:
- name: "Release"
matrix:
- env_var: NODE_VERSION_ABI
values:
- 23,131
commands:
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
- export ARTIFACT_KEY="confluent-kafka-javascript-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
- docker run -v "$(pwd):/v" -e CKJS_CPP_STD="$CKJS_CPP_STD" node:${NODE_VERSION}-bookworm /v/.semaphore/build-docker-debian.sh
- docker run -v "$(pwd):/v" node:${NODE_VERSION}-bullseye /v/.semaphore/build-docker-debian.sh
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"

Expand Down Expand Up @@ -495,10 +425,8 @@ blocks:

- name: 'Packaging: tar all release artifacts'
dependencies:
- 'Linux amd64: Release - c++17'
- 'Linux amd64: Release - c++20'
- 'Linux arm64: Release - c++17'
- 'Linux arm64: Release - c++20'
- 'Linux amd64: Release'
- 'Linux arm64: Release'
- 'Linux amd64 musl: Release'
- 'Linux arm64 musl: Release'
- 'macOS arm64/m1: Release'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The following configurations are supported:

| Distribution | Supported Node Versions |
| ----------------------------------------- | ----------------------- |
| Debian Bullseye/Ubuntu 20.04 | 18, 20, 21, 22 |
| Debian Bullseye/Ubuntu 20.04 | 18, 20, 21, 22, 23 |
| Debian Bookworm/Ubuntu 22.04 | 18, 20, 21, 22, 23 |
| Alpine Linux 3.20+ | 18, 20, 21, 22, 23 |
| AlmaLinux 9/Rocky Linux 9/CentOS Stream 9 | 18, 20, 21, 22, 23 |
Expand Down
7 changes: 3 additions & 4 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# "BUILD_LIBRDKAFKA%": "<!(echo ${BUILD_LIBRDKAFKA:-1})"
"BUILD_LIBRDKAFKA%": "<!(node ./util/get-env.js BUILD_LIBRDKAFKA 1)",
"CKJS_LINKING%": "<!(node ./util/get-env.js CKJS_LINKING static)",
"CKJS_CPP_STD%": "<!(node ./util/get-env.js CKJS_CPP_STD c++20)",
},
"targets": [
{
Expand Down Expand Up @@ -45,7 +44,7 @@
}
],
'cflags_cc' : [
'-std=<(CKJS_CPP_STD)'
'-std=c++20'
],
'msvs_settings': {
'VCLinkerTool': {
Expand Down Expand Up @@ -136,7 +135,7 @@
'OS=="linux"',
{
'cflags_cc' : [
"-std=<(CKJS_CPP_STD)"
'-std=c++20'
],
'cflags_cc!': [
'-fno-rtti'
Expand All @@ -154,7 +153,7 @@
],
'OTHER_CPLUSPLUSFLAGS': [
'-I/usr/local/opt/openssl/include',
'-std=<(CKJS_CPP_STD)'
'-std=c++20'
],
},
}
Expand Down

0 comments on commit 4ed51e3

Please sign in to comment.