karafka-rdkafka 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -0
  4. data/dist/{librdkafka-2.11.0.tar.gz → librdkafka-2.11.1.tar.gz} +0 -0
  5. data/karafka-rdkafka.gemspec +33 -6
  6. data/lib/rdkafka/version.rb +3 -3
  7. data/renovate.json +5 -17
  8. metadata +3 -67
  9. data/.github/CODEOWNERS +0 -3
  10. data/.github/FUNDING.yml +0 -1
  11. data/.github/workflows/ci_linux_alpine_x86_64_musl.yml +0 -197
  12. data/.github/workflows/ci_linux_alpine_x86_64_musl_complementary.yml +0 -264
  13. data/.github/workflows/ci_linux_debian_x86_64_gnu.yml +0 -271
  14. data/.github/workflows/ci_linux_debian_x86_64_gnu_complementary.yml +0 -334
  15. data/.github/workflows/ci_linux_ubuntu_aarch64_gnu.yml +0 -271
  16. data/.github/workflows/ci_linux_ubuntu_aarch64_gnu_complementary.yml +0 -295
  17. data/.github/workflows/ci_linux_ubuntu_x86_64_gnu.yml +0 -281
  18. data/.github/workflows/ci_linux_ubuntu_x86_64_gnu_complementary.yml +0 -294
  19. data/.github/workflows/ci_macos_arm64.yml +0 -284
  20. data/.github/workflows/push_linux_aarch64_gnu.yml +0 -65
  21. data/.github/workflows/push_linux_x86_64_gnu.yml +0 -65
  22. data/.github/workflows/push_linux_x86_64_musl.yml +0 -79
  23. data/.github/workflows/push_macos_arm64.yml +0 -54
  24. data/.github/workflows/push_ruby.yml +0 -37
  25. data/.github/workflows/trigger-wiki-refresh.yml +0 -30
  26. data/.github/workflows/verify-action-pins.yml +0 -16
  27. data/.gitignore +0 -16
  28. data/.rspec +0 -3
  29. data/.ruby-gemset +0 -1
  30. data/.ruby-version +0 -1
  31. data/.yardopts +0 -2
  32. data/dist/cyrus-sasl-2.1.28.tar.gz +0 -0
  33. data/dist/krb5-1.21.3.tar.gz +0 -0
  34. data/dist/openssl-3.0.16.tar.gz +0 -0
  35. data/dist/zlib-1.3.1.tar.gz +0 -0
  36. data/dist/zstd-1.5.7.tar.gz +0 -0
  37. data/ext/README.md +0 -19
  38. data/ext/build_common.sh +0 -376
  39. data/ext/build_linux_aarch64_gnu.sh +0 -326
  40. data/ext/build_linux_x86_64_gnu.sh +0 -317
  41. data/ext/build_linux_x86_64_musl.sh +0 -773
  42. data/ext/build_macos_arm64.sh +0 -557
  43. data/ext/generate-ssl-certs.sh +0 -109
  44. data/spec/integrations/ssl_stress_spec.rb +0 -121
  45. data/spec/lib/rdkafka/abstract_handle_spec.rb +0 -117
  46. data/spec/lib/rdkafka/admin/create_acl_handle_spec.rb +0 -56
  47. data/spec/lib/rdkafka/admin/create_acl_report_spec.rb +0 -18
  48. data/spec/lib/rdkafka/admin/create_topic_handle_spec.rb +0 -54
  49. data/spec/lib/rdkafka/admin/create_topic_report_spec.rb +0 -16
  50. data/spec/lib/rdkafka/admin/delete_acl_handle_spec.rb +0 -85
  51. data/spec/lib/rdkafka/admin/delete_acl_report_spec.rb +0 -72
  52. data/spec/lib/rdkafka/admin/delete_topic_handle_spec.rb +0 -54
  53. data/spec/lib/rdkafka/admin/delete_topic_report_spec.rb +0 -16
  54. data/spec/lib/rdkafka/admin/describe_acl_handle_spec.rb +0 -85
  55. data/spec/lib/rdkafka/admin/describe_acl_report_spec.rb +0 -73
  56. data/spec/lib/rdkafka/admin_spec.rb +0 -982
  57. data/spec/lib/rdkafka/bindings_spec.rb +0 -198
  58. data/spec/lib/rdkafka/callbacks_spec.rb +0 -20
  59. data/spec/lib/rdkafka/config_spec.rb +0 -258
  60. data/spec/lib/rdkafka/consumer/headers_spec.rb +0 -73
  61. data/spec/lib/rdkafka/consumer/message_spec.rb +0 -139
  62. data/spec/lib/rdkafka/consumer/partition_spec.rb +0 -57
  63. data/spec/lib/rdkafka/consumer/topic_partition_list_spec.rb +0 -248
  64. data/spec/lib/rdkafka/consumer_spec.rb +0 -1343
  65. data/spec/lib/rdkafka/error_spec.rb +0 -95
  66. data/spec/lib/rdkafka/metadata_spec.rb +0 -79
  67. data/spec/lib/rdkafka/native_kafka_spec.rb +0 -130
  68. data/spec/lib/rdkafka/producer/delivery_handle_spec.rb +0 -60
  69. data/spec/lib/rdkafka/producer/delivery_report_spec.rb +0 -25
  70. data/spec/lib/rdkafka/producer/partitions_count_cache_spec.rb +0 -359
  71. data/spec/lib/rdkafka/producer_spec.rb +0 -1527
  72. data/spec/spec_helper.rb +0 -230
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0e8983765841c16f9fba2206da9a5f10b6c9b166cce390732996f5623d50e99
4
- data.tar.gz: c5729fefb57ea3241ab4bbf3a51314d1c4720bb5152dc334cbe14c1c486fbcea
3
+ metadata.gz: b78cfb1c6c960802ba949e397b139e969a3c539d2d0075d2ec8cf029ceeb9938
4
+ data.tar.gz: 4bbb8e5df2cba085ce6660626ff0bf2eec32afb7c641e918ef2088cf1e1acc47
5
5
  SHA512:
