Skip to content

Commit bf062bb

Browse files
committed
RCBC-514: Add support for Ruby 3.4 and Linux/arm64
1 parent 6d89cab commit bf062bb

File tree

2 files changed

+115
-9
lines changed

2 files changed

+115
-9
lines changed

.github/workflows/tests.yml

Lines changed: 113 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,15 @@ jobs:
7676
path: |
7777
docs/**/*
7878
79-
build_alpine:
79+
build_alpine_x86_64:
80+
# FIXME(SA): add aarch64 for Alpine Linux
81+
# Right now github does not allow to execute JS-based actions (like
82+
# download-artifact) inside alpine container, throwing the following
83+
# message:
84+
#
85+
# JavaScript Actions in Alpine containers are only supported on x64 Linux
86+
# runners. Detected Linux Arm64
8087
needs: source
81-
name: alpine
8288
runs-on: ubuntu-22.04
8389
container:
8490
image: alpine:3.18
@@ -114,7 +120,7 @@ jobs:
114120
name: scripts-${{ needs.source.outputs.gem_version }}
115121
- name: Install build environment
116122
env:
117-
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3"
123+
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3 3.4"
118124
run: |
119125
bash bin/jenkins/install-rubies.sh
120126
- uses: actions/download-artifact@v4
@@ -123,7 +129,7 @@ jobs:
123129
name: couchbase-${{ needs.source.outputs.gem_version }}
124130
- name: Build gem
125131
env:
126-
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3"
132+
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3 3.4"
127133
BUNDLE_ALLOW_ROOT: true
128134
run: |
129135
bash bin/jenkins/build-gem.sh
@@ -135,14 +141,15 @@ jobs:
135141
136142
build_linux_x86_64:
137143
needs: source
138-
runs-on: ubuntu-20.04
144+
runs-on: ubuntu-22.04
139145
strategy:
140146
fail-fast: false
141147
matrix:
142148
ruby:
143149
- '3.1'
144150
- '3.2'
145151
- '3.3'
152+
- '3.4'
146153
steps:
147154
- uses: hendrikmuhs/[email protected]
148155
with:
@@ -190,9 +197,13 @@ jobs:
190197
with:
191198
path: pkg/binary/3.3
192199
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-linux-3.3
200+
- uses: actions/download-artifact@v4
201+
with:
202+
path: pkg/binary/3.4
203+
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-linux-3.4
193204
- uses: ruby/setup-ruby@v1
194205
with:
195-
ruby-version: 3.3
206+
ruby-version: 3.4
196207
- name: Repackage
197208
run: |
198209
ruby bin/jenkins/repackage-extension.rb
@@ -202,6 +213,80 @@ jobs:
202213
path: |
203214
pkg/fat/*.gem
204215
216+
build_linux_aarch64:
217+
needs: source
218+
runs-on: ubuntu-22.04-arm
219+
strategy:
220+
fail-fast: false
221+
matrix:
222+
ruby:
223+
- '3.1'
224+
- '3.2'
225+
- '3.3'
226+
- '3.4'
227+
steps:
228+
- uses: hendrikmuhs/[email protected]
229+
with:
230+
max-size: 2G
231+
key: ${{ github.job }}-${{ matrix.ruby }}
232+
- uses: ruby/setup-ruby@v1
233+
with:
234+
ruby-version: ${{ matrix.ruby }}
235+
- uses: actions/download-artifact@v4
236+
with:
237+
name: couchbase-${{ needs.source.outputs.gem_version }}
238+
- name: Precompile
239+
env:
240+
CB_STATIC_BORINGSSL: 1
241+
CB_STATIC_STDLIB: 1
242+
CB_REMOVE_EXT_DIRECTORY: 1
243+
run: |
244+
gem install gem-compiler
245+
gem compile --strip --prune couchbase-${{ needs.source.outputs.gem_version }}.gem
246+
- uses: actions/upload-artifact@v4
247+
with:
248+
retention-days: 1
249+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-${{ matrix.ruby }}
250+
path: |
251+
*-aarch64-linux.gem
252+
253+
repackage_linux_aarch64:
254+
needs:
255+
- source
256+
- build_linux_aarch64
257+
runs-on: ubuntu-22.04-arm
258+
steps:
259+
- uses: actions/download-artifact@v4
260+
with:
261+
name: scripts-${{ needs.source.outputs.gem_version }}
262+
- uses: actions/download-artifact@v4
263+
with:
264+
path: pkg/binary/3.1
265+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.1
266+
- uses: actions/download-artifact@v4
267+
with:
268+
path: pkg/binary/3.2
269+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.2
270+
- uses: actions/download-artifact@v4
271+
with:
272+
path: pkg/binary/3.3
273+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.3
274+
- uses: actions/download-artifact@v4
275+
with:
276+
path: pkg/binary/3.4
277+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.4
278+
- uses: ruby/setup-ruby@v1
279+
with:
280+
ruby-version: 3.4
281+
- name: Repackage
282+
run: |
283+
ruby bin/jenkins/repackage-extension.rb
284+
- uses: actions/upload-artifact@v4
285+
with:
286+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux
287+
path: |
288+
pkg/fat/*.gem
289+
205290
build_macos_arm64:
206291
needs: source
207292
runs-on: macos-14
@@ -212,6 +297,7 @@ jobs:
212297
- '3.1'
213298
- '3.2'
214299
- '3.3'
300+
- '3.4'
215301
steps:
216302
- uses: hendrikmuhs/[email protected]
217303
with:
@@ -259,9 +345,13 @@ jobs:
259345
with:
260346
path: pkg/binary/3.3
261347
name: couchbase-${{ needs.source.outputs.gem_version }}-arm64-darwin-3.3
348+
- uses: actions/download-artifact@v4
349+
with:
350+
path: pkg/binary/3.4
351+
name: couchbase-${{ needs.source.outputs.gem_version }}-arm64-darwin-3.4
262352
- uses: ruby/setup-ruby@v1
263353
with:
264-
ruby-version: 3.3
354+
ruby-version: 3.4
265355
- name: Repackage
266356
run: |
267357
ruby bin/jenkins/repackage-extension.rb
@@ -281,6 +371,7 @@ jobs:
281371
- '3.1'
282372
- '3.2'
283373
- '3.3'
374+
- '3.4'
284375
steps:
285376
- uses: hendrikmuhs/[email protected]
286377
with:
@@ -328,9 +419,13 @@ jobs:
328419
with:
329420
path: pkg/binary/3.3
330421
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-darwin-3.3
422+
- uses: actions/download-artifact@v4
423+
with:
424+
path: pkg/binary/3.4
425+
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-darwin-3.4
331426
- uses: ruby/setup-ruby@v1
332427
with:
333-
ruby-version: 3.3
428+
ruby-version: 3.4
334429
- name: Repackage
335430
run: |
336431
ruby bin/jenkins/repackage-extension.rb
@@ -353,6 +448,7 @@ jobs:
353448
- '3.1'
354449
- '3.2'
355450
- '3.3'
451+
- '3.4'
356452
steps:
357453
- uses: actions/download-artifact@v4
358454
with:
@@ -413,6 +509,7 @@ jobs:
413509
- '3.1'
414510
- '3.2'
415511
- '3.3'
512+
- '3.4'
416513
steps:
417514
- uses: actions/download-artifact@v4
418515
with:
@@ -476,6 +573,7 @@ jobs:
476573
- '3.1'
477574
- '3.2'
478575
- '3.3'
576+
- '3.4'
479577
steps:
480578
- uses: actions/download-artifact@v4
481579
with:
@@ -631,6 +729,7 @@ jobs:
631729
- '3.1'
632730
- '3.2'
633731
- '3.3'
732+
- '3.4'
634733
steps:
635734
- uses: ruby/setup-ruby@v1
636735
with:
@@ -677,9 +776,13 @@ jobs:
677776
with:
678777
path: pkg/binary/3.3
679778
name: couchbase-${{ needs.source.outputs.gem_version }}-x64-mingw-3.3
779+
- uses: actions/download-artifact@v4
780+
with:
781+
path: pkg/binary/3.4
782+
name: couchbase-${{ needs.source.outputs.gem_version }}-x64-mingw-3.4
680783
- uses: ruby/setup-ruby@v1
681784
with:
682-
ruby-version: 3.3
785+
ruby-version: 3.4
683786
- name: Repackage
684787
run: |
685788
ruby bin/jenkins/repackage-extension.rb
@@ -711,6 +814,7 @@ jobs:
711814
# - '3.1'
712815
# - '3.2'
713816
# - '3.3'
817+
# - '3.4'
714818
# steps:
715819
# - uses: actions/download-artifact@v4
716820
# with:

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ gem "rake"
2323

2424
group :development do
2525
gem "activesupport", "~> 7.0.3"
26+
gem "drb"
2627
gem "faker"
2728
gem "flay"
2829
gem "flog"
@@ -31,6 +32,7 @@ group :development do
3132
gem "heckle"
3233
gem "minitest"
3334
gem "minitest-reporters"
35+
gem "mutex_m"
3436
gem "rack"
3537
gem "reek"
3638
gem "rubocop", require: false

0 commit comments

Comments
 (0)