karafka-rdkafka 0.20.0.rc3-arm64-darwin → 0.20.1-arm64-darwin

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71cace075b8f83fe102d48849085712e7286aaca49621a88bca414a00b848586
4
- data.tar.gz: dfa42d0318f97983e4bea9b3b8c96a5676a7b0370e44edc35b6b685be648b866
3
+ metadata.gz: e2b962a2b259dfd4ee5abba1ea96e72df83b4f98be14b261f043ee6462da1c38
4
+ data.tar.gz: 8353c54e1a926ae430b71dbf3984693773ea13703043c70313c586d6036b7c43
5
5
  SHA512:
6
- metadata.gz: 70961feba8da0f86fbe16bb7cb475ab0306c2fd632f51562a1ce27447f5d0359c7a8576a879f68d1f2a1ce3c41e92a0ff76fe508d8a5fb4efe6010e104cae1e0
7
- data.tar.gz: e980d06d96530678ca6df92b50ad8cb2dfd796e70962b8add463db4b4b1cbcabb5a323e10605060d95f2c31e4f1a4733f2db156fb4b408e479234c3ce903bf23
6
+ metadata.gz: 9f8fca01d9363e26d17289a44ff65fa5e5512d7370f8fa45bf3b1b61c84cd4e6cbaaf47dbc867b3d14035564c0247ee82b008e0c02c61064da38522ffe2f8fc3
7
+ data.tar.gz: 31e01fd5bc2e117bc656768c7ba385c93054526718cf38aeb0926d3b2d072da48d61d8aa70107b1b6cf793b3256a942b6e530641f3be96d7dd78c7fe67cad17e
@@ -1,4 +1,39 @@
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
+
1
35
  name: CI Linux x86_64 GNU
36
+
2
37
  concurrency:
3
38
  group: ${{ github.workflow }}-${{ github.ref }}
4
39
  cancel-in-progress: true
@@ -19,41 +54,8 @@ env:
19
54
  BUNDLE_JOBS: 4
20
55
 
21
56
  jobs:
22
- build_install:
23
- timeout-minutes: 30
24
- runs-on: ubuntu-latest
25
- steps:
26
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27
- with:
28
- fetch-depth: 0
29
- - name: Install package dependencies
30
- run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
31
- - name: Set up Ruby
32
- uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
33
- with:
34
- ruby-version: '3.4' # Use one Ruby version for building
35
- bundler-cache: false
36
- - name: Build gem with mini_portile
37
- run: |
38
- set -e
39
- bundle install
40
- cd ext && bundle exec rake
41
- cd ..
42
- - name: Upload built gem and bundle
43
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
44
- with:
45
- name: rdkafka-built-gem
46
- path: |
47
- vendor/bundle/
48
- .bundle/
49
- ext/
50
- lib/
51
- retention-days: 1
52
-
53
57
  specs_install:
54
58
  timeout-minutes: 30
55
- runs-on: ubuntu-latest
56
- needs: build_install
57
59
  strategy:
58
60
  fail-fast: false
59
61
  matrix:
@@ -64,20 +66,17 @@ jobs:
64
66
  - '3.2'
65
67
  - '3.1'
66
68
  - 'jruby-10.0'
69
+ ubuntu-version: ['22.04', '24.04']
67
70
  include:
68
71
  - ruby: '3.4'
69
72
  coverage: 'true'
70
73
  - ruby: 'jruby-10.0'
71
74
  continue-on-error: true
75
+ runs-on: ubuntu-${{ matrix.ubuntu-version }}
72
76
  steps:
73
77
  - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
74
78
  with:
75
79
  fetch-depth: 0
76
- - name: Download built gem
77
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
78
- with:
79
- name: rdkafka-built-gem
80
- path: ./
81
80
  - name: Set up Ruby
82
81
  uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
83
82
  with:
@@ -107,12 +106,17 @@ jobs:
107
106
  echo "Sleeping 2 seconds..."
108
107
  sleep 2
109
108
  done
110
- - name: Install remaining dependencies
109
+ - name: Install dependencies
111
110
  env:
112
111
  RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
113
112
  run: |
114
113
  # Only install gems that aren't Ruby-version specific
115
114
  bundle install
115
+ - name: Build gem with mini_portile
116
+ run: |
117
+ set -e
118
+ cd ext && bundle exec rake
119
+ cd ..
116
120
  - name: Run all specs