6
- metadata.gz: 6a0f3c557279f0203fe6de3a669fd3ad9de141b4ac719052e5745e7d0227963331dd91d279fc74a19ecb5846139410e825080075d435ff004003ead4f908a10e
7
- data.tar.gz: af50dc1e0c93082673b1b26ed6adc507c76a4f1de2cfa885cc9b58e83fad5b740fb4627baf384d6ce967f2c7f0e351c68b574d36bf1d9a7b7477cf191d6be587
6
+ metadata.gz: 0f8c675cd92646da62a3279190c96c80ff28ec9d6316b185776f27dfcd00b987dca89b82903553e07a6c2039ae52ff460100761fa0dd9cfb9fc3a93c75e67868
7
+ data.tar.gz: 92ee2be1f7edb1d47c0c9483072a124625e4dde0d620a1762c8a21502139c9a855a887c470b3a2b00ba600d34690581a373fcc52a0766218d8df70a3fd7ed34b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Rdkafka Changelog
2
2
 
3
+ ## 0.22.0 (2025-09-26)
4
+ - **[Breaking]** Drop support for Ruby 3.1 to move forward with the fiber scheduler work.
5
+ - [Enhancement] Bump librdkafka to 2.11.1.
6
+ - [Enhancement] Improve sigstore attestation for precompiled releases.
7
+ - [Fix] Fix incorrectly set default SSL certs dir.
8
+ - [Fix] Disable OpenSSL Heartbeats during compilation.
9
+
3
10
  ## 0.21.0 (2025-08-18)
4
11
  - [Enhancement] Support explicit Debian testing due to lib issues.
5
12
  - [Enhancement] Support ARM64 Gnu precompilation.
data/README.md CHANGED
@@ -63,6 +63,7 @@ Contributions should generally be made to the upstream [rdkafka-ruby repository]
63
63
 
64
64
  | rdkafka-ruby | librdkafka | patches |
65
65
  |-|-|-|
