Skip to content

Commit 2ccb27b

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

File tree

2 files changed

+160
-9
lines changed

2 files changed

+160
-9
lines changed

.github/workflows/tests.yml

Lines changed: 158 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ jobs:
7676
path: |
7777
docs/**/*
7878
79-
build_alpine:
79+
build_alpine_x86_64:
8080
needs: source
81-
name: alpine
8281
runs-on: ubuntu-22.04
8382
container:
8483
image: alpine:3.18
@@ -114,7 +113,7 @@ jobs:
114113
name: scripts-${{ needs.source.outputs.gem_version }}
115114
- name: Install build environment
116115
env:
117-
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3"
116+
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3 3.4"
118117
run: |
119118
bash bin/jenkins/install-rubies.sh
120119
- uses: actions/download-artifact@v4
@@ -123,7 +122,7 @@ jobs:
123122
name: couchbase-${{ needs.source.outputs.gem_version }}
124123
- name: Build gem
125124
env:
126-
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3"
125+
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3 3.4"
127126
BUNDLE_ALLOW_ROOT: true
128127
run: |
129128
bash bin/jenkins/build-gem.sh
@@ -133,16 +132,69 @@ jobs:
133132
path: |
134133
pkg/fat/*.gem
135134
135+
build_alpine_aarch64:
136+
needs: source
137+
runs-on: ubuntu-22.04-arm
138+
container:
139+
image: alpine:3.18
140+
steps:
141+
- name: Install build environment
142+
run: |
143+
apk update
144+
apk add --no-cache \
145+
bash \
146+
build-base \
147+
ccache \
148+
cmake \
149+
curl \
150+
g++ \
151+
gcc \
152+
git \
153+
linux-headers \
154+
make \
155+
openssl \
156+
openssl-dev \
157+
readline-dev \
158+
ruby \
159+
tar \
160+
xz \
161+
yaml-dev \
162+
zlib-dev
163+
- uses: actions/download-artifact@v4
164+
with:
165+
name: scripts-${{ needs.source.outputs.gem_version }}
166+
- name: Install build environment
167+
env:
168+
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3 3.4"
169+
run: |
170+
bash bin/jenkins/install-rubies.sh
171+
- uses: actions/download-artifact@v4
172+
with:
173+
path: pkg
174+
name: couchbase-${{ needs.source.outputs.gem_version }}
175+
- name: Build gem
176+
env:
177+
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3 3.4"
178+
BUNDLE_ALLOW_ROOT: true
179+
run: |
180+
bash bin/jenkins/build-gem.sh
181+
- uses: actions/upload-artifact@v4
182+
with:
183+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-musl
184+
path: |
185+
pkg/fat/*.gem
186+
136187
build_linux_x86_64:
137188
needs: source
138-
runs-on: ubuntu-20.04
189+
runs-on: ubuntu-22.04
139190
strategy:
140191
fail-fast: false
141192
matrix:
142193
ruby:
143194
- '3.1'
144195
- '3.2'
145196
- '3.3'
197+
- '3.4'
146198
steps:
147199
- uses: hendrikmuhs/[email protected]
148200
with:
@@ -190,9 +242,13 @@ jobs:
190242
with:
191243
path: pkg/binary/3.3
192244
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-linux-3.3
245+
- uses: actions/download-artifact@v4
246+
with:
247+
path: pkg/binary/3.4
248+
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-linux-3.4
193249
- uses: ruby/setup-ruby@v1
194250
with:
195-
ruby-version: 3.3
251+
ruby-version: 3.4
196252
- name: Repackage
197253
run: |
198254
ruby bin/jenkins/repackage-extension.rb
@@ -202,6 +258,80 @@ jobs:
202258
path: |
203259
pkg/fat/*.gem
204260
261+
build_linux_aarch64:
262+
needs: source
263+
runs-on: ubuntu-22.04-arm
264+
strategy:
265+
fail-fast: false
266+
matrix:
267+
ruby:
268+
- '3.1'
269+
- '3.2'
270+
- '3.3'
271+
- '3.4'
272+
steps:
273+
- uses: hendrikmuhs/[email protected]
274+
with:
275+
max-size: 2G
276+
key: ${{ github.job }}-${{ matrix.ruby }}
277+
- uses: ruby/setup-ruby@v1
278+
with:
279+
ruby-version: ${{ matrix.ruby }}
280+
- uses: actions/download-artifact@v4
281+
with:
282+
name: couchbase-${{ needs.source.outputs.gem_version }}
283+
- name: Precompile
284+
env:
285+
CB_STATIC_BORINGSSL: 1
286+
CB_STATIC_STDLIB: 1
287+
CB_REMOVE_EXT_DIRECTORY: 1
288+
run: |
289+
gem install gem-compiler
290+
gem compile --strip --prune couchbase-${{ needs.source.outputs.gem_version }}.gem
291+
- uses: actions/upload-artifact@v4
292+
with:
293+
retention-days: 1
294+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-${{ matrix.ruby }}
295+
path: |
296+
*-aarch64-linux.gem
297+
298+
repackage_linux_aarch64:
299+
needs:
300+
- source
301+
- build_linux_aarch64
302+
runs-on: ubuntu-22.04-arm
303+
steps:
304+
- uses: actions/download-artifact@v4
305+
with:
306+
name: scripts-${{ needs.source.outputs.gem_version }}
307+
- uses: actions/download-artifact@v4
308+
with:
309+
path: pkg/binary/3.1
310+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.1
311+
- uses: actions/download-artifact@v4
312+
with:
313+
path: pkg/binary/3.2
314+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.2
315+
- uses: actions/download-artifact@v4
316+
with:
317+
path: pkg/binary/3.3
318+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.3
319+
- uses: actions/download-artifact@v4
320+
with:
321+
path: pkg/binary/3.4
322+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.4
323+
- uses: ruby/setup-ruby@v1
324+
with:
325+
ruby-version: 3.4
326+
- name: Repackage
327+
run: |
328+
ruby bin/jenkins/repackage-extension.rb
329+
- uses: actions/upload-artifact@v4
330+
with:
331+
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux
332+
path: |
333+
pkg/fat/*.gem
334+
205335
build_macos_arm64:
206336
needs: source
207337
runs-on: macos-14
@@ -212,6 +342,7 @@ jobs:
212342
- '3.1'
213343
- '3.2'
214344
- '3.3'
345+
- '3.4'
215346
steps:
216347
- uses: hendrikmuhs/[email protected]
217348
with:
@@ -259,9 +390,13 @@ jobs:
259390
with:
260391
path: pkg/binary/3.3
261392
name: couchbase-${{ needs.source.outputs.gem_version }}-arm64-darwin-3.3
393+
- uses: actions/download-artifact@v4
394+
with:
395+
path: pkg/binary/3.4
396+
name: couchbase-${{ needs.source.outputs.gem_version }}-arm64-darwin-3.4
262397
- uses: ruby/setup-ruby@v1
263398
with:
264-
ruby-version: 3.3
399+
ruby-version: 3.4
265400
- name: Repackage
266401
run: |
267402
ruby bin/jenkins/repackage-extension.rb
@@ -281,6 +416,7 @@ jobs:
281416
- '3.1'
282417
- '3.2'
283418
- '3.3'
419+
- '3.4'
284420
steps:
285421
- uses: hendrikmuhs/[email protected]
286422
with:
@@ -328,9 +464,13 @@ jobs:
328464
with:
329465
path: pkg/binary/3.3
330466
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-darwin-3.3
467+
- uses: actions/download-artifact@v4
468+
with:
469+
path: pkg/binary/3.4
470+
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-darwin-3.4
331471
- uses: ruby/setup-ruby@v1
332472
with:
333-
ruby-version: 3.3
473+
ruby-version: 3.4
334474
- name: Repackage
335475
run: |
336476
ruby bin/jenkins/repackage-extension.rb
@@ -353,6 +493,7 @@ jobs:
353493
- '3.1'
354494
- '3.2'
355495
- '3.3'
496+
- '3.4'
356497
steps:
357498
- uses: actions/download-artifact@v4
358499
with:
@@ -413,6 +554,7 @@ jobs:
413554
- '3.1'
414555
- '3.2'
415556
- '3.3'
557+
- '3.4'
416558
steps:
417559
- uses: actions/download-artifact@v4
418560
with:
@@ -476,6 +618,7 @@ jobs:
476618
- '3.1'
477619
- '3.2'
478620
- '3.3'
621+
- '3.4'
479622
steps:
480623
- uses: actions/download-artifact@v4
481624
with:
@@ -631,6 +774,7 @@ jobs:
631774
- '3.1'
632775
- '3.2'
633776
- '3.3'
777+
- '3.4'
634778
steps:
635779
- uses: ruby/setup-ruby@v1
636780
with:
@@ -677,9 +821,13 @@ jobs:
677821
with:
678822
path: pkg/binary/3.3
679823
name: couchbase-${{ needs.source.outputs.gem_version }}-x64-mingw-3.3
824+
- uses: actions/download-artifact@v4
825+
with:
826+
path: pkg/binary/3.4
827+
name: couchbase-${{ needs.source.outputs.gem_version }}-x64-mingw-3.4
680828
- uses: ruby/setup-ruby@v1
681829
with:
682-
ruby-version: 3.3
830+
ruby-version: 3.4
683831
- name: Repackage
684832
run: |
685833
ruby bin/jenkins/repackage-extension.rb
@@ -711,6 +859,7 @@ jobs:
711859
# - '3.1'
712860
# - '3.2'
713861
# - '3.3'
862+
# - '3.4'
714863
# steps:
715864
# - uses: actions/download-artifact@v4
716865
# 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)