@@ -217,15 +217,16 @@ jobs:
217217 - run : ./bin/test-gem-install gems -- --${{ matrix.syslib }}-system-libraries ${{ matrix.compile_flags }}
218218 shell : bash
219219
220- cruby-native-package :
221- needs : ["native_setup"]
220+ build_native_gem :
221+ needs : native_setup
222+ name : " build native"
222223 strategy :
223224 fail-fast : false
224225 matrix :
225- plat :
226+ platform :
226227 - " aarch64-linux"
227228 - " arm-linux"
228- - " arm64-darwin" # github actions does not support this runtime as of 2022-12, but let's build anyway
229+ - " arm64-darwin"
229230 - " x64-mingw-ucrt"
230231 - " x64-mingw32"
231232 - " x86-linux"
@@ -237,162 +238,107 @@ jobs:
237238 - uses : actions/cache@v4
238239 with :
239240 path : ports/archives
240- key : ports-archives-tarball-${{hashFiles('ext/sqlite3/extconf.rb','dependencies.yml')}}
241- - env :
242- DOCKER_IMAGE : " ghcr.io/rake-compiler/rake-compiler-dock-image:${{needs.native_setup.outputs.rcd_image_version}}-mri-${{matrix.plat}}"
243- run : |
244- docker run --rm -v "$(pwd):/sqlite3" -w /sqlite3 ${DOCKER_IMAGE} \
245- ./bin/test-gem-build gems ${{matrix.plat}}
241+ key : ports-archives-tarball-${{ hashFiles('ext/sqlite3/extconf.rb','dependencies.yml') }}
242+ - run : |
243+ docker run --rm -v $PWD:/work -w /work \
244+ ghcr.io/rake-compiler/rake-compiler-dock-image:${{ needs.native_setup.outputs.rcd_image_version }}-mri-${{ matrix.platform }} \
245+ ./bin/test-gem-build gems ${{ matrix.platform }}
246246 - uses : actions/upload-artifact@v3
247247 with :
248- name : " cruby-${{matrix.plat }}-gem"
248+ name : " cruby-${{ matrix.platform }}-gem"
249249 path : gems
250250 retention-days : 1
251251
252- cruby-aarch64-linux-install :
253- needs : ["cruby-native-package"]
254- strategy :
255- fail-fast : false
256- matrix :
257- ruby : ["3.0", "3.1", "3.2", "3.3"]
258- runs-on : ubuntu-latest
259- steps :
260- - uses : actions/checkout@v4
261- - uses : actions/download-artifact@v3
262- with :
263- name : cruby-aarch64-linux-gem
264- path : gems
265- - run : |
266- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
267- docker run --rm -v "$(pwd):/sqlite3" -w /sqlite3 \
268- --platform=linux/arm64/v8 \
269- ruby:${{matrix.ruby}} \
270- ./bin/test-gem-install ./gems
271-
272- cruby-arm-linux-install :
273- needs : ["cruby-native-package"]
274- strategy :
275- fail-fast : false
276- matrix :
277- ruby : ["3.0", "3.1", "3.2", "3.3"]
278- runs-on : ubuntu-latest
279- steps :
280- - uses : actions/checkout@v4
281- - uses : actions/download-artifact@v3
282- with :
283- name : cruby-arm-linux-gem
284- path : gems
285- - run : |
286- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
287- docker run --rm -v "$(pwd):/sqlite3" -w /sqlite3 \
288- --platform=linux/arm/v7 \
289- ruby:${{matrix.ruby}} \
290- ./bin/test-gem-install ./gems
291-
292- # # arm64-darwin installation testing is omitted until github actions supports it
293- # cruby-arm64-darwin-install:
294- # ...
295-
296- cruby-x64-mingw-ucrt-install :
297- needs : ["cruby-native-package"]
252+ test_architecture_matrix :
253+ name : " ${{ matrix.platform }} ${{ matrix.ruby }}"
254+ needs : build_native_gem
298255 strategy :
299256 fail-fast : false
300257 matrix :
301- ruby : ["3.1", "3.2", "3.3"]
302- runs-on : windows-2022
303- steps :
304- - uses : actions/checkout@v4
305- - uses : ruby/setup-ruby@v1
306- with :
307- ruby-version : " ${{matrix.ruby}}"
308- - uses : actions/download-artifact@v3
309- with :
310- name : cruby-x64-mingw-ucrt-gem
311- path : gems
312- - run : |
313- gem install --verbose --no-document gems/*.gem
314- gem list -d sqlite3
315- ruby -rsqlite3 -e 'puts SQLite3::SQLITE_LOADED_VERSION'
316-
317- cruby-x64-mingw32-install :
318- needs : ["cruby-native-package"]
319- strategy :
320- fail-fast : false
321- matrix :
322- ruby : ["3.0"]
323- runs-on : windows-2019
324- steps :
325- - uses : actions/checkout@v4
326- - uses : ruby/setup-ruby@v1
327- with :
328- ruby-version : " ${{matrix.ruby}}"
329- - uses : actions/download-artifact@v3
330- with :
331- name : cruby-x64-mingw32-gem
332- path : gems
333- - run : |
334- gem install --verbose --no-document gems/*.gem
335- gem list -d sqlite3
336- ruby -rsqlite3 -e 'puts SQLite3::SQLITE_LOADED_VERSION'
337-
338- cruby-x86-linux-install :
339- needs : ["cruby-native-package"]
340- strategy :
341- fail-fast : false
342- matrix :
343- ruby : ["3.0", "3.1", "3.2", "3.3"]
258+ platform :
259+ - aarch64-linux
260+ # - aarch64-linux-gnu
261+ # - aarch64-linux-musl
262+ - arm-linux
263+ # - arm-linux-gnu
264+ # - arm-linux-musl
265+ - x86-linux
266+ # - x86-linux-gnu
267+ # - x86-linux-musl
268+ - x86_64-linux
269+ # - x86_64-linux-gnu
270+ # - x86_64-linux-musl
271+ ruby : ["3.3", "3.2", "3.1", "3.0"]
272+ include :
273+ # # declare docker image for each platform
274+ # - { platform: aarch64-linux-musl, docker_tag: "-alpine" }
275+ # - { platform: arm-linux-musl, docker_tag: "-alpine" }
276+ # - { platform: x86-linux-musl, docker_tag: "-alpine" }
277+ # - { platform: x86_64-linux-musl, docker_tag: "-alpine" }
278+ # declare docker platform for each platform
279+ - { platform: aarch64-linux, docker_platform: "--platform=linux/arm64" }
280+ # - { platform: aarch64-linux-gnu, docker_platform: "--platform=linux/arm64" }
281+ # - { platform: aarch64-linux-musl, docker_platform: "--platform=linux/arm64" }
282+ - { platform: arm-linux, docker_platform: "--platform=linux/arm/v7" }
283+ # - { platform: arm-linux-gnu, docker_platform: "--platform=linux/arm/v7" }
284+ # - { platform: arm-linux-musl, docker_platform: "--platform=linux/arm/v7" }
285+ - { platform: x86-linux, docker_platform: "--platform=linux/386" }
286+ # - { platform: x86-linux-gnu, docker_platform: "--platform=linux/386" }
287+ # - { platform: x86-linux-musl, docker_platform: "--platform=linux/386" }
344288 runs-on : ubuntu-latest
345289 steps :
346290 - uses : actions/checkout@v4
347291 - uses : actions/download-artifact@v3
348292 with :
349- name : cruby-x86-linux -gem
293+ name : cruby-${{ matrix.platform }} -gem
350294 path : gems
351295 - run : |
352296 docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
353- docker run --rm -v "$(pwd):/sqlite3" -w /sqlite3 \
354- --platform=linux/386 \
355- ruby:${{matrix.ruby}} \
297+ docker run --rm -v $PWD:/work -w /work \
298+ ${{ matrix.docker_platform}} ruby:${{ matrix.ruby }} \
356299 ./bin/test-gem-install ./gems
357300
358- cruby-x86_64-darwin-install :
359- needs : ["cruby-native-package"]
301+ test_the_rest :
302+ name : " ${{ matrix.platform }} ${{ matrix.ruby }}"
303+ needs : build_native_gem
360304 strategy :
361305 fail-fast : false
362306 matrix :
363- ruby : ["3.0", "3.1", "3.2", "3.3"]
364- runs-on : macos-latest
365- steps :
366- - uses : actions/checkout@v4
367- - uses : ruby/setup-ruby@v1
368- with :
369- ruby-version : " ${{matrix.ruby}}"
370- - uses : actions/download-artifact@v3
371- with :
372- name : cruby-x86_64-darwin-gem
373- path : gems
374- - run : ./bin/test-gem-install gems
375-
376- cruby-x86_64-linux-install :
377- needs : ["cruby-native-package"]
378- strategy :
379- fail-fast : false
380- matrix :
381- ruby : ["3.0", "3.1", "3.2", "3.3"]
382- runs-on : ubuntu-latest
307+ os : [macos]
308+ ruby : ["3.3", "3.2", "3.1", "3.0"]
309+ include :
310+ - os : macos
311+ platform : x86_64-darwin
312+ # # arm64-darwin installation testing is omitted until github actions supports it
313+ # - os: macos
314+ # platform: arm64-darwin
315+ - os : windows
316+ ruby : " 3.0"
317+ platform : x64-mingw32
318+ - os : windows
319+ ruby : " 3.1"
320+ platform : x64-mingw-ucrt
321+ - os : windows
322+ ruby : " 3.2"
323+ platform : x64-mingw-ucrt
324+ - os : windows
325+ ruby : " 3.3"
326+ platform : x64-mingw-ucrt
327+ runs-on : ${{ matrix.os }}-latest
383328 steps :
384329 - uses : actions/checkout@v4
385330 - uses : ruby/setup-ruby@v1
386331 with :
387- ruby-version : " ${{matrix.ruby}}"
332+ ruby-version : " ${{ matrix.ruby }}"
388333 - uses : actions/download-artifact@v3
389334 with :
390- name : cruby-x86_64-linux -gem
335+ name : cruby-${{ matrix.platform }} -gem
391336 path : gems
392337 - run : ./bin/test-gem-install gems
338+ shell : bash
393339
394340 cruby-x86_64-linux-musl-install :
395- needs : ["cruby-native-package"]
341+ needs : build_native_gem
396342 strategy :
397343 fail-fast : false
398344 matrix :
0 commit comments