@@ -194,55 +194,17 @@ jobs:
194194 - run : bundle exec rake test:valgrind
195195
196196 #
197- # gem tests (source and native)
197+ # gem build (source and native)
198198 #
199- native_setup :
199+ build_gems :
200200 needs : basic
201- name : " Setup for native gem tests"
202- runs-on : ubuntu-latest
203- outputs :
204- rcd_image_version : ${{ steps.rcd_image_version.outputs.rcd_image_version }}
205- steps :
206- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
207- with :
208- persist-credentials : false
209- - uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 # zizmor: ignore[cache-poisoning]
210- with :
211- path : ports/archives
212- key : ports-archives-tarball-${{ hashFiles('ext/sqlite3/extconf.rb','dependencies.yml') }}
213- - uses : ruby/setup-ruby@dffb23f65a78bba8db45d387d5ea1bbd6be3ef18 # v1.293.0
214- with :
215- ruby-version : " 4.0"
216- bundler-cache : true # zizmor: ignore[cache-poisoning]
217- - run : bundle exec ruby ./ext/sqlite3/extconf.rb --download-dependencies
218- - id : rcd_image_version
219- run : bundle exec ruby -e 'require "rake_compiler_dock"; puts "rcd_image_version=#{RakeCompilerDock::IMAGE_VERSION}"' >> $GITHUB_OUTPUT
220-
221- build_source_gem :
222- needs : native_setup
223- name : " build source"
224- runs-on : ubuntu-latest
225- steps :
226- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
227- with :
228- persist-credentials : false
229- - uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 # zizmor: ignore[cache-poisoning]
230- with :
231- path : ports/archives
232- key : ports-archives-tarball-${{ hashFiles('ext/sqlite3/extconf.rb','dependencies.yml') }}
233- - uses : ruby/setup-ruby@dffb23f65a78bba8db45d387d5ea1bbd6be3ef18 # v1.293.0
234- with :
235- ruby-version : " 4.0"
236- bundler-cache : true # zizmor: ignore[cache-poisoning]
237- - run : ./bin/test-gem-build gems ruby
238- - uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
239- with :
240- name : source-gem
241- path : gems
242- retention-days : 1
201+ uses : ./.github/workflows/build-gems.yml
243202
203+ #
204+ # gem tests (source and native)
205+ #
244206 install_source_linux :
245- needs : [build_source_gem , ruby_versions]
207+ needs : [build_gems , ruby_versions]
246208 name : " test source"
247209 strategy :
248210 fail-fast : false
@@ -270,48 +232,9 @@ jobs:
270232 - run : ./bin/test-gem-install gems -- --${{ matrix.syslib }}-system-libraries ${{ matrix.compile_flags }}
271233 shell : sh
272234
273- build_native_gem :
274- needs : native_setup
275- name : " build native"
276- strategy :
277- fail-fast : false
278- matrix :
279- platform :
280- - aarch64-linux-gnu
281- - aarch64-linux-musl
282- - arm-linux-gnu
283- - arm-linux-musl
284- - arm64-darwin
285- - x64-mingw-ucrt
286- - x86-linux-gnu
287- - x86-linux-musl
288- - x86_64-darwin
289- - x86_64-linux-gnu
290- - x86_64-linux-musl
291- runs-on : ubuntu-latest
292- steps :
293- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
294- with :
295- persist-credentials : false
296- - uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 # zizmor: ignore[cache-poisoning]
297- with :
298- path : ports/archives
299- key : ports-archives-tarball-${{ hashFiles('ext/sqlite3/extconf.rb','dependencies.yml') }}
300- - run : |
301- docker run --rm -v $PWD:/work -w /work \
302- ghcr.io/rake-compiler/rake-compiler-dock-image:${NEEDS_NATIVE_SETUP_OUTPUTS_RCD_IMAGE_VERSION}-mri-${{ matrix.platform }} \
303- ./bin/test-gem-build gems ${{ matrix.platform }}
304- env:
305- NEEDS_NATIVE_SETUP_OUTPUTS_RCD_IMAGE_VERSION: ${{ needs.native_setup.outputs.rcd_image_version }}
306- - uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
307- with :
308- name : " cruby-${{ matrix.platform }}-gem"
309- path : gems
310- retention-days : 1
311-
312235 test_architecture_matrix :
313236 name : " ${{ matrix.platform }} ${{ matrix.ruby }}"
314- needs : [build_native_gem , ruby_versions]
237+ needs : [build_gems , ruby_versions]
315238 strategy :
316239 fail-fast : false
317240 matrix :
@@ -359,7 +282,7 @@ jobs:
359282
360283 test_the_rest :
361284 name : " ${{ matrix.platform }} ${{ matrix.ruby }}"
362- needs : [build_native_gem , ruby_versions]
285+ needs : [build_gems , ruby_versions]
363286 strategy :
364287 fail-fast : false
365288 matrix :
@@ -388,7 +311,7 @@ jobs:
388311 shell : sh
389312
390313 cruby-x86_64-linux-musl-install :
391- needs : build_native_gem
314+ needs : build_gems
392315 strategy :
393316 fail-fast : false
394317 matrix :
0 commit comments