117
121
  env:
118
122
  GITHUB_COVERAGE: ${{matrix.coverage}}
@@ -123,7 +127,10 @@ jobs:
123
127
 
124
128
  build_precompiled:
125
129
  timeout-minutes: 30
126
- runs-on: ubuntu-latest
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 # renovate: ignore
127
134
  steps:
128
135
  - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
129
136
  with:
@@ -134,15 +141,29 @@ jobs:
134
141
  sudo apt-get install -y --no-install-recommends \
135
142
  build-essential \
136
143
  gcc \
144
+ g++ \
137
145
  make \
138
- patch \
139
146
  tar \
147
+ gzip \
140
148
  wget \
149
+ curl \
150
+ file \
151
+ pkg-config \
152
+ autoconf \
153
+ automake \
154
+ libtool \
155
+ python3 \
156
+ git \
141
157
  ca-certificates \
158
+ patch \
142
159
  libsasl2-dev \
143
160
  libssl-dev \
144
161
  zlib1g-dev \
145
- libzstd-dev
162
+ libzstd-dev \
163
+ bison \
164
+ flex \
165
+ perl \
166
+ binutils-dev
146
167
  - name: Cache build-tmp directory
147
168
  uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
148
169
  with:
@@ -161,7 +182,6 @@ jobs:
161
182
 
162
183
  specs_precompiled:
163
184
  timeout-minutes: 30
164
- runs-on: ubuntu-latest
165
185
  needs: build_precompiled
166
186
  strategy:
167
187
  fail-fast: false
@@ -172,9 +192,13 @@ jobs:
172
192
  - '3.3'
173
193
  - '3.2'
174
194
  - '3.1'
195
+ ubuntu-version: ['22.04', '24.04']
175
196
  include:
176
197
  - ruby: '3.4'
198
+ ubuntu-version: '24.04'
177
199
  coverage: 'true'
200
+
201
+ runs-on: ubuntu-${{ matrix.ubuntu-version }}
178
202
  steps:
179
203
  - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
180
204
  with:
@@ -198,7 +222,6 @@ jobs:
198
222
 
199
223
  echo "=== Container status ==="
200
224
  docker compose ps kafka
201
-
202
225
  for i in {1..30}; do
203
226
  echo "=== Attempt $i/30 ==="
204
227
 
@@ -0,0 +1,194 @@
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 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: 30
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 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
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@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
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@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
166
+ with:
167
+ name: librdkafka-precompiled-musl
168
+ path: ext/
169
+ - name: Start Kafka with Docker Compose
170
+ run: |
171
+ docker compose 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
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 && git config --global --add safe.directory /workspace && bundle config set --local path vendor/bundle && bundle install && bundle exec ruby -S rspec'
@@ -1,7 +1,9 @@
1
1
  name: CI macOS ARM64
2
+
2
3
  concurrency:
3
4
  group: ${{ github.workflow }}-${{ github.ref }}
4
5
  cancel-in-progress: true
6
+
5
7
  on:
6
8
  pull_request:
7
9
  branches: [ main, master ]
@@ -9,52 +11,19 @@ on:
9
11
  branches: [ main, master ]
10
12
  schedule:
11
13
  - cron: '0 1 * * *'
14
+
12
15
  permissions:
13
16
  contents: read
17
+
14
18
  env:
15
19
  BUNDLE_RETRY: 6
16
20
  BUNDLE_JOBS: 4
17
21
  # Renovate can track and update this version
18
22
  CONFLUENT_VERSION: "8.0.0"
19
- jobs:
20
- build_install:
21
- timeout-minutes: 30
22
- runs-on: macos-latest
23
- steps:
24
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25
- with:
26
- fetch-depth: 0
27
- - name: Install Bash 4+ and Kerberos
28
- run: |
29
- brew install bash
30
- brew list krb5 &>/dev/null || brew install krb5
31
- echo "/opt/homebrew/bin" >> $GITHUB_PATH
32
- - name: Set up Ruby
33
- uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
34
- with:
35
- ruby-version: '3.4' # Use one Ruby version for building
36
- bundler-cache: false
37
- - name: Build gem with mini_portile
38
- run: |
39
- set -e
40
- bundle install
41
- cd ext && bundle exec rake
42
- cd ..
43
- - name: Upload built gem and bundle
44
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
45
- with:
46
- name: rdkafka-built-gem-macos
47
- path: |
48
- vendor/bundle/
49
- .bundle/
50
- ext/
51
- lib/
52
- retention-days: 1
53
23
 
