summaryrefslogtreecommitdiffstats
path: root/src/fluent-bit/lib/librdkafka-2.1.0/.semaphore/semaphore.yml
blob: 275bb76aaf12e7c0846ec935d2906e00c5a9bd40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
version: v1.0
name: 'librdkafka build and release artifact pipeline'
agent:
  machine:
    type: s1-prod-macos-arm64
global_job_config:
  prologue:
    commands:
      - checkout
      - mkdir artifacts
      - mkdir dest
blocks:
  - name: 'OSX arm64/m1'
    dependencies: []
    task:
      agent:
        machine:
          type: s1-prod-macos-arm64
      env_vars:
        - name: ARTIFACT_KEY
          value: p-librdkafka__plat-osx__arch-arm64__lnk-all
      epilogue:
        commands:
          - '[[ -z $SEMAPHORE_GIT_TAG_NAME ]] || artifact push workflow artifacts/ --destination artifacts/${ARTIFACT_KEY}/'
      jobs:
        - name: 'Build'
          commands:
            - ./configure --install-deps --source-deps-only --enable-static --disable-lz4-ext --enable-strip
            - make -j all examples check
            - examples/rdkafka_example -X builtin.features
            - otool -L src/librdkafka.dylib
            - otool -L src-cpp/librdkafka++.dylib
            - make -j -C tests build
            - make -C tests run_local_quick
            - DESTDIR="$PWD/dest" make install
            - (cd dest && tar cvzf ../artifacts/librdkafka.tgz .)


  - name: 'OSX x64'
    dependencies: []
    task:
      agent:
        machine:
          type: s1-prod-macos
      env_vars:
        - name: ARTIFACT_KEY
          value: p-librdkafka__plat-osx__arch-x64__lnk-all
      epilogue:
        commands:
          - '[[ -z $SEMAPHORE_GIT_TAG_NAME ]] || artifact push workflow artifacts/ --destination artifacts/${ARTIFACT_KEY}/'
      jobs:
        - name: 'Build'
          commands:
            - ./configure --install-deps --source-deps-only --enable-static --disable-lz4-ext --enable-strip
            - make -j all examples check
            - examples/rdkafka_example -X builtin.features
            - otool -L src/librdkafka.dylib
            - otool -L src-cpp/librdkafka++.dylib
            - make -j -C tests build
            - make -C tests run_local_quick
            - DESTDIR="$PWD/dest" make install
            - (cd dest && tar cvzf ../artifacts/librdkafka.tgz .)


  - name: 'Style check'
    dependencies: []
    skip:
      # Skip for release tags, we don't want style checks
      # to fail the release build.
      when: "tag =~ '^v[0-9]\\.'"
    task:
      agent:
        machine:
          type: s1-prod-ubuntu20-04-amd64-2
      jobs:
        - name: 'Style check'
          commands:
            - sudo apt install -y clang-format-10 python3 python3-pip python3-setuptools
            - python3 -m pip install -r packaging/tools/requirements.txt
            - CLANG_FORMAT=clang-format-10 make style-check


  - name: 'Build documentation'
    dependencies: []
    task:
      agent:
        machine:
          type: s1-prod-ubuntu20-04-amd64-2
      jobs:
        - name: 'Generate documentation'
          commands:
            - sudo apt install -y doxygen graphviz
            - make docs
            - (cd staging-docs && tar cvzf ../artifacts/librdkafka-docs.tgz .)
            - '[[ -z $SEMAPHORE_GIT_TAG_NAME ]] || artifact push workflow artifacts/librdkafka-docs.tgz --destination artifacts/librdkafka-docs.tgz'


  - name: 'Linux Ubuntu x64: source build'
    dependencies: []
    skip:
      # Skip for release tags, we don't want flaky CI tests
      # to fail the release build.
      when: "tag =~ '^v[0-9]\\.'"
    task:
      agent:
        machine:
          type: s1-prod-ubuntu20-04-amd64-2
      jobs:
        - name: 'Build and integration tests'
          commands:
            - wget -O rapidjson-dev.deb https://launchpad.net/ubuntu/+archive/primary/+files/rapidjson-dev_1.1.0+dfsg2-3_all.deb
            - sudo dpkg -i rapidjson-dev.deb
            - python3 -m pip install -U pip
            - python3 -m pip -V
            - python3 -m pip install -r tests/requirements.txt
            - ./configure --install-deps
            # split these up
            - ./packaging/tools/rdutcoverage.sh
            - make copyright-check
            - make -j all examples check
            - echo "Verifying that CONFIGURATION.md does not have manual changes"
            - git diff --exit-code CONFIGURATION.md
            - examples/rdkafka_example -X builtin.features
            - ldd src/librdkafka.so.1
            - ldd src-cpp/librdkafka++.so.1
            - make -j -C tests build
            - make -C tests run_local_quick
            - DESTDIR="$PWD/dest" make install
            - (cd tests && python3 -m trivup.clusters.KafkaCluster --version 3.1.0 --cmd 'make quick')


  - name: 'Linux x64: release artifact docker builds'
    dependencies: []
    run:
      when: "tag =~ '^v[0-9]\\.'"
    task:
      agent:
        machine:
          type: s1-prod-ubuntu20-04-amd64-2
      epilogue:
        commands:
          - '[[ -z $SEMAPHORE_GIT_TAG_NAME ]] || artifact push workflow artifacts/ --destination artifacts/${ARTIFACT_KEY}/'
      jobs:
        - name: 'Build: centos6 glibc +gssapi'
          env_vars:
            - name: ARTIFACT_KEY
              value: p-librdkafka__plat-linux__dist-centos6__arch-x64__lnk-std__extra-gssapi
          commands:
            - packaging/tools/build-release-artifacts.sh quay.io/pypa/manylinux2010_x86_64 artifacts/librdkafka.tgz

        - name: 'Build: centos6 glibc'
          env_vars:
            - name: ARTIFACT_KEY
              value: p-librdkafka__plat-linux__dist-centos6__arch-x64__lnk-all
          commands:
            - packaging/tools/build-release-artifacts.sh --disable-gssapi quay.io/pypa/manylinux2010_x86_64 artifacts/librdkafka.tgz

        - name: 'Build: centos7 glibc +gssapi'
          env_vars:
            - name: ARTIFACT_KEY
              value: p-librdkafka__plat-linux__dist-centos7__arch-x64__lnk-std__extra-gssapi
          commands:
            - packaging/tools/build-release-artifacts.sh quay.io/pypa/manylinux2014_x86_64 artifacts/librdkafka.tgz

        - name: 'Build: centos7 glibc'
          env_vars:
            - name: ARTIFACT_KEY
              value: p-librdkafka__plat-linux__dist-centos7__arch-x64__lnk-all
          commands:
            - packaging/tools/build-release-artifacts.sh --disable-gssapi quay.io/pypa/manylinux2014_x86_64 artifacts/librdkafka.tgz

        - name: 'Build: alpine musl +gssapi'
          env_vars:
            - name: ARTIFACT_KEY
              value: p-librdkafka__plat-linux__dist-alpine__arch-x64__lnk-std__extra-gssapi
          commands:
            - packaging/tools/build-release-artifacts.sh alpine:3.16 artifacts/librdkafka.tgz

        - name: 'Build: alpine musl'
          env_vars:
            - name: ARTIFACT_KEY
              value: p-librdkafka__plat-linux__dist-alpine__arch-x64__lnk-all
          commands:
            - packaging/tools/build-release-artifacts.sh --disable-gssapi alpine:3.16 artifacts/librdkafka.tgz


  - name: 'Linux arm64: release artifact docker builds'
    dependencies: []
    task:
      agent:
        machine:
          type: s1-prod-ubuntu20-04-arm64-1
      epilogue:
        commands:
          - '[[ -z $SEMAPHORE_GIT_TAG_NAME ]] || artifact push workflow artifacts/ --destination artifacts/${ARTIFACT_KEY}/'
      jobs:
        - name: 'Build: centos7 glibc +gssapi'
          env_vars:
            - name: ARTIFACT_KEY
              value: p-librdkafka__plat-linux__dist-centos7__arch-arm64__lnk-std__extra-gssapi
          commands:
            - packaging/tools/build-release-artifacts.sh quay.io/pypa/manylinux2014_aarch64 artifacts/librdkafka.tgz

        - name: 'Build: centos7 glibc'
          env_vars:
            - name: ARTIFACT_KEY
              value: p-librdkafka__plat-linux__dist-centos7__arch-arm64__lnk-all
          commands:
            - packaging/tools/build-release-artifacts.sh --disable-gssapi quay.io/pypa/manylinux2014_aarch64 artifacts/librdkafka.tgz

        - name: 'Build: alpine musl +gssapi'
          env_vars:
            - name: ARTIFACT_KEY
              value: p-librdkafka__plat-linux__dist-alpine__arch-arm64__lnk-all__extra-gssapi
          commands:
            - packaging/tools/build-release-artifacts.sh alpine:3.16 artifacts/librdkafka.tgz

        - name: 'Build: alpine musl'
          env_vars:
            - name: ARTIFACT_KEY
              value: p-librdkafka__plat-linux__dist-alpine__arch-arm64__lnk-all
          commands:
            - packaging/tools/build-release-artifacts.sh --disable-gssapi alpine:3.16 artifacts/librdkafka.tgz


  - name: 'Windows x64: MinGW-w64'
    dependencies: []
    task:
      agent:
        machine:
          type: s1-prod-windows
      env_vars:
        - name: CHERE_INVOKING
          value: 'yes'
        - name: MSYSTEM
          value: UCRT64
      prologue:
        commands:
          - cache restore msys2-x64-${Env:ARTIFACT_KEY}
          # Set up msys2
          - "& .\\win32\\setup-msys2.ps1"
          - cache delete msys2-x64-${Env:ARTIFACT_KEY}
          - cache store msys2-x64-${Env:ARTIFACT_KEY} c:/msys64
      epilogue:
        commands:
          - if ($env:SEMAPHORE_GIT_TAG_NAME -ne "") { artifact push workflow artifacts/ --destination artifacts/$Env:ARTIFACT_KEY/ }
      jobs:
        - name: 'Build: MinGW-w64 Dynamic'
          env_vars:
            - name: ARTIFACT_KEY
              value: p-librdkafka__plat-windows__dist-mingw__arch-x64__lnk-std
          commands:
            - C:\msys64\usr\bin\bash -lc './packaging/mingw-w64/semaphoreci-build.sh ./artifacts/librdkafka.tgz'

        - name: 'Build: MinGW-w64 Static'
          env_vars:
            - name: ARTIFACT_KEY
              value: p-librdkafka__plat-windows__dist-mingw__arch-x64__lnk-static
          commands:
            - C:\msys64\usr\bin\bash -lc './packaging/mingw-w64/semaphoreci-build.sh --static ./artifacts/librdkafka.tgz'

  - name: 'Windows x64: Windows SDK 10.0 / MSVC v142 / VS 2019'
    dependencies: []
    task:
      agent:
        machine:
          type: s1-prod-windows
      env_vars:
        # Disable vcpkg telemetry
        - name: VCPKG_DISABLE_METRICS
          value: 'yes'
      prologue:
        commands:
          # install vcpkg in the parent directory.
          - pwd
          - cd ..
          # Restore vcpkg caches, if any.
          - cache restore vcpkg-archives-$Env:ARTIFACT_KEY
          # Setup vcpkg
          - "& .\\librdkafka\\win32\\setup-vcpkg.ps1"
          - cd librdkafka
          - ..\vcpkg\vcpkg integrate install
          # Install required packages.
          - ..\vcpkg\vcpkg --feature-flags=versions install --triplet $Env:triplet
          - cd ..
          - pwd
          # Store vcpkg caches
          - ls vcpkg/
          - echo $Env:VCPKG_ROOT
          - cache delete vcpkg-archives-$Env:ARTIFACT_KEY
          - cache store vcpkg-archives-$Env:ARTIFACT_KEY C:/Users/semaphore/AppData/Local/vcpkg/archives
          - pwd
          - cd librdkafka
      epilogue:
        commands:
          - Get-ChildItem . -include *.dll -recurse
          - Get-ChildItem . -include *.lib -recurse
          - if ($env:SEMAPHORE_GIT_TAG_NAME -ne "") { artifact push workflow artifacts/ --destination artifacts/$Env:ARTIFACT_KEY/ }
      jobs:
        - name: 'Build: MSVC x64'
          env_vars:
            - name: triplet
              value: x64-windows
            - name: ARTIFACT_KEY
              value: p-librdkafka__plat-windows__dist-msvc__arch-x64__lnk-std
          commands:
            - "& .\\win32\\msbuild.ps1 -platform x64"
            - "& .\\win32\\package-zip.ps1 -platform x64"
        - name: 'Build: MSVC x86'
          env_vars:
            - name: triplet
              value: x86-windows
            - name: ARTIFACT_KEY
              value: p-librdkafka__plat-windows__dist-msvc__arch-x86__lnk-std
          commands:
            - "& .\\win32\\msbuild.ps1 -platform Win32"
            - "& .\\win32\\package-zip.ps1 -platform Win32"

  - name: 'Packaging'
    dependencies:
      - 'Build documentation'
      - 'OSX arm64/m1'
      - 'OSX x64'
      - 'Linux x64: release artifact docker builds'
      - 'Linux arm64: release artifact docker builds'
      - 'Windows x64: MinGW-w64'
      - 'Windows x64: Windows SDK 10.0 / MSVC v142 / VS 2019'
    run:
      when: "tag =~ '^v[0-9]\\.'"
    task:
      agent:
        machine:
          type: s1-prod-ubuntu20-04-amd64-2
      jobs:
        - name: 'Build NuGet and static packages'
          commands:
            # Get all artifacts from previous jobs in this workflow/pipeline.
            - artifact pull workflow artifacts
            - mkdir -p packages
            # Prepare packaging tools
            - cd packaging/nuget
            - python3 -m pip install -U -r requirements.txt
            # Create NuGet package
            # We need --ignore-tag since the jobs don't add the tag to
            # the artifact path, and they don't need to since these artifacts
            # are part of the same workflow.
            - ./release.py --directory ../../artifacts --ignore-tag --class NugetPackage ${SEMAPHORE_GIT_TAG_NAME}
            - cp -v librdkafka.redist.*.nupkg ../../packages
            # Create static package
            - ./release.py --directory ../../artifacts --ignore-tag --class StaticPackage ${SEMAPHORE_GIT_TAG_NAME}
            - cp -v librdkafka-static-bundle*.tgz ../../packages
            - cd ../../
            # Copy generated docs to packages for inclusion in the tar ball
            - cp -v artifacts/librdkafka-docs.tgz packages/
            # Maker super tar ball of all packages
            - cd packages
            - tar cvf librdkafka-packages-${SEMAPHORE_GIT_TAG_NAME}-${SEMAPHORE_WORKFLOW_ID}.tar .
            # Provide some extra details
            - ls -la
            - sha256sum *
            - cd ..
            # Upload all packages to project artifact store
            - artifact push project packages --destination librdkafka-packages-${SEMAPHORE_GIT_TAG_NAME}-${SEMAPHORE_WORKFLOW_ID}
            - echo Thank you