diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8fe6500b..b8cf75f3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -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 @@ -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 @@ -135,7 +141,7 @@ jobs: build_linux_x86_64: needs: source - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -143,6 +149,7 @@ jobs: - '3.1' - '3.2' - '3.3' + - '3.4' steps: - uses: hendrikmuhs/ccache-action@v1.2 with: @@ -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 @@ -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/ccache-action@v1.2 + 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 @@ -212,6 +297,7 @@ jobs: - '3.1' - '3.2' - '3.3' + - '3.4' steps: - uses: hendrikmuhs/ccache-action@v1.2 with: @@ -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 @@ -281,6 +371,7 @@ jobs: - '3.1' - '3.2' - '3.3' + - '3.4' steps: - uses: hendrikmuhs/ccache-action@v1.2 with: @@ -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 @@ -353,6 +448,7 @@ jobs: - '3.1' - '3.2' - '3.3' + - '3.4' steps: - uses: actions/download-artifact@v4 with: @@ -413,6 +509,7 @@ jobs: - '3.1' - '3.2' - '3.3' + - '3.4' steps: - uses: actions/download-artifact@v4 with: @@ -476,6 +573,7 @@ jobs: - '3.1' - '3.2' - '3.3' + - '3.4' steps: - uses: actions/download-artifact@v4 with: @@ -631,6 +729,7 @@ jobs: - '3.1' - '3.2' - '3.3' + - '3.4' steps: - uses: ruby/setup-ruby@v1 with: @@ -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 @@ -711,6 +814,7 @@ jobs: # - '3.1' # - '3.2' # - '3.3' + # - '3.4' # steps: # - uses: actions/download-artifact@v4 # with: diff --git a/Gemfile b/Gemfile index c3618a84..261e2d87 100644 --- a/Gemfile +++ b/Gemfile @@ -23,6 +23,7 @@ gem "rake" group :development do gem "activesupport", "~> 7.0.3" + gem "drb" gem "faker" gem "flay" gem "flog" @@ -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