24
+ jobs:
54
25
  specs_install:
55
26
  timeout-minutes: 30
56
- runs-on: macos-latest
57
- needs: build_install
58
27
  strategy:
59
28
  fail-fast: false
60
29
  matrix:
@@ -64,18 +33,21 @@ jobs:
64
33
  - '3.3'
65
34
  - '3.2'
66
35
  - '3.1'
36
+ macos-version:
37
+ - 'macos-14' # macOS 14 Sonoma (ARM64)
38
+ - 'macos-15' # macOS 15 Sequoia (ARM64)
67
39
  include:
68
40
  - ruby: '3.4'
41
+ macos-version: 'macos-15'
69
42
  coverage: 'true'
43
+ exclude:
44
+ - ruby: '3.5.0-preview1'
45
+ macos-version: 'macos-14'
46
+ runs-on: ${{ matrix.macos-version }}
70
47
  steps:
71
48
  - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
72
49
  with:
73
50
  fetch-depth: 0
74
- - name: Download built gem
75
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
76
- with:
77
- name: rdkafka-built-gem-macos
78
- path: ./
79
51
  - name: Install Bash 4+ and Kerberos
80
52
  run: |
81
53
  brew install bash
@@ -148,12 +120,16 @@ jobs:
148
120
  [ $i -eq 30 ] && { echo "❌ Kafka failed to start"; exit 1; }
149
121
  sleep 2
150
122
  done
151
- - name: Install remaining dependencies
123
+ - name: Install dependencies
152
124
  env:
153
125
  RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
154
126
  run: |
155
- # Only install gems that aren't Ruby-version specific
156
127
  bundle install
128
+ - name: Build gem with mini_portile
129
+ run: |
130
+ set -e
131
+ cd ext && bundle exec rake
132
+ cd ..
157
133
  - name: Run all specs
158
134
  env:
159
135
  GITHUB_COVERAGE: ${{matrix.coverage}}
@@ -163,7 +139,7 @@ jobs:
163
139
 
164
140
  build_precompiled:
165
141
  timeout-minutes: 45
166
- runs-on: macos-latest
142
+ runs-on: macos-14
167
143
  steps:
168
144
  - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
169
145
  with:
@@ -191,7 +167,6 @@ jobs:
191
167
 
192
168
  specs_precompiled:
193
169
  timeout-minutes: 30
194
- runs-on: macos-latest
195
170
  needs: build_precompiled
196
171
  strategy:
197
172
  fail-fast: false
@@ -202,9 +177,17 @@ jobs:
202
177
  - '3.3'
203
178
  - '3.2'
204
179
  - '3.1'
180
+ macos-version:
181
+ - 'macos-14'
182
+ - 'macos-15'
205
183
  include:
206
184
  - ruby: '3.4'
185
+ macos-version: 'macos-15'
207
186
  coverage: 'true'
187
+ exclude:
188
+ - ruby: '3.5.0-preview1'
189
+ macos-version: 'macos-14'
190
+ runs-on: ${{ matrix.macos-version }}
208
191
  steps:
209
192
  - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
210
193
  with:
@@ -1,18 +1,23 @@
1
1
  name: Push Linux x86_64 GNU Platform Gem
2
+
2
3
  on:
3
4
  push:
4
5
  tags:
5
6
  - v*
7
+
6
8
  permissions:
7
9
  contents: read
10
+
8
11
  env:
9
12
  BUNDLE_RETRY: 6
10
13
  BUNDLE_JOBS: 4
14
+
11
15
  jobs:
12
16
  push:
13
17
  if: github.repository_owner == 'karafka'
14
18
  timeout-minutes: 30
15
- runs-on: ubuntu-latest
19
+ # Same as CI, we build on the oldest possible for ABI compatibility
20
+ runs-on: ubuntu-22.04 # renovate: ignore
16
21
  environment: deployment
17
22
  permissions:
18
23
  contents: write
