@@ -26,49 +26,75 @@ global_job_config:
26
26
commands :
27
27
- checkout
28
28
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
53
+
29
54
blocks :
30
- # - name: "Linux amd64"
31
- # dependencies: [ ]
55
+ - name : " Linux amd64: Release"
56
+ dependencies : [ ]
57
+ run :
58
+ when : " tag =~ '^v[0-9]\\ .'"
59
+ task :
60
+ agent :
61
+ machine :
62
+ 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
72
+ jobs :
73
+ - name : " Release"
74
+ commands :
75
+ - export ARTIFACT_KEY="node-librdkafka-${SEMAPHORE_GIT_TAG_NAME}-node-v108-linux-x64.tar.gz"
76
+ - npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
77
+ - npx node-pre-gyp package
78
+ - 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: []
32
83
# task:
33
84
# agent:
34
85
# machine:
35
- # type: s1-prod-ubuntu20-04-amd64-2
86
+ # type: s1-prod-macos-arm64
36
87
# prologue:
37
88
# commands:
38
89
# - sem-version node 18.19.0
39
90
# - node --version
40
91
# - npm --version
41
92
# - npx --version
42
- # - sudo apt-get update -q
43
93
# - git submodule update --init --recursive
44
94
# jobs:
45
- # - name: " Build from source and test"
95
+ # - name: ' Build from source and test'
46
96
# commands:
47
- # - sudo apt install -y libcurl4-openssl-dev libcrypto++-dev libssl-dev libzstd-dev
48
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.
49
98
# - make test
50
- # - name: "ESLint"
51
- # commands:
52
- # - npm install --only=dev
53
- # - npx eslint lib/kafkajs
54
-
55
- - name : ' OSX arm64/m1'
56
- dependencies : []
57
- task :
58
- agent :
59
- machine :
60
- type : s1-prod-macos-arm64
61
- prologue :
62
- commands :
63
- - sem-version node 18.19.0
64
- - node --version
65
- - npm --version
66
- - npx --version
67
- - git submodule update --init --recursive
68
- jobs :
69
- - name : ' Build from source and test'
70
- commands :
71
- - 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.
72
- - make test
73
99
74
100
0 commit comments