66
+ | 0.22.x (2025-09-26) | 2.11.1 (2025-08-18) | yes |
66
67
  | 0.21.x (2025-08-18) | 2.11.0 (2025-07-03) | yes |
67
68
  | 0.20.x (2025-07-17) | 2.8.0 (2025-01-07) | yes |
68
69
  | 0.19.x (2025-01-20) | 2.8.0 (2025-01-07) | yes |
@@ -13,17 +13,31 @@ Gem::Specification.new do |gem|
13
13
  gem.name = 'karafka-rdkafka'
14
14
  gem.require_paths = ['lib']
15
15
  gem.version = Rdkafka::VERSION
16
- gem.required_ruby_version = '>= 3.1'
16
+ gem.required_ruby_version = '>= 3.2'
17
+
18
+ files = `git ls-files`.split($\)
19
+ files = files.reject do |file|
20
+ next true if file.start_with?('.')
21
+ next true if file.start_with?('spec/')
22
+ next true if file.start_with?('ext/README.md')
23
+
24
+ false
25
+ end
17
26
 
18
27
  if ENV['RUBY_PLATFORM']
19
28
  gem.platform = ENV['RUBY_PLATFORM']
20
- gem.files = `git ls-files`.split($\)
21
29
 
22
30
  # Do not include the source code for librdkafka as it should be precompiled already per
23
31
  # platform. Same applies to any possible patches.
24
- gem.files = gem.files.reject do |file|
25
- file.match?(%r{^dist/librdkafka-.*\.tar\.gz$}) ||
26
- file.match?(%r{^dist/patches/})
32
+ # Do not include github actions details in RubyGems releases
33
+ gem.files = files.reject do |file|
34
+ next true if file.start_with?('dist/')
35
+ next true if file.start_with?('ext/build_')
36
+ next true if file.start_with?('ext/ci_')
37
+ next true if file.start_with?('ext/Rakefile')
38
+ next true if file.start_with?('ext/generate-')
39
+
40
+ false
27
41
  end
28
42
 
29
43
  # Add the compiled extensions that exist (not in git)
@@ -36,7 +50,20 @@ Gem::Specification.new do |gem|
36
50
  end
37
51
  else
38
52
  gem.platform = Gem::Platform::RUBY
39
- gem.files = `git ls-files`.split($\)
53
+
54
+ # Do not include code used for building native extensions
55
+ # Do not include github actions details in RubyGems releases
56
+ gem.files = files.reject do |file|
57
+ next true if file.start_with?('ext/build_')
58
+ next true if file.start_with?('ext/ci_')
59
+ next true if file.start_with?('ext/generate-')
60
+ next false unless file.start_with?('dist/')
61
+ next false if file.start_with?('dist/patches')
62
+ next false if file.start_with?('dist/librdkafka-')
63
+
64
+ true
65
+ end
66
+
40
67
  gem.extensions = %w(ext/Rakefile)
41
68
  end
42
69
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rdkafka
4
- VERSION = "0.21.0"
5
- LIBRDKAFKA_VERSION = "2.11.0"
6
- LIBRDKAFKA_SOURCE_SHA256 = "592a823dc7c09ad4ded1bc8f700da6d4e0c88ffaf267815c6f25e7450b9395ca"
4
+ VERSION = "0.22.0"
5
+ LIBRDKAFKA_VERSION = "2.11.1"
6
+ LIBRDKAFKA_SOURCE_SHA256 = "a2c87186b081e2705bb7d5338d5a01bc88d43273619b372ccb7bb0d264d0ca9f"
7
7
  end
