karafka-rdkafka 0.21.0.rc2-aarch64-linux-gnu → 0.22.0-aarch64-linux-gnu
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/README.md +2 -1
- data/ext/librdkafka.so +0 -0
- data/karafka-rdkafka.gemspec +33 -6
- data/lib/rdkafka/version.rb +3 -3
- data/renovate.json +5 -17
- metadata +2 -67
- data/.github/CODEOWNERS +0 -3
- data/.github/FUNDING.yml +0 -1
- data/.github/workflows/ci_linux_alpine_x86_64_musl.yml +0 -197
- data/.github/workflows/ci_linux_alpine_x86_64_musl_complementary.yml +0 -264
- data/.github/workflows/ci_linux_debian_x86_64_gnu.yml +0 -271
- data/.github/workflows/ci_linux_debian_x86_64_gnu_complementary.yml +0 -334
- data/.github/workflows/ci_linux_ubuntu_aarch64_gnu.yml +0 -271
- data/.github/workflows/ci_linux_ubuntu_aarch64_gnu_complementary.yml +0 -295
- data/.github/workflows/ci_linux_ubuntu_x86_64_gnu.yml +0 -281
- data/.github/workflows/ci_linux_ubuntu_x86_64_gnu_complementary.yml +0 -294
- data/.github/workflows/ci_macos_arm64.yml +0 -284
- data/.github/workflows/push_linux_aarch64_gnu.yml +0 -65
- data/.github/workflows/push_linux_x86_64_gnu.yml +0 -65
- data/.github/workflows/push_linux_x86_64_musl.yml +0 -79
- data/.github/workflows/push_macos_arm64.yml +0 -54
- data/.github/workflows/push_ruby.yml +0 -37
- data/.github/workflows/trigger-wiki-refresh.yml +0 -30
- data/.github/workflows/verify-action-pins.yml +0 -16
- data/.gitignore +0 -16
- data/.rspec +0 -3
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
- data/.yardopts +0 -2
- data/dist/cyrus-sasl-2.1.28.tar.gz +0 -0
- data/dist/krb5-1.21.3.tar.gz +0 -0
- data/dist/openssl-3.0.16.tar.gz +0 -0
- data/dist/zlib-1.3.1.tar.gz +0 -0
- data/dist/zstd-1.5.7.tar.gz +0 -0
- data/ext/README.md +0 -19
- data/ext/Rakefile +0 -131
- data/ext/build_common.sh +0 -376
- data/ext/build_linux_aarch64_gnu.sh +0 -326
- data/ext/build_linux_x86_64_gnu.sh +0 -317
- data/ext/build_linux_x86_64_musl.sh +0 -773
- data/ext/build_macos_arm64.sh +0 -557
- data/ext/generate-ssl-certs.sh +0 -109
- data/spec/integrations/ssl_stress_spec.rb +0 -121
- data/spec/lib/rdkafka/abstract_handle_spec.rb +0 -117
- data/spec/lib/rdkafka/admin/create_acl_handle_spec.rb +0 -56
- data/spec/lib/rdkafka/admin/create_acl_report_spec.rb +0 -18
- data/spec/lib/rdkafka/admin/create_topic_handle_spec.rb +0 -54
- data/spec/lib/rdkafka/admin/create_topic_report_spec.rb +0 -16
- data/spec/lib/rdkafka/admin/delete_acl_handle_spec.rb +0 -85
- data/spec/lib/rdkafka/admin/delete_acl_report_spec.rb +0 -72
- data/spec/lib/rdkafka/admin/delete_topic_handle_spec.rb +0 -54
- data/spec/lib/rdkafka/admin/delete_topic_report_spec.rb +0 -16
- data/spec/lib/rdkafka/admin/describe_acl_handle_spec.rb +0 -85
- data/spec/lib/rdkafka/admin/describe_acl_report_spec.rb +0 -73
- data/spec/lib/rdkafka/admin_spec.rb +0 -982
- data/spec/lib/rdkafka/bindings_spec.rb +0 -198
- data/spec/lib/rdkafka/callbacks_spec.rb +0 -20
- data/spec/lib/rdkafka/config_spec.rb +0 -258
- data/spec/lib/rdkafka/consumer/headers_spec.rb +0 -73
- data/spec/lib/rdkafka/consumer/message_spec.rb +0 -139
- data/spec/lib/rdkafka/consumer/partition_spec.rb +0 -57
- data/spec/lib/rdkafka/consumer/topic_partition_list_spec.rb +0 -248
- data/spec/lib/rdkafka/consumer_spec.rb +0 -1343
- data/spec/lib/rdkafka/error_spec.rb +0 -95
- data/spec/lib/rdkafka/metadata_spec.rb +0 -79
- data/spec/lib/rdkafka/native_kafka_spec.rb +0 -130
- data/spec/lib/rdkafka/producer/delivery_handle_spec.rb +0 -60
- data/spec/lib/rdkafka/producer/delivery_report_spec.rb +0 -25
- data/spec/lib/rdkafka/producer/partitions_count_cache_spec.rb +0 -359
- data/spec/lib/rdkafka/producer_spec.rb +0 -1527
- data/spec/spec_helper.rb +0 -230
@@ -1,334 +0,0 @@
|
|
1
|
-
# CI Strategy: Complementary Testing for SSL and System Library Regressions
|
2
|
-
#
|
3
|
-
# This workflow runs complementary tests that don't need to block PRs but are essential
|
4
|
-
# for catching regressions in SSL functionality and system library compatibility.
|
5
|
-
# It complements the main CI by testing stable-but-critical functionality on a nightly
|
6
|
-
# schedule and when workflow changes are made.
|
7
|
-
#
|
8
|
-
# WHY COMPLEMENTARY TESTING:
|
9
|
-
# - SSL specs have been stable for 3+ years and rarely break due to code changes
|
10
|
-
# - Integration specs test OS library compatibility, which changes with system updates
|
11
|
-
# - These tests catch regressions from external changes (OpenSSL updates, system libs)
|
12
|
-
# - Running every 3 days to prevent these slower tests from blocking PR velocity
|
13
|
-
# - Manual triggering allows testing workflow changes before they go into schedule
|
14
|
-
#
|
15
|
-
# WHY WE TEST DEBIAN BOOKWORM AND TRIXIE:
|
16
|
-
# - Different OpenSSL versions and SSL library implementations
|
17
|
-
# - Different system library versions that affect SSL handshakes and compatibility
|
18
|
-
# - Forward compatibility testing with Trixie (Debian testing/future stable)
|
19
|
-
# - Catching SSL regressions from package updates in both stable and testing
|
20
|
-
#
|
21
|
-
# SSL TESTING (specs_install + specs_precompiled):
|
22
|
-
# - Tests SSL/TLS connectivity with Kafka using docker-compose-ssl.yml
|
23
|
-
# - Validates certificate handling and SSL handshakes across Ruby and Debian versions
|
24
|
-
# - Ensures SSL works with both compiled-from-source and precompiled flows
|
25
|
-
# - Catches OpenSSL version compatibility issues and SSL library regressions
|
26
|
-
# - Tests real SSL scenarios that mirror production deployments
|
27
|
-
#
|
28
|
-
# INTEGRATION TESTING (integration specs in both jobs):
|
29
|
-
# - Tests system library compatibility without requiring Kafka infrastructure
|
30
|
-
# - Validates libssl, libsasl2, libzstd, zlib integration across OS versions
|
31
|
-
# - Ensures native extensions work with different system library versions
|
32
|
-
# - Catches regressions from Debian package updates and system changes
|
33
|
-
# - Tests both compilation and precompiled library compatibility
|
34
|
-
#
|
35
|
-
# SCHEDULING STRATEGY:
|
36
|
-
# - Runs every 3 days at 3 AM to catch system/library changes from base image updates
|
37
|
-
# - Triggers on workflow file changes to validate CI modifications
|
38
|
-
# - Manual dispatch available for ad-hoc regression testing
|
39
|
-
# - Separate artifact naming prevents interference with main CI
|
40
|
-
#
|
41
|
-
# This approach ensures comprehensive coverage while keeping PR CI fast and focused
|
42
|
-
# on code-related issues rather than infrastructure/system regressions.
|
43
|
-
|
44
|
-
name: CI Linux Complementary Debian Multi-Version x86_64 GNU
|
45
|
-
|
46
|
-
concurrency:
|
47
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
48
|
-
cancel-in-progress: true
|
49
|
-
|
50
|
-
on:
|
51
|
-
schedule:
|
52
|
-
- cron: '0 3 */3 * *'
|
53
|
-
workflow_dispatch:
|
54
|
-
push:
|
55
|
-
paths:
|
56
|
-
- '.github/workflows/ci_linux_debian_x86_64_gnu_complementary.yml'
|
57
|
-
branches: [ main, master ]
|
58
|
-
pull_request:
|
59
|
-
paths:
|
60
|
-
- '.github/workflows/ci_linux_debian_x86_64_gnu_complementary.yml'
|
61
|
-
branches: [ main, master ]
|
62
|
-
|
63
|
-
permissions:
|
64
|
-
contents: read
|
65
|
-
|
66
|
-
env:
|
67
|
-
BUNDLE_RETRY: 6
|
68
|
-
BUNDLE_JOBS: 4
|
69
|
-
|
70
|
-
jobs:
|
71
|
-
build_precompiled:
|
72
|
-
timeout-minutes: 50
|
73
|
-
strategy:
|
74
|
-
fail-fast: false
|
75
|
-
matrix:
|
76
|
-
debian:
|
77
|
-
- 'bookworm'
|
78
|
-
- 'trixie'
|
79
|
-
runs-on: ubuntu-22.04 # renovate: ignore
|
80
|
-
steps:
|
81
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
82
|
-
with:
|
83
|
-
fetch-depth: 0
|
84
|
-
- name: Install build dependencies
|
85
|
-
run: |
|
86
|
-
sudo apt-get update
|
87
|
-
sudo apt-get install -y --no-install-recommends \
|
88
|
-
build-essential \
|
89
|
-
gcc \
|
90
|
-
g++ \
|
91
|
-
make \
|
92
|
-
tar \
|
93
|
-
gzip \
|
94
|
-
wget \
|
95
|
-
curl \
|
96
|
-
file \
|
97
|
-
pkg-config \
|
98
|
-
autoconf \
|
99
|
-
automake \
|
100
|
-
libtool \
|
101
|
-
python3 \
|
102
|
-
git \
|
103
|
-
ca-certificates \
|
104
|
-
patch \
|
105
|
-
libsasl2-dev \
|
106
|
-
libssl-dev \
|
107
|
-
zlib1g-dev \
|
108
|
-
libzstd-dev \
|
109
|
-
bison \
|
110
|
-
flex \
|
111
|
-
perl \
|
112
|
-
binutils-dev
|
113
|
-
- name: Cache build-tmp directory
|
114
|
-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
115
|
-
with:
|
116
|
-
path: ext/build-tmp
|
117
|
-
key: build-tmp-complementary-${{ runner.os }}-${{ matrix.debian }}-${{ hashFiles('ext/*.sh', 'ext/Rakefile') }}-v2
|
118
|
-
- name: Build precompiled librdkafka.so
|
119
|
-
run: |
|
120
|
-
cd ext
|
121
|
-
./build_linux_x86_64_gnu.sh
|
122
|
-
- name: Upload precompiled library
|
123
|
-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
124
|
-
with:
|
125
|
-
name: librdkafka-precompiled-linux-complementary-${{ matrix.debian }}
|
126
|
-
path: ext/
|
127
|
-
retention-days: 1
|
128
|
-
|
129
|
-
specs_install:
|
130
|
-
timeout-minutes: 50
|
131
|
-
strategy:
|
132
|
-
fail-fast: false
|
133
|
-
matrix:
|
134
|
-
ruby:
|
135
|
-
- '3.4'
|
136
|
-
- '3.3'
|
137
|
-
- '3.2'
|
138
|
-
- '3.1'
|
139
|
-
debian:
|
140
|
-
- 'bookworm'
|
141
|
-
- 'trixie'
|
142
|
-
exclude:
|
143
|
-
- ruby: '3.1'
|
144
|
-
debian: 'trixie'
|
145
|
-
runs-on: ubuntu-latest
|
146
|
-
steps:
|
147
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
148
|
-
with:
|
149
|
-
fetch-depth: 0
|
150
|
-
|
151
|
-
- name: Start Kafka with Docker Compose
|
152
|
-
run: |
|
153
|
-
./ext/generate-ssl-certs.sh
|
154
|
-
docker compose -f docker-compose-ssl.yml up -d
|
155
|
-
echo "Waiting for Kafka to be ready..."
|
156
|
-
sleep 10
|
157
|
-
for i in {1..30}; do
|
158
|
-
if docker compose exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; then
|
159
|
-
echo "Kafka topics command succeeded!"
|
160
|
-
break
|
161
|
-
fi
|
162
|
-
sleep 2
|
163
|
-
done
|
164
|
-
|
165
|
-
- name: Install dependencies
|
166
|
-
env:
|
167
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
168
|
-
run: |
|
169
|
-
docker run --rm \
|
170
|
-
--network host \
|
171
|
-
-v "${{ github.workspace }}:/workspace" \
|
172
|
-
-w /workspace \
|
173
|
-
-e "RDKAFKA_EXT_PATH=/workspace/ext" \
|
174
|
-
ruby:${{ matrix.ruby }}-${{ matrix.debian }} \
|
175
|
-
sh -c 'apt-get update && \
|
176
|
-
apt-get upgrade -y openssl libssl3 libssl-dev && \
|
177
|
-
apt-get install -y git build-essential pkg-config \
|
178
|
-
libssl-dev libsasl2-dev zlib1g-dev libzstd-dev && \
|
179
|
-
git config --global --add safe.directory /workspace && \
|
180
|
-
bundle config set --local path vendor/bundle && \
|
181
|
-
bundle install'
|
182
|
-
|
183
|
-
- name: Build gem with mini_portile
|
184
|
-
run: |
|
185
|
-
docker run --rm \
|
186
|
-
--network host \
|
187
|
-
-v "${{ github.workspace }}:/workspace" \
|
188
|
-
-w /workspace \
|
189
|
-
ruby:${{ matrix.ruby }}-${{ matrix.debian }} \
|
190
|
-
sh -c 'apt-get update && \
|
191
|
-
apt-get upgrade -y openssl libssl3 libssl-dev && \
|
192
|
-
apt-get install -y git build-essential pkg-config \
|
193
|
-
libssl-dev libsasl2-dev zlib1g-dev libzstd-dev && \
|
194
|
-
git config --global --add safe.directory /workspace && \
|
195
|
-
bundle config set --local path vendor/bundle && \
|
196
|
-
bundle install && \
|
197
|
-
cd ext && bundle exec rake'
|
198
|
-
|
199
|
-
- name: Run all specs in SSL (compiled flow)
|
200
|
-
env:
|
201
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
202
|
-
KAFKA_SSL_ENABLED: "true"
|
203
|
-
run: |
|
204
|
-
docker run --rm \
|
205
|
-
--network host \
|
206
|
-
-v "${{ github.workspace }}:/workspace" \
|
207
|
-
-w /workspace \
|
208
|
-
-e "RDKAFKA_EXT_PATH=/workspace/ext" \
|
209
|
-
-e "KAFKA_SSL_ENABLED=true" \
|
210
|
-
ruby:${{ matrix.ruby }}-${{ matrix.debian }} \
|
211
|
-
sh -c 'apt-get update && \
|
212
|
-
apt-get upgrade -y openssl libssl3 libssl-dev && \
|
213
|
-
apt-get install -y git build-essential pkg-config \
|
214
|
-
libssl-dev libsasl2-dev zlib1g-dev libzstd-dev default-jdk && \
|
215
|
-
git config --global --add safe.directory /workspace && \
|
216
|
-
bundle config set --local path vendor/bundle && \
|
217
|
-
bundle install && \
|
218
|
-
echo "=== SSL Library Versions (${{ matrix.debian }}) ===" && \
|
219
|
-
openssl version && \
|
220
|
-
dpkg -l | grep -E "(libssl|openssl)" && \
|
221
|
-
echo "=== Running SSL Specs (Compiled) ===" && \
|
222
|
-
bundle exec rspec'
|
223
|
-
|
224
|
-
- name: Run integration specs (compiled flow)
|
225
|
-
run: |
|
226
|
-
docker run --rm \
|
227
|
-
-v "${{ github.workspace }}:/workspace" \
|
228
|
-
-w /workspace \
|
229
|
-
ruby:${{ matrix.ruby }}-${{ matrix.debian }} \
|
230
|
-
sh -c 'apt-get update && \
|
231
|
-
apt-get upgrade -y openssl libssl3 libssl-dev && \
|
232
|
-
apt-get install -y git build-essential pkg-config \
|
233
|
-
libssl-dev libsasl2-dev zlib1g-dev libzstd-dev libcurl4-openssl-dev libcurl4 && \
|
234
|
-
git config --global --add safe.directory /workspace && \
|
235
|
-
bundle config set --local path vendor/bundle && \
|
236
|
-
bundle install && \
|
237
|
-
echo "=== OS Library Versions (${{ matrix.debian }}) ===" && \
|
238
|
-
openssl version && \
|
239
|
-
dpkg -l | grep -E "(libssl|libsasl|libzstd|zlib)" && \
|
240
|
-
echo "=== Running Integration Specs (Compiled) ===" && \
|
241
|
-
for file in $(ls spec/integrations/*_spec.rb); do \
|
242
|
-
echo "Running $file with Ruby ${{ matrix.ruby }} on ${{ matrix.debian }}"; \
|
243
|
-
bundle exec ruby "$file" || exit 1; \
|
244
|
-
done'
|
245
|
-
|
246
|
-
specs_precompiled:
|
247
|
-
timeout-minutes: 50
|
248
|
-
needs: build_precompiled
|
249
|
-
strategy:
|
250
|
-
fail-fast: false
|
251
|
-
matrix:
|
252
|
-
ruby:
|
253
|
-
- '3.4'
|
254
|
-
- '3.3'
|
255
|
-
- '3.2'
|
256
|
-
- '3.1'
|
257
|
-
debian:
|
258
|
-
- 'bookworm'
|
259
|
-
- 'trixie'
|
260
|
-
exclude:
|
261
|
-
- ruby: '3.1'
|
262
|
-
debian: 'trixie'
|
263
|
-
runs-on: ubuntu-latest
|
264
|
-
steps:
|
265
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
266
|
-
with:
|
267
|
-
fetch-depth: 0
|
268
|
-
- name: Download precompiled library
|
269
|
-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
270
|
-
with:
|
271
|
-
name: librdkafka-precompiled-linux-complementary-${{ matrix.debian }}
|
272
|
-
path: ext/
|
273
|
-
|
274
|
-
- name: Start Kafka with Docker Compose
|
275
|
-
run: |
|
276
|
-
./ext/generate-ssl-certs.sh
|
277
|
-
docker compose -f docker-compose-ssl.yml up -d
|
278
|
-
echo "Waiting for Kafka to be ready..."
|
279
|
-
sleep 10
|
280
|
-
for i in {1..30}; do
|
281
|
-
if docker compose exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; then
|
282
|
-
echo "Kafka topics command succeeded!"
|
283
|
-
break
|
284
|
-
fi
|
285
|
-
sleep 2
|
286
|
-
done
|
287
|
-
|
288
|
-
- name: Run specs with precompiled library and SSL
|
289
|
-
env:
|
290
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
291
|
-
KAFKA_SSL_ENABLED: "true"
|
292
|
-
run: |
|
293
|
-
docker run --rm \
|
294
|
-
--network host \
|
295
|
-
-v "${{ github.workspace }}:/workspace" \
|
296
|
-
-w /workspace \
|
297
|
-
-e "RDKAFKA_EXT_PATH=/workspace/ext" \
|
298
|
-
-e "KAFKA_SSL_ENABLED=true" \
|
299
|
-
ruby:${{ matrix.ruby }}-${{ matrix.debian }} \
|
300
|
-
sh -c 'apt-get update && \
|
301
|
-
apt-get install -y git default-jdk && \
|
302
|
-
git config --global --add safe.directory /workspace && \
|
303
|
-
bundle config set --local path vendor/bundle && \
|
304
|
-
bundle install && \
|
305
|
-
echo "=== SSL Library Versions (${{ matrix.debian }}) ===" && \
|
306
|
-
openssl version && \
|
307
|
-
dpkg -l | grep -E "(libssl|openssl)" && \
|
308
|
-
echo "=== Running SSL Specs (Precompiled) ===" && \
|
309
|
-
bundle exec rspec'
|
310
|
-
|
311
|
-
- name: Run integration specs (precompiled flow)
|
312
|
-
env:
|
313
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
314
|
-
run: |
|
315
|
-
docker run --rm \
|
316
|
-
-v "${{ github.workspace }}:/workspace" \
|
317
|
-
-w /workspace \
|
318
|
-
-e "RDKAFKA_EXT_PATH=/workspace/ext" \
|
319
|
-
ruby:${{ matrix.ruby }}-${{ matrix.debian }} \
|
320
|
-
sh -c 'apt-get update && \
|
321
|
-
apt-get upgrade -y openssl libssl3 libssl-dev && \
|
322
|
-
apt-get install -y git build-essential pkg-config \
|
323
|
-
libssl-dev libsasl2-dev zlib1g-dev libzstd-dev libcurl4-openssl-dev libcurl4 && \
|
324
|
-
git config --global --add safe.directory /workspace && \
|
325
|
-
bundle config set --local path vendor/bundle && \
|
326
|
-
bundle install && \
|
327
|
-
echo "=== OS Library Versions (${{ matrix.debian }}) ===" && \
|
328
|
-
openssl version && \
|
329
|
-
dpkg -l | grep -E "(libssl|libsasl|libzstd|zlib)" && \
|
330
|
-
echo "=== Running Integration Specs (Precompiled) ===" && \
|
331
|
-
for file in $(ls spec/integrations/*_spec.rb); do \
|
332
|
-
echo "Running $file with Ruby ${{ matrix.ruby }} on ${{ matrix.debian }} (precompiled)"; \
|
333
|
-
bundle exec ruby "$file" || exit 1; \
|
334
|
-
done'
|
@@ -1,271 +0,0 @@
|
|
1
|
-
# CI Strategy: Comprehensive Testing of Build and Precompiled Flows
|
2
|
-
#
|
3
|
-
# This workflow tests both compilation-from-source and precompiled binary distribution
|
4
|
-
# strategies across multiple Ubuntu and Ruby versions to ensure broad compatibility and
|
5
|
-
# reliability.
|
6
|
-
#
|
7
|
-
# WHY WE TEST BOTH UBUNTU 22.04 AND 24.04:
|
8
|
-
# - Different system library versions (OpenSSL, zlib, libsasl2, libzstd, etc.)
|
9
|
-
# - Different GCC compiler versions that affect native extension compilation
|
10
|
-
# - Different glibc versions that can impact binary compatibility
|
11
|
-
# - Real-world deployment scenarios where users run on various Ubuntu LTS versions
|
12
|
-
# - Different Ruby versions
|
13
|
-
#
|
14
|
-
# COMPILATION FLOW (build_install + specs_install):
|
15
|
-
# - Tests that librdkafka compiles correctly from source on each Ubuntu version
|
16
|
-
# - Validates that mini_portile2 can successfully build native dependencies
|
17
|
-
# - Ensures Ruby native extensions link properly with system libraries
|
18
|
-
# - Verifies that the same codebase works across different toolchain versions
|
19
|
-
#
|
20
|
-
# PRECOMPILED FLOW (build_precompiled + specs_precompiled):
|
21
|
-
# - Tests our precompiled static libraries work on different Ubuntu versions
|
22
|
-
# - Validates that statically-linked binaries are truly portable across environments
|
23
|
-
# - Ensures precompiled libraries don't have unexpected system dependencies
|
24
|
-
# - Verifies that removing build tools doesn't break precompiled binary usage
|
25
|
-
#
|
26
|
-
# ARTIFACT ISOLATION:
|
27
|
-
# - Each Ubuntu version gets separate artifacts (rdkafka-built-gem-22.04, etc.)
|
28
|
-
# - Prevents cross-contamination of OS-specific compiled extensions
|
29
|
-
# - Ensures test accuracy by matching build and test environments
|
30
|
-
#
|
31
|
-
# This comprehensive approach catches issues that single-platform testing would miss,
|
32
|
-
# such as system library incompatibilities, compiler-specific bugs, or static linking
|
33
|
-
# problems that only manifest on specific Ubuntu versions.
|
34
|
-
|
35
|
-
name: CI Linux Ubuntu aarch64 GNU
|
36
|
-
|
37
|
-
concurrency:
|
38
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
39
|
-
cancel-in-progress: true
|
40
|
-
|
41
|
-
on:
|
42
|
-
pull_request:
|
43
|
-
branches: [ main, master ]
|
44
|
-
push:
|
45
|
-
branches: [ main, master ]
|
46
|
-
schedule:
|
47
|
-
- cron: '0 4 * * *'
|
48
|
-
|
49
|
-
permissions:
|
50
|
-
contents: read
|
51
|
-
|
52
|
-
env:
|
53
|
-
BUNDLE_RETRY: 6
|
54
|
-
BUNDLE_JOBS: 4
|
55
|
-
|
56
|
-
jobs:
|
57
|
-
specs_install:
|
58
|
-
timeout-minutes: 45
|
59
|
-
strategy:
|
60
|
-
fail-fast: false
|
61
|
-
matrix:
|
62
|
-
ruby:
|
63
|
-
- '3.5.0-preview1'
|
64
|
-
- '3.4'
|
65
|
-
- '3.3'
|
66
|
-
- '3.2'
|
67
|
-
- '3.1'
|
68
|
-
- 'jruby-10.0'
|
69
|
-
ubuntu-version: ['22.04', '24.04']
|
70
|
-
include:
|
71
|
-
- ruby: '3.4'
|
72
|
-
coverage: 'true'
|
73
|
-
- ruby: 'jruby-10.0'
|
74
|
-
continue-on-error: true
|
75
|
-
runs-on: ubuntu-${{ matrix.ubuntu-version }}-arm
|
76
|
-
steps:
|
77
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
78
|
-
with:
|
79
|
-
fetch-depth: 0
|
80
|
-
- name: Set up Ruby
|
81
|
-
uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
|
82
|
-
with:
|
83
|
-
ruby-version: ${{matrix.ruby}}
|
84
|
-
bundler-cache: false
|
85
|
-
- name: Start Kafka with Docker Compose
|
86
|
-
run: |
|
87
|
-
docker compose -f docker-compose.yml up -d
|
88
|
-
echo "Waiting for Kafka to be ready..."
|
89
|
-
|
90
|
-
sleep 10
|
91
|
-
|
92
|
-
echo "=== Container status ==="
|
93
|
-
docker compose ps kafka
|
94
|
-
|
95
|
-
for i in {1..30}; do
|
96
|
-
echo "=== Attempt $i/30 ==="
|
97
|
-
|
98
|
-
echo "Testing kafka-topics command..."
|
99
|
-
if docker compose exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; then
|
100
|
-
echo "Kafka topics command succeeded!"
|
101
|
-
break
|
102
|
-
else
|
103
|
-
echo "Kafka topics command failed (exit code: $?)"
|
104
|
-
fi
|
105
|
-
|
106
|
-
echo "Sleeping 2 seconds..."
|
107
|
-
sleep 2
|
108
|
-
done
|
109
|
-
- name: Install dependencies
|
110
|
-
env:
|
111
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
112
|
-
run: |
|
113
|
-
# Only install gems that aren't Ruby-version specific
|
114
|
-
bundle install
|
115
|
-
- name: Build gem with mini_portile
|
116
|
-
run: |
|
117
|
-
set -e
|
118
|
-
cd ext && bundle exec rake
|
119
|
-
cd ..
|
120
|
-
- name: Run all specs in PLAINTEXT
|
121
|
-
env:
|
122
|
-
GITHUB_COVERAGE: ${{matrix.coverage}}
|
123
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
124
|
-
continue-on-error: ${{ matrix.continue-on-error || false }}
|
125
|
-
run: |
|
126
|
-
bundle exec rspec
|
127
|
-
|
128
|
-
build_precompiled:
|
129
|
-
timeout-minutes: 30
|
130
|
-
# We precompile on older Ubuntu and check compatibility by running specs since we aim to
|
131
|
-
# release only one precompiled version for all supported Ubuntu versions
|
132
|
-
# This is why we do not want Renovate to update it automatically
|
133
|
-
runs-on: ubuntu-22.04-arm # renovate: ignore
|
134
|
-
steps:
|
135
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
136
|
-
with:
|
137
|
-
fetch-depth: 0
|
138
|
-
- name: Install build dependencies
|
139
|
-
run: |
|
140
|
-
sudo apt-get update
|
141
|
-
sudo apt-get install -y --no-install-recommends \
|
142
|
-
build-essential \
|
143
|
-
gcc \
|
144
|
-
g++ \
|
145
|
-
make \
|
146
|
-
tar \
|
147
|
-
gzip \
|
148
|
-
wget \
|
149
|
-
curl \
|
150
|
-
file \
|
151
|
-
pkg-config \
|
152
|
-
autoconf \
|
153
|
-
automake \
|
154
|
-
libtool \
|
155
|
-
python3 \
|
156
|
-
git \
|
157
|
-
ca-certificates \
|
158
|
-
patch \
|
159
|
-
libsasl2-dev \
|
160
|
-
libssl-dev \
|
161
|
-
zlib1g-dev \
|
162
|
-
libzstd-dev \
|
163
|
-
bison \
|
164
|
-
flex \
|
165
|
-
perl \
|
166
|
-
binutils-dev
|
167
|
-
- name: Cache build-tmp directory
|
168
|
-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
169
|
-
with:
|
170
|
-
path: ext/build-tmp
|
171
|
-
key: build-tmp-${{ runner.os }}-${{ hashFiles('ext/*.sh', 'ext/Rakefile') }}-v2
|
172
|
-
- name: Build precompiled librdkafka.so
|
173
|
-
run: |
|
174
|
-
cd ext
|
175
|
-
./build_linux_aarch64_gnu.sh
|
176
|
-
- name: Upload precompiled library
|
177
|
-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
178
|
-
with:
|
179
|
-
name: librdkafka-precompiled-linux
|
180
|
-
path: ext/
|
181
|
-
retention-days: 1
|
182
|
-
|
183
|
-
specs_precompiled:
|
184
|
-
timeout-minutes: 30
|
185
|
-
needs: build_precompiled
|
186
|
-
strategy:
|
187
|
-
fail-fast: false
|
188
|
-
matrix:
|
189
|
-
ruby:
|
190
|
-
- '3.5.0-preview1'
|
191
|
-
- '3.4'
|
192
|
-
- '3.3'
|
193
|
-
- '3.2'
|
194
|
-
- '3.1'
|
195
|
-
ubuntu-version: ['22.04', '24.04']
|
196
|
-
include:
|
197
|
-
- ruby: '3.4'
|
198
|
-
ubuntu-version: '24.04'
|
199
|
-
coverage: 'true'
|
200
|
-
|
201
|
-
runs-on: ubuntu-${{ matrix.ubuntu-version }}-arm
|
202
|
-
steps:
|
203
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
204
|
-
with:
|
205
|
-
fetch-depth: 0
|
206
|
-
- name: Download precompiled library
|
207
|
-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
208
|
-
with:
|
209
|
-
name: librdkafka-precompiled-linux
|
210
|
-
path: ext/
|
211
|
-
- name: Set up Ruby
|
212
|
-
uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
|
213
|
-
with:
|
214
|
-
ruby-version: ${{ matrix.ruby }}
|
215
|
-
bundler-cache: false
|
216
|
-
- name: Start Kafka with Docker Compose
|
217
|
-
run: |
|
218
|
-
docker compose -f docker-compose.yml up -d
|
219
|
-
echo "Waiting for Kafka to be ready..."
|
220
|
-
|
221
|
-
sleep 10
|
222
|
-
|
223
|
-
echo "=== Container status ==="
|
224
|
-
docker compose ps kafka
|
225
|
-
for i in {1..30}; do
|
226
|
-
echo "=== Attempt $i/30 ==="
|
227
|
-
|
228
|
-
echo "Testing kafka-topics command..."
|
229
|
-
if docker compose exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; then
|
230
|
-
echo "Kafka topics command succeeded!"
|
231
|
-
break
|
232
|
-
else
|
233
|
-
echo "Kafka topics command failed (exit code: $?)"
|
234
|
-
fi
|
235
|
-
|
236
|
-
echo "Sleeping 2 seconds..."
|
237
|
-
sleep 2
|
238
|
-
done
|
239
|
-
- name: Install bundle with precompiled library
|
240
|
-
env:
|
241
|
-
GITHUB_COVERAGE: ${{ matrix.coverage }}
|
242
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
243
|
-
run: |
|
244
|
-
bundle install
|
245
|
-
echo "Bundle install completed with precompiled library"
|
246
|
-
- name: Remove build dependencies to test static linking
|
247
|
-
continue-on-error: true
|
248
|
-
run: |
|
249
|
-
echo "Removing build dependencies to verify precompiled library is truly self-contained..."
|
250
|
-
|
251
|
-
# Remove packages one by one to avoid dependency conflicts
|
252
|
-
packages_to_remove="build-essential gcc g++ make patch tar wget libsasl2-dev libssl-dev zlib1g-dev libzstd-dev"
|
253
|
-
|
254
|
-
for package in $packages_to_remove; do
|
255
|
-
if dpkg -l | grep -q "^ii.*$package "; then
|
256
|
-
echo "Removing $package..."
|
257
|
-
sudo dpkg --remove --force-depends $package 2>/dev/null || echo "Could not remove $package"
|
258
|
-
else
|
259
|
-
echo "$package is not installed"
|
260
|
-
fi
|
261
|
-
done
|
262
|
-
|
263
|
-
echo "Build dependencies removal completed"
|
264
|
-
echo "Remaining build tools:"
|
265
|
-
which gcc g++ make 2>/dev/null || echo "No build tools found in PATH (good!)"
|
266
|
-
- name: Run specs with precompiled library and PLAINTEXT
|
267
|
-
env:
|
268
|
-
GITHUB_COVERAGE: ${{ matrix.coverage }}
|
269
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
270
|
-
run: |
|
271
|
-
bundle exec rspec
|