Skip to content

RCBC-514: Add support for Ruby 3.4 and Linux/arm64 #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 113 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,15 @@ jobs:
path: |
docs/**/*

build_alpine:
build_alpine_x86_64:
# FIXME(SA): add aarch64 for Alpine Linux
# Right now github does not allow to execute JS-based actions (like
# download-artifact) inside alpine container, throwing the following
# message:
#
# JavaScript Actions in Alpine containers are only supported on x64 Linux
# runners. Detected Linux Arm64
needs: source
name: alpine
runs-on: ubuntu-22.04
container:
image: alpine:3.18
Expand Down Expand Up @@ -114,7 +120,7 @@ jobs:
name: scripts-${{ needs.source.outputs.gem_version }}
- name: Install build environment
env:
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3"
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3 3.4"
run: |
bash bin/jenkins/install-rubies.sh
- uses: actions/download-artifact@v4
Expand All @@ -123,7 +129,7 @@ jobs:
name: couchbase-${{ needs.source.outputs.gem_version }}
- name: Build gem
env:
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3"
SUPPORTED_RUBY_VERSIONS: "3.1 3.2 3.3 3.4"
BUNDLE_ALLOW_ROOT: true
run: |
bash bin/jenkins/build-gem.sh
Expand All @@ -135,14 +141,15 @@ jobs:

build_linux_x86_64:
needs: source
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ruby:
- '3.1'
- '3.2'
- '3.3'
- '3.4'
steps:
- uses: hendrikmuhs/[email protected]
with:
Expand Down Expand Up @@ -190,9 +197,13 @@ jobs:
with:
path: pkg/binary/3.3
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-linux-3.3
- uses: actions/download-artifact@v4
with:
path: pkg/binary/3.4
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-linux-3.4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
ruby-version: 3.4
- name: Repackage
run: |
ruby bin/jenkins/repackage-extension.rb
Expand All @@ -202,6 +213,80 @@ jobs:
path: |
pkg/fat/*.gem

build_linux_aarch64:
needs: source
runs-on: ubuntu-22.04-arm
strategy:
fail-fast: false
matrix:
ruby:
- '3.1'
- '3.2'
- '3.3'
- '3.4'
steps:
- uses: hendrikmuhs/[email protected]
with:
max-size: 2G
key: ${{ github.job }}-${{ matrix.ruby }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- uses: actions/download-artifact@v4
with:
name: couchbase-${{ needs.source.outputs.gem_version }}
- name: Precompile
env:
CB_STATIC_BORINGSSL: 1
CB_STATIC_STDLIB: 1
CB_REMOVE_EXT_DIRECTORY: 1
run: |
gem install gem-compiler
gem compile --strip --prune couchbase-${{ needs.source.outputs.gem_version }}.gem
- uses: actions/upload-artifact@v4
with:
retention-days: 1
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-${{ matrix.ruby }}
path: |
*-aarch64-linux.gem

repackage_linux_aarch64:
needs:
- source
- build_linux_aarch64
runs-on: ubuntu-22.04-arm
steps:
- uses: actions/download-artifact@v4
with:
name: scripts-${{ needs.source.outputs.gem_version }}
- uses: actions/download-artifact@v4
with:
path: pkg/binary/3.1
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.1
- uses: actions/download-artifact@v4
with:
path: pkg/binary/3.2
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.2
- uses: actions/download-artifact@v4
with:
path: pkg/binary/3.3
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.3
- uses: actions/download-artifact@v4
with:
path: pkg/binary/3.4
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux-3.4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4
- name: Repackage
run: |
ruby bin/jenkins/repackage-extension.rb
- uses: actions/upload-artifact@v4
with:
name: couchbase-${{ needs.source.outputs.gem_version }}-aarch64-linux
path: |
pkg/fat/*.gem

build_macos_arm64:
needs: source
runs-on: macos-14
Expand All @@ -212,6 +297,7 @@ jobs:
- '3.1'
- '3.2'
- '3.3'
- '3.4'
steps:
- uses: hendrikmuhs/[email protected]
with:
Expand Down Expand Up @@ -259,9 +345,13 @@ jobs:
with:
path: pkg/binary/3.3
name: couchbase-${{ needs.source.outputs.gem_version }}-arm64-darwin-3.3
- uses: actions/download-artifact@v4
with:
path: pkg/binary/3.4
name: couchbase-${{ needs.source.outputs.gem_version }}-arm64-darwin-3.4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
ruby-version: 3.4
- name: Repackage
run: |
ruby bin/jenkins/repackage-extension.rb
Expand All @@ -281,6 +371,7 @@ jobs:
- '3.1'
- '3.2'
- '3.3'
- '3.4'
steps:
- uses: hendrikmuhs/[email protected]
with:
Expand Down Expand Up @@ -328,9 +419,13 @@ jobs:
with:
path: pkg/binary/3.3
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-darwin-3.3
- uses: actions/download-artifact@v4
with:
path: pkg/binary/3.4
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-darwin-3.4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
ruby-version: 3.4
- name: Repackage
run: |
ruby bin/jenkins/repackage-extension.rb
Expand All @@ -353,6 +448,7 @@ jobs:
- '3.1'
- '3.2'
- '3.3'
- '3.4'
steps:
- uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -413,6 +509,7 @@ jobs:
- '3.1'
- '3.2'
- '3.3'
- '3.4'
steps:
- uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -476,6 +573,7 @@ jobs:
- '3.1'
- '3.2'
- '3.3'
- '3.4'
steps:
- uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -631,6 +729,7 @@ jobs:
- '3.1'
- '3.2'
- '3.3'
- '3.4'
steps:
- uses: ruby/setup-ruby@v1
with:
Expand Down Expand Up @@ -677,9 +776,13 @@ jobs:
with:
path: pkg/binary/3.3
name: couchbase-${{ needs.source.outputs.gem_version }}-x64-mingw-3.3
- uses: actions/download-artifact@v4
with:
path: pkg/binary/3.4
name: couchbase-${{ needs.source.outputs.gem_version }}-x64-mingw-3.4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
ruby-version: 3.4
- name: Repackage
run: |
ruby bin/jenkins/repackage-extension.rb
Expand Down Expand Up @@ -711,6 +814,7 @@ jobs:
# - '3.1'
# - '3.2'
# - '3.3'
# - '3.4'
# steps:
# - uses: actions/download-artifact@v4
# with:
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ gem "rake"

group :development do
gem "activesupport", "~> 7.0.3"
gem "drb"
gem "faker"
gem "flay"
gem "flog"
Expand All @@ -31,6 +32,7 @@ group :development do
gem "heckle"
gem "minitest"
gem "minitest-reporters"
gem "mutex_m"
gem "rack"
gem "reek"
gem "rubocop", require: false
Expand Down
Loading