Skip to content

Commit b13f7e4

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

File tree

2 files changed

+165
-8
lines changed

2 files changed

+165
-8
lines changed

.github/workflows/tests.yml

Lines changed: 163 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
path: |
7777
docs/**/*
7878
79-
build_alpine:
79+
build_alpine_x86_64:
8080
needs: source
8181
name: alpine
8282
runs-on: ubuntu-22.04
@@ -114,7 +114,7 @@ jobs:
114114
name: scripts-${{ needs.source.outputs.gem_version }}
115115
- name: Install build environment
116116
env:
117-
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3"
117+
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3 3.4"
118118
run: |
119119
bash bin/jenkins/install-rubies.sh
120120
- uses: actions/download-artifact@v4
@@ -123,7 +123,7 @@ jobs:
123123
name: couchbase-${{ needs.source.outputs.gem_version }}
124124
- name: Build gem
125125
env:
126-
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3"
126+
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3 3.4"
127127
BUNDLE_ALLOW_ROOT: true
128128
run: |
129129
bash bin/jenkins/build-gem.sh
@@ -133,16 +133,74 @@ jobs:
133133
path: |
134134
pkg/fat/*.gem
135135
136+
build_alpine_aarch64:
137+
needs: source
138+
name: alpine
139+
runs-on: ubuntu-22.04-arm
140+
container:
141+
image: alpine:3.18
142+
steps:
143+
- name: Install build environment
144+
run: |
145+
apk update
146+
apk add --no-cache \
147+
bash \
148+
build-base \
149+
ccache \
150+
cmake \
151+
curl \
152+
g++ \
153+
gcc \
154+
git \
155+
linux-headers \
156+
make \
157+
openssl \
158+
openssl-dev \
159+
readline-dev \
160+
ruby \
161+
tar \
162+
xz \
163+
yaml-dev \
164+
zlib-dev
165+
- uses: hendrikmuhs/[email protected]
166+
with:
167+
max-size: 2G
168+
key: ${{ github.job }}
169+
- uses: actions/download-artifact@v4
170+
with:
171+
name: scripts-${{ needs.source.outputs.gem_version }}
172+
- name: Install build environment
173+
env:
174+
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3 3.4"
175+
run: |
176+
bash bin/jenkins/install-rubies.sh
177+
- uses: actions/download-artifact@v4
178+
with:
179+
path: pkg
180+
name: couchbase-${{ needs.source.outputs.gem_version }}
181+
- name: Build gem
182+
env:
183+
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3 3.4"
184+
BUNDLE_ALLOW_ROOT: true
185+
run: |
186+
bash bin/jenkins/build-gem.sh
187+
- uses: actions/upload-artifact@v4
188+
with:
189+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-musl
190+
path: |
191+
pkg/fat/*.gem
192+
136193
build_linux_x86_64:
137194
needs: source
138-
runs-on: ubuntu-20.04
195+
runs-on: ubuntu-22.04
139196
strategy:
140197
fail-fast: false
141198
matrix:
142199
ruby:
143200
- '3.1'
144201
- '3.2'
145202
- '3.3'
203+
- '3.4'
146204
steps:
147205
- uses: hendrikmuhs/[email protected]
148206
with:
@@ -190,9 +248,13 @@ jobs:
190248
with:
191249
path: pkg/binary/3.3
192250
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-linux-3.3
251+
- uses: actions/download-artifact@v4
252+
with:
253+
path: pkg/binary/3.4
254+
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-linux-3.4
193255
- uses: ruby/setup-ruby@v1
194256
with:
195-
ruby-version: 3.3
257+
ruby-version: 3.4
196258
- name: Repackage
197259
run: |
198260
ruby bin/jenkins/repackage-extension.rb
@@ -202,6 +264,80 @@ jobs:
202264
path: |
203265
pkg/fat/*.gem
204266
267+
build_linux_aarch64:
268+
needs: source
269+
runs-on: ubuntu-22.04-arm
270+
strategy:
271+
fail-fast: false
272+
matrix:
273+
ruby:
274+
- '3.1'
275+
- '3.2'
276+
- '3.3'
277+
- '3.4'
278+
steps:
279+
- uses: hendrikmuhs/[email protected]
280+
with:
281+
max-size: 2G
282+
key: ${{ github.job }}-${{ matrix.ruby }}
283+
- uses: ruby/setup-ruby@v1
284+
with:
285+
ruby-version: ${{ matrix.ruby }}
286+
- uses: actions/download-artifact@v4
287+
with:
288+
name: couchbase-${{ needs.source.outputs.gem_version }}
289+
- name: Precompile
290+
env:
291+
CB_STATIC_BORINGSSL: 1
292+
CB_STATIC_STDLIB: 1
293+
CB_REMOVE_EXT_DIRECTORY: 1
294+
run: |
295+
gem install gem-compiler
296+
gem compile --strip --prune couchbase-${{ needs.source.outputs.gem_version }}.gem
297+
- uses: actions/upload-artifact@v4
298+
with:
299+
retention-days: 1
300+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-${{ matrix.ruby }}
301+
path: |
302+
*-aarch64-linux.gem
303+
304+
repackage_linux_aarch64:
305+
needs:
306+
- source
307+
- build_linux_aarch64
308+
runs-on: ubuntu-22.04-arm
309+
steps:
310+
- uses: actions/download-artifact@v4
311+
with:
312+
name: scripts-${{ needs.source.outputs.gem_version }}
313+
- uses: actions/download-artifact@v4
314+
with:
315+
path: pkg/binary/3.1
316+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.1
317+
- uses: actions/download-artifact@v4
318+
with:
319+
path: pkg/binary/3.2
320+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.2
321+
- uses: actions/download-artifact@v4
322+
with:
323+
path: pkg/binary/3.3
324+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.3
325+
- uses: actions/download-artifact@v4
326+
with:
327+
path: pkg/binary/3.4
328+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.4
329+
- uses: ruby/setup-ruby@v1
330+
with:
331+
ruby-version: 3.4
332+
- name: Repackage
333+
run: |
334+
ruby bin/jenkins/repackage-extension.rb
335+
- uses: actions/upload-artifact@v4
336+
with:
337+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux
338+
path: |
339+
pkg/fat/*.gem
340+
205341
build_macos_arm64:
206342
needs: source
207343
runs-on: macos-14
@@ -212,6 +348,7 @@ jobs:
212348
- '3.1'
213349
- '3.2'
214350
- '3.3'
351+
- '3.4'
215352
steps:
216353
- uses: hendrikmuhs/[email protected]
217354
with:
@@ -259,9 +396,13 @@ jobs:
259396
with:
260397
path: pkg/binary/3.3
261398
name: couchbase-${{ needs.source.outputs.gem_version }}-arm64-darwin-3.3
399+
- uses: actions/download-artifact@v4
400+
with:
401+
path: pkg/binary/3.4
402+
name: couchbase-${{ needs.source.outputs.gem_version }}-arm64-darwin-3.4
262403
- uses: ruby/setup-ruby@v1
263404
with:
264-
ruby-version: 3.3
405+
ruby-version: 3.4
265406
- name: Repackage
266407
run: |
267408
ruby bin/jenkins/repackage-extension.rb
@@ -281,6 +422,7 @@ jobs:
281422
- '3.1'
282423
- '3.2'
283424
- '3.3'
425+
- '3.4'
284426
steps:
285427
- uses: hendrikmuhs/[email protected]
286428
with:
@@ -328,9 +470,13 @@ jobs:
328470
with:
329471
path: pkg/binary/3.3
330472
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-darwin-3.3
473+
- uses: actions/download-artifact@v4
474+
with:
475+
path: pkg/binary/3.4
476+
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-darwin-3.4
331477
- uses: ruby/setup-ruby@v1
332478
with:
333-
ruby-version: 3.3
479+
ruby-version: 3.4
334480
- name: Repackage
335481
run: |
336482
ruby bin/jenkins/repackage-extension.rb
@@ -353,6 +499,7 @@ jobs:
353499
- '3.1'
354500
- '3.2'
355501
- '3.3'
502+
- '3.4'
356503
steps:
357504
- uses: actions/download-artifact@v4
358505
with:
@@ -413,6 +560,7 @@ jobs:
413560
- '3.1'
414561
- '3.2'
415562
- '3.3'
563+
- '3.4'
416564
steps:
417565
- uses: actions/download-artifact@v4
418566
with:
@@ -476,6 +624,7 @@ jobs:
476624
- '3.1'
477625
- '3.2'
478626
- '3.3'
627+
- '3.4'
479628
steps:
480629
- uses: actions/download-artifact@v4
481630
with:
@@ -631,6 +780,7 @@ jobs:
631780
- '3.1'
632781
- '3.2'
633782
- '3.3'
783+
- '3.4'
634784
steps:
635785
- uses: ruby/setup-ruby@v1
636786
with:
@@ -677,9 +827,13 @@ jobs:
677827
with:
678828
path: pkg/binary/3.3
679829
name: couchbase-${{ needs.source.outputs.gem_version }}-x64-mingw-3.3
830+
- uses: actions/download-artifact@v4
831+
with:
832+
path: pkg/binary/3.4
833+
name: couchbase-${{ needs.source.outputs.gem_version }}-x64-mingw-3.4
680834
- uses: ruby/setup-ruby@v1
681835
with:
682-
ruby-version: 3.3
836+
ruby-version: 3.4
683837
- name: Repackage
684838
run: |
685839
ruby bin/jenkins/repackage-extension.rb
@@ -711,6 +865,7 @@ jobs:
711865
# - '3.1'
712866
# - '3.2'
713867
# - '3.3'
868+
# - '3.4'
714869
# steps:
715870
# - uses: actions/download-artifact@v4
716871
# 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)