From 1db7935268eef414cf2ffc7a0fcb38e9a65a0fb6 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 16 Jul 2023 01:07:37 -0700 Subject: [PATCH] Go back to using rack-compiler-dock to build gems --- .github/workflows/precompiled.yml | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/workflows/precompiled.yml b/.github/workflows/precompiled.yml index 9b7bf5f..8f2bad6 100644 --- a/.github/workflows/precompiled.yml +++ b/.github/workflows/precompiled.yml @@ -147,6 +147,7 @@ jobs: ruby -r re2 -e "puts RE2::Regexp.new('(\d+)').match(\"bob 123\")" cruby-native-package: + needs: ["rcd_image_version"] strategy: fail-fast: false matrix: @@ -166,12 +167,13 @@ jobs: with: path: ports/archives key: archives-ubuntu-${{hashFiles('ext/re2/extconf.rb')}} - - uses: ruby/setup-ruby@v1 - with: - ruby-version: "3.1" - bundler-cache: true - - run: ./bin/test-gem-build gems ${{matrix.plat}} - - uses: actions/upload-artifact@v2 + - env: + DOCKER_IMAGE: "ghcr.io/rake-compiler/rake-compiler-dock-image:${{needs.rcd_image_version.outputs.rcd_image_version}}-mri-${{matrix.plat}}" + run: | + docker run --rm -v "$(pwd):/re2" -w /re2 \ + ${DOCKER_IMAGE} \ + ./scripts/test-gem-build gems ${{matrix.plat}} + - uses: actions/upload-artifact@v3 with: name: "cruby-${{matrix.plat}}-gem" path: gems @@ -330,3 +332,20 @@ jobs: name: cruby-x64-mingw-ucrt-gem path: gems - run: ./bin/test-gem-install gems + + # + # SECTION the end-to-end gem installation tests + # + rcd_image_version: + runs-on: ubuntu-latest + outputs: + rcd_image_version: ${{steps.rcd_image_version.outputs.rcd_image_version}} + steps: + - uses: actions/checkout@v3 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.2" + bundler-cache: true + bundler: latest + - id: rcd_image_version + run: bundle exec ruby -e 'require "rake_compiler_dock"; puts "rcd_image_version=#{RakeCompilerDock::IMAGE_VERSION}"' >> $GITHUB_OUTPUT