Skip to content

Commit b055871

Browse files
committed
Everything, all at once
1 parent f3fcce1 commit b055871

File tree

5 files changed

+322
-601
lines changed

5 files changed

+322
-601
lines changed

.semaphore/semaphore.yml

Lines changed: 108 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,62 @@ global_job_config:
2525
prologue:
2626
commands:
2727
- checkout
28+
- sem-version node 18.19.0
29+
- node --version
30+
- npm --version
31+
- npx --version
32+
- git submodule update --init --recursive
33+
- cd deps/librdkafka
34+
- git fetch origin
35+
- git checkout dev_libdir_fix_for_zstd_zlib
36+
- cd ../../
37+
- export MKL_DEBUG=1
38+
2839

29-
# blocks:
30-
# - name: "Linux amd64: Build and test"
31-
# dependencies: [ ]
32-
# task:
33-
# agent:
34-
# machine:
35-
# type: s1-prod-ubuntu20-04-amd64-2
36-
# prologue:
37-
# commands:
38-
# - sem-version node 18.19.0
39-
# - node --version
40-
# - npm --version
41-
# - npx --version
42-
# - sudo apt-get update -q
43-
# - git submodule update --init --recursive
44-
# - sudo apt install -y libcurl4-openssl-dev libcrypto++-dev libssl-dev libzstd-dev
45-
# - 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.
46-
# jobs:
47-
# - name: "Test"
48-
# commands:
49-
# - make test
50-
# - name: "ESLint"
51-
# commands:
52-
# - npx eslint lib/kafkajs
5340

5441
blocks:
42+
- name: "Linux arm64: Build and test"
43+
dependencies: [ ]
44+
task:
45+
agent:
46+
machine:
47+
type: s1-prod-ubuntu20-04-arm64-1
48+
jobs:
49+
- name: "Build from source and test"
50+
commands:
51+
- 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.
52+
- make test
53+
54+
- name: 'macOS arm64/m1: Build and test'
55+
dependencies: []
56+
task:
57+
agent:
58+
machine:
59+
type: s1-prod-macos-arm64
60+
jobs:
61+
- name: 'Build from source and test'
62+
commands:
63+
- 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.
64+
- make test
65+
66+
- name: "Linux amd64: Build, test, lint"
67+
dependencies: [ ]
68+
task:
69+
agent:
70+
machine:
71+
type: s1-prod-ubuntu20-04-amd64-2
72+
prologue:
73+
commands:
74+
- 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.
75+
jobs:
76+
- name: "Test"
77+
commands:
78+
- make test
79+
- name: "ESLint"
80+
commands:
81+
- npx eslint lib/kafkajs
82+
83+
5584
- name: "Linux amd64: Release"
5685
dependencies: [ ]
5786
run:
@@ -60,41 +89,66 @@ blocks:
6089
agent:
6190
machine:
6291
type: s1-prod-ubuntu20-04-amd64-2
63-
prologue:
64-
commands:
65-
- sem-version node 18.19.0
66-
- node --version
67-
- npm --version
68-
- npx --version
69-
- sudo apt-get update -q
70-
- git submodule update --init --recursive
71-
- sudo apt install -y libcurl4-openssl-dev libcrypto++-dev libssl-dev libzstd-dev
92+
env_vars:
93+
- name: ARCHITECTURE
94+
value: "x64"
95+
- name: PLATFORM
96+
value: "linux"
97+
- name: LIBC
98+
value: "glibc"
7299
jobs:
73100
- name: "Release"
74101
commands:
75-
- export ARTIFACT_KEY="node-librdkafka-${SEMAPHORE_GIT_TAG_NAME}-node-v108-linux-x64.tar.gz"
102+
- export ARTIFACT_KEY="node-librdkafka-${SEMAPHORE_GIT_TAG_NAME}-node-v108-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
76103
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
77104
- npx node-pre-gyp package
78105
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
79-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${ARTIFACT_KEY}"
80-
81-
# - name: 'OSX arm64/m1'
82-
# dependencies: []
83-
# task:
84-
# agent:
85-
# machine:
86-
# type: s1-prod-macos-arm64
87-
# prologue:
88-
# commands:
89-
# - sem-version node 18.19.0
90-
# - node --version
91-
# - npm --version
92-
# - npx --version
93-
# - git submodule update --init --recursive
94-
# jobs:
95-
# - name: 'Build from source and test'
96-
# commands:
97-
# - 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.
98-
# - make test
106+
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
99107

108+
- name: "Linux arm64: Release"
109+
dependencies: [ ]
110+
run:
111+
when: "tag =~ '^v[0-9]\\.'"
112+
task:
113+
agent:
114+
machine:
115+
type: s1-prod-ubuntu20-04-arm64-1
116+
env_vars:
117+
- name: ARCHITECTURE
118+
value: "arm64"
119+
- name: PLATFORM
120+
value: "linux"
121+
- name: LIBC
122+
value: "glibc"
123+
jobs:
124+
- name: "Release"
125+
commands:
126+
- export ARTIFACT_KEY="node-librdkafka-${SEMAPHORE_GIT_TAG_NAME}-node-v108-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
127+
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
128+
- npx node-pre-gyp package
129+
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
130+
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
100131

132+
- name: "macOS arm64/m1: Release"
133+
dependencies: [ ]
134+
run:
135+
when: "tag =~ '^v[0-9]\\.'"
136+
task:
137+
agent:
138+
machine:
139+
type: s1-prod-macos-arm64
140+
env_vars:
141+
- name: ARCHITECTURE
142+
value: "arm64"
143+
- name: PLATFORM
144+
value: "darwin"
145+
- name: LIBC
146+
value: "unknown"
147+
jobs:
148+
- name: "Release"
149+
commands:
150+
- export ARTIFACT_KEY="node-librdkafka-${SEMAPHORE_GIT_TAG_NAME}-node-v108-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
151+
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
152+
- npx node-pre-gyp package
153+
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
154+
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"

deps/librdkafka

0 commit comments

Comments
 (0)