@@ -0,0 +1,79 @@
1
+ name: Push Linux x86_64 musl Platform Gem
2
+ on:
3
+ push:
4
+ tags:
5
+ - v*
6
+ permissions:
7
+ contents: read
8
+ env:
9
+ BUNDLE_RETRY: 6
10
+ BUNDLE_JOBS: 4
11
+ jobs:
12
+ build:
13
+ if: github.repository_owner == 'karafka'
14
+ timeout-minutes: 30
15
+ runs-on: ubuntu-latest
16
+ environment: deployment
17
+ container:
18
+ # Same as CI, we build on the oldest possible for ABI compatibility
19
+ image: alpine:3.18@sha256:de0eb0b3f2a47ba1eb89389859a9bd88b28e82f5826b6969ad604979713c2d4f # renovate: ignore
20
+ steps:
21
+ - name: Install dependencies
22
+ run: |
23
+ apk add --no-cache git curl ca-certificates build-base linux-headers \
24
+ pkgconf perl autoconf automake libtool bison flex file bash wget zstd-dev \
25
+ openssl-dev cyrus-sasl-dev cyrus-sasl cyrus-sasl-login \
26
+ cyrus-sasl-crammd5 cyrus-sasl-digestmd5 cyrus-sasl-gssapiv2 cyrus-sasl-scram \
27
+ krb5-libs openssl zlib zlib-dev zstd-libs
28
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29
+ with:
30
+ fetch-depth: 0
31
+ - name: Configure git safe directory
32
+ run: git config --global --add safe.directory /__w/karafka-rdkafka/karafka-rdkafka
33
+ - name: Cache build-tmp directory
34
+ uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
35
+ with:
36
+ path: ext/build-tmp-musl
37
+ key: build-tmp-musl-${{ runner.os }}-${{ hashFiles('ext/*.sh', 'ext/Rakefile') }}-v2
38
+ - name: Build precompiled librdkafka.so
39
+ run: |
40
+ cd ext
41
+ bash ./build_linux_x86_64_musl.sh
42
+ - name: Upload precompiled library
43
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
44
+ with:
45
+ name: librdkafka-precompiled-musl
46
+ path: ext/
47
+ retention-days: 1
48
+
49
+ push:
50
+ if: github.repository_owner == 'karafka'
51
+ timeout-minutes: 30
52
+ runs-on: ubuntu-latest
53
+ needs: build
54
+ environment: deployment
55
+ permissions:
56
+ contents: write
57
+ id-token: write
58
+ steps:
59
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
60
+ with:
61
+ fetch-depth: 0
62
+ - name: Download precompiled library
63
+ uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
64
+ with:
65
+ name: librdkafka-precompiled-musl
66
+ path: ext/
67
+ - name: Set up Ruby
68
+ uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
69
+ with:
70
+ ruby-version: '3.4'
71
+ bundler-cache: false
72
+ - name: Configure trusted publishing credentials
73
+ uses: rubygems/configure-rubygems-credentials@bc6dd217f8a4f919d6835fcfefd470ef821f5c44 # v1.0.0
74
+ - name: Build and push platform-specific gem
75
+ run: |
76
+ gem build *.gemspec
77
+ gem push *.gem
78
+ env:
79
+ RUBY_PLATFORM: 'x86_64-linux-musl'
@@ -1,18 +1,22 @@
1
1
  name: Push macOS ARM64 Platform Gem
2
+
2
3
  on:
3
4
  push:
4
5
  tags:
5
6
  - v*
7
+
6
8
  permissions:
7
9
  contents: read
10
+
8
11
  env:
9
12
  BUNDLE_RETRY: 6
10
13
  BUNDLE_JOBS: 4
14
+
11
15
  jobs:
12
16
  push:
13
17
  if: github.repository_owner == 'karafka'
14
18
  timeout-minutes: 30
15
- runs-on: macos-latest
19
+ runs-on: macos-14
16
20
  environment: deployment
17
21
  permissions:
18
22
  contents: write
@@ -24,7 +24,7 @@ jobs:
24
24
  fetch-depth: 0
25
25
 
26
26
  - name: Set up Ruby
27
- uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
27
+ uses: ruby/setup-ruby@472790540115ce5bd69d399a020189a8c87d641f # v1.247.0
28
28
  with:
29
29
  bundler-cache: false
30
30
 
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.4.4
1
+ 3.4.5