data/renovate.json CHANGED
@@ -19,7 +19,7 @@
19
19
  {
20
20
  "customType": "regex",
21
21
  "managerFilePatterns": [
22
- "/^ext/build_common\\.sh$/"
22
+ "/ext/build_common.sh/"
23
23
  ],
24
24
  "matchStrings": [
25
25
  "readonly OPENSSL_VERSION=\"(?<currentValue>.*)\""
@@ -31,7 +31,7 @@
31
31
  {
32
32
  "customType": "regex",
33
33
  "managerFilePatterns": [
34
- "/^ext/build_common\\.sh$/"
34
+ "/ext/build_common.sh/"
35
35
  ],
36
36
  "matchStrings": [
37
37
  "readonly CYRUS_SASL_VERSION=\"(?<currentValue>.*)\""
@@ -43,7 +43,7 @@
43
43
  {
44
44
  "customType": "regex",
45
45
  "managerFilePatterns": [
46
- "/^ext/build_common\\.sh$/"
46
+ "/ext/build_common.sh/"
47
47
  ],
48
48
  "matchStrings": [
49
49
  "readonly ZLIB_VERSION=\"(?<currentValue>.*)\""
@@ -55,7 +55,7 @@
55
55
  {
56
56
  "customType": "regex",
57
57
  "managerFilePatterns": [
58
- "/^ext/build_common\\.sh$/"
58
+ "/ext/build_common.sh/"
59
59
  ],
60
60
  "matchStrings": [
61
61
  "readonly ZSTD_VERSION=\"(?<currentValue>.*)\""
@@ -67,7 +67,7 @@
67
67
  {
68
68
  "customType": "regex",
69
69
  "managerFilePatterns": [
70
- "/^ext/build_common\\.sh$/"
70
+ "/ext/build_common.sh/"
71
71
  ],
72
72
  "matchStrings": [
73
73
  "readonly KRB5_VERSION=\"(?<currentValue>.*)\""
@@ -75,18 +75,6 @@
75
75
  "depNameTemplate": "krb5/krb5",
76
76
  "datasourceTemplate": "github-releases",
77
77
  "extractVersionTemplate": "^krb5-(?<version>.*)$"
78
- },
79
- {
80
- "customType": "regex",
81
- "managerFilePatterns": [
82
- "/^ext/build_common\\.sh$/"
83
- ],
84
- "matchStrings": [
85
- "readonly LIBRDKAFKA_VERSION=\"(?<currentValue>.*)\""
86
- ],
87
- "depNameTemplate": "confluentinc/librdkafka",
88
- "datasourceTemplate": "github-releases",
89
- "extractVersionTemplate": "^v(?<version>.*)$"
90
78
  }
91
79
  ]
92
80
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka-rdkafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thijs Cadier
@@ -172,51 +172,16 @@ extensions:
172
172
  - ext/Rakefile
173
173
  extra_rdoc_files: []
174
174
  files:
175
- - ".github/CODEOWNERS"
176
- - ".github/FUNDING.yml"
177
- - ".github/workflows/ci_linux_alpine_x86_64_musl.yml"
178
- - ".github/workflows/ci_linux_alpine_x86_64_musl_complementary.yml"
179
- - ".github/workflows/ci_linux_debian_x86_64_gnu.yml"
180
- - ".github/workflows/ci_linux_debian_x86_64_gnu_complementary.yml"
181
- - ".github/workflows/ci_linux_ubuntu_aarch64_gnu.yml"
182
- - ".github/workflows/ci_linux_ubuntu_aarch64_gnu_complementary.yml"
183
- - ".github/workflows/ci_linux_ubuntu_x86_64_gnu.yml"
184
- - ".github/workflows/ci_linux_ubuntu_x86_64_gnu_complementary.yml"
185
- - ".github/workflows/ci_macos_arm64.yml"
186
- - ".github/workflows/push_linux_aarch64_gnu.yml"
187
- - ".github/workflows/push_linux_x86_64_gnu.yml"
188
- - ".github/workflows/push_linux_x86_64_musl.yml"
189
- - ".github/workflows/push_macos_arm64.yml"
190
- - ".github/workflows/push_ruby.yml"
191
- - ".github/workflows/trigger-wiki-refresh.yml"
192
- - ".github/workflows/verify-action-pins.yml"
193
- - ".gitignore"
194
- - ".rspec"
195
- - ".ruby-gemset"
196
- - ".ruby-version"
197
- - ".yardopts"
198
175
  - CHANGELOG.md
199
176
  - Gemfile
200
177
  - MIT-LICENSE
201
178
  - README.md
202
179
  - Rakefile
203
- - dist/cyrus-sasl-2.1.28.tar.gz
204
- - dist/krb5-1.21.3.tar.gz
205
- - dist/librdkafka-2.11.0.tar.gz
206
- - dist/openssl-3.0.16.tar.gz
180
+ - dist/librdkafka-2.11.1.tar.gz
207
181
  - dist/patches/rdkafka_global_init.patch
208
- - dist/zlib-1.3.1.tar.gz
209
- - dist/zstd-1.5.7.tar.gz
210
182
  - docker-compose-ssl.yml
211
183
  - docker-compose.yml
212
- - ext/README.md
213
184
  - ext/Rakefile
214
- - ext/build_common.sh
215
- - ext/build_linux_aarch64_gnu.sh
216
- - ext/build_linux_x86_64_gnu.sh
217
- - ext/build_linux_x86_64_musl.sh
218
- - ext/build_macos_arm64.sh
219
- - ext/generate-ssl-certs.sh
220
185
  - karafka-rdkafka.gemspec
221
186
  - lib/rdkafka.rb
222
187
  - lib/rdkafka/abstract_handle.rb
@@ -261,35 +226,6 @@ files:
261
226
  - lib/rdkafka/producer/partitions_count_cache.rb
262
227
  - lib/rdkafka/version.rb
263
228
  - renovate.json
264
- - spec/integrations/ssl_stress_spec.rb
265
- - spec/lib/rdkafka/abstract_handle_spec.rb
266
- - spec/lib/rdkafka/admin/create_acl_handle_spec.rb
267
- - spec/lib/rdkafka/admin/create_acl_report_spec.rb
268
- - spec/lib/rdkafka/admin/create_topic_handle_spec.rb
269
- - spec/lib/rdkafka/admin/create_topic_report_spec.rb
270
- - spec/lib/rdkafka/admin/delete_acl_handle_spec.rb
271
- - spec/lib/rdkafka/admin/delete_acl_report_spec.rb
272
- - spec/lib/rdkafka/admin/delete_topic_handle_spec.rb
273
- - spec/lib/rdkafka/admin/delete_topic_report_spec.rb
274
- - spec/lib/rdkafka/admin/describe_acl_handle_spec.rb
275
- - spec/lib/rdkafka/admin/describe_acl_report_spec.rb
276
- - spec/lib/rdkafka/admin_spec.rb
277
- - spec/lib/rdkafka/bindings_spec.rb
278
- - spec/lib/rdkafka/callbacks_spec.rb
279
- - spec/lib/rdkafka/config_spec.rb
280
- - spec/lib/rdkafka/consumer/headers_spec.rb
281
- - spec/lib/rdkafka/consumer/message_spec.rb
282
- - spec/lib/rdkafka/consumer/partition_spec.rb
283
- - spec/lib/rdkafka/consumer/topic_partition_list_spec.rb
284
- - spec/lib/rdkafka/consumer_spec.rb
285
- - spec/lib/rdkafka/error_spec.rb
286
- - spec/lib/rdkafka/metadata_spec.rb
287
- - spec/lib/rdkafka/native_kafka_spec.rb
288
- - spec/lib/rdkafka/producer/delivery_handle_spec.rb
289
- - spec/lib/rdkafka/producer/delivery_report_spec.rb
290
- - spec/lib/rdkafka/producer/partitions_count_cache_spec.rb
291
- - spec/lib/rdkafka/producer_spec.rb
292
- - spec/spec_helper.rb
293
229
  licenses:
294
230
  - MIT
295
231
  metadata:
@@ -307,7 +243,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
307
243
  requirements:
308
244
  - - ">="
309
245
  - !ruby/object:Gem::Version
310
- version: '3.1'
246
+ version: '3.2'
311
247
  required_rubygems_version: !ruby/object:Gem::Requirement
312
248
  requirements:
313
249
  - - ">="
data/.github/CODEOWNERS DELETED
@@ -1,3 +0,0 @@
1
- /.github @mensfeld
2
- /.github/workflows/ @mensfeld
3
- /.github/actions/ @mensfeld
data/.github/FUNDING.yml DELETED
@@ -1 +0,0 @@
1
- custom: ['https://karafka.io/#become-pro']
@@ -1,197 +0,0 @@
1
- # Why We Build and Run Without Caching Native Extensions
2
- #
3
- # We intentionally compile the native librdkafka library fresh in each test job
4
- # rather than caching or pre-building it for several reasons:
5
- #
6
- # 1. Architecture Compatibility
7
- # - Pre-built native libraries (.so files) are architecture-specific
8
- # - Can cause "Exec format error" when build/runtime environments differ
9
- # - Building in the same container guarantees compatibility
10
- #
11
- # 2. Container Image Variations
12
- # - Different Ruby Alpine images may have subtle differences in:
13
- # * Base system libraries, compiler toolchains, musl libc versions
14
- # - These differences can cause pre-built libraries to fail at runtime
15
- #
16
- # 3. Simplicity and Reliability
17
- # - Single source of truth: everything builds and runs in same environment
18
- # - No artifact management complexity or potential upload/download failures
19
- # - Easier debugging when issues are contained in one job
20
- #
21
- # Trade-offs: Slightly longer CI times (~2-3 min per job) but much more reliable
22
- # than dealing with architecture mismatches and artifact corruption issues.
23
-
24
- name: CI Linux Alpine x86_64 musl
25
-
26
- concurrency:
27
- group: ${{ github.workflow }}-${{ github.ref }}
28
- cancel-in-progress: true
29
-
30
- on:
31
- pull_request:
32
- branches: [ main, master ]
33
- push:
34
- branches: [ main, master ]
35
- schedule:
36
- - cron: '0 1 * * *'
37
-
38
- permissions:
39
- contents: read
40
-
41
- env:
42
- BUNDLE_RETRY: 6
43
- BUNDLE_JOBS: 4
44
-
45
- jobs:
46
- specs_install:
47
- timeout-minutes: 45
48
- runs-on: ubuntu-latest
49
- strategy:
50
- fail-fast: false
51
- matrix:
52
- include:
53
- - ruby: '3.1'
54
- alpine_version: '3.21'
55
- - ruby: '3.2'
56
- alpine_version: '3.21'
57
- - ruby: '3.2'
58
- alpine_version: '3.22'
59
- - ruby: '3.3'
60
- alpine_version: '3.21'
61
- - ruby: '3.3'
62
- alpine_version: '3.22'
63
- - ruby: '3.4'
64
- alpine_version: '3.21'
65
- coverage: 'true'
66
- - ruby: '3.4'
67
- alpine_version: '3.22'
68
- coverage: 'true'
69
- steps:
70
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
71
- with:
72
- fetch-depth: 0
73
-
74
- - name: Start Kafka with Docker Compose
75
- run: |
76
- docker compose -f docker-compose.yml up -d
77
- echo "Waiting for Kafka to be ready..."
78
- sleep 10
79
- for i in {1..30}; do
80
- if docker compose exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; then
81
- echo "Kafka topics command succeeded!"
82
- break
83
- fi
84
- sleep 2
85
- done
86
-
87
- - name: Run all specs in PLAINTEXT
88
- env:
89
- GITHUB_COVERAGE: ${{ matrix.coverage }}
90
- run: |
91
- docker run --rm \
92
- --network host \
93
- -v "${{ github.workspace }}:/workspace" \
94
- -w /workspace \
95
- -e "GITHUB_COVERAGE=${{ matrix.coverage }}" \
96
- ruby:${{ matrix.ruby }}-alpine${{ matrix.alpine_version }} \
97
- sh -c 'apk add --no-cache git curl ca-certificates build-base linux-headers \
98
- pkgconf perl autoconf automake libtool bison flex file \
99
- ruby-dev ruby-bundler bash zstd-dev zlib zlib-dev openssl-dev \
100
- cyrus-sasl-dev cyrus-sasl cyrus-sasl-login \
101
- cyrus-sasl-crammd5 cyrus-sasl-digestmd5 cyrus-sasl-gssapiv2 cyrus-sasl-scram \
102
- krb5-libs openssl zlib zstd-libs && \
103
- git config --global --add safe.directory /workspace && \
104
- bundle config set --local path vendor/bundle && \
105
- bundle install && \
106
- cd ext && bundle exec rake && \
107
- cd .. && \
108
- bundle exec ruby -S rspec'
109
-
110
- build_precompiled:
111
- timeout-minutes: 45
112
- runs-on: ubuntu-latest
113
- container:
114
- # Similar to GNU, we build on the oldest for ABI compatibility
115
- image: alpine:3.18@sha256:de0eb0b3f2a47ba1eb89389859a9bd88b28e82f5826b6969ad604979713c2d4f # renovate: ignore
116
- steps:
117
- - name: Install dependencies
118
- run: |
119
- apk add --no-cache git curl ca-certificates build-base linux-headers \
120
- pkgconf perl autoconf automake libtool bison flex file bash wget zstd-dev \
121
- openssl-dev cyrus-sasl-dev cyrus-sasl cyrus-sasl-login \
122
- cyrus-sasl-crammd5 cyrus-sasl-digestmd5 cyrus-sasl-gssapiv2 cyrus-sasl-scram \
123
- krb5-libs openssl zlib zlib-dev zstd-libs
124
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
125
- with:
126
- fetch-depth: 0
127
- - name: Configure git safe directory
128
- run: git config --global --add safe.directory /__w/karafka-rdkafka/karafka-rdkafka
129
- - name: Cache build-tmp directory
130
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
131
- with:
132
- path: ext/build-tmp-musl
133
- key: build-tmp-musl-${{ runner.os }}-${{ hashFiles('ext/*.sh', 'ext/Rakefile') }}-v2
134
- - name: Build precompiled librdkafka.so
135
- run: |
136
- cd ext
137
- bash ./build_linux_x86_64_musl.sh
138
- - name: Upload precompiled library
139
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
140
- with:
141
- name: librdkafka-precompiled-musl
142
- path: ext/
143
- retention-days: 1
144
-
145
- specs_precompiled:
146
- timeout-minutes: 30
147
- runs-on: ubuntu-latest
148
- needs: build_precompiled
149
- strategy:
150
- fail-fast: false
151
- matrix:
152
- ruby:
153
- - '3.4'
154
- - '3.3'
155
- - '3.2'
156
- - '3.1'
157
- include:
158
- - ruby: '3.4'
159
- coverage: 'true'
160
- steps:
161
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
162
- with:
163
- fetch-depth: 0
164
- - name: Download precompiled library
165
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
166
- with:
167
- name: librdkafka-precompiled-musl
168
- path: ext/
169
- - name: Start Kafka with Docker Compose
170
- run: |
171
- docker compose -f docker-compose.yml up -d
172
- echo "Waiting for Kafka to be ready..."
173
- sleep 10
174
-
175
- for i in {1..30}; do
176
- if docker compose exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; then
177
- echo "Kafka topics command succeeded!"
178
- break
179
- fi
180
- sleep 2
181
- done
182
- - name: Run specs with precompiled library and PLAINTEXT
183
- env:
184
- GITHUB_COVERAGE: ${{ matrix.coverage }}
185
- RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
186
- run: |
187
- docker run --rm \
188
- --network host \
189
- -v "${{ github.workspace }}:/workspace" \
190
- -w /workspace \
191
- -e "GITHUB_COVERAGE=${{ matrix.coverage }}" \
192
- -e "RDKAFKA_EXT_PATH=/workspace/ext" \
193
- ruby:${{ matrix.ruby }}-alpine \
194
- sh -c 'apk add --no-cache git build-base linux-headers bash && \
195
- git config --global --add safe.directory /workspace && \
196
- bundle config set --local path vendor/bundle && \
197
- bundle install && bundle exec ruby -S rspec'