@@ -13,85 +13,33 @@ permissions:
1313 contents : read
1414
1515jobs :
16+ test-matrix :
17+ runs-on : ubuntu-latest
18+
19+ outputs :
20+ matrix : ${{ steps.matrix.outputs.matrix }}
21+
22+ steps :
23+ - uses : actions/checkout@v6
24+
25+ - uses : ./
26+ with :
27+ ruby-version : ruby
28+
29+ - id : matrix
30+ run : echo "matrix=$(ruby generate-test-matrix.rb)" | tee -a "$GITHUB_OUTPUT"
31+
32+ - run : echo "$MATRIX" | yq -P
33+ env :
34+ MATRIX : ${{ steps.matrix.outputs.matrix }}
35+
1636 test :
37+ needs : [test-matrix]
38+
1739 strategy :
1840 fail-fast : false
1941 matrix :
20- os : [ ubuntu-22.04, ubuntu-24.04, ubuntu-22.04-arm, ubuntu-24.04-arm, macos-14, macos-15, macos-15-intel, windows-2022, windows-2025, windows-11-arm ]
21- ruby : [
22- ' 1.9' , '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4', '4.0', ruby-head,
23- jruby-9.4, jruby, jruby-head,
24- truffleruby, truffleruby-head,
25- truffleruby+graalvm, truffleruby+graalvm-head
26- ]
27- include :
28- - { os: windows-2022, ruby: mingw }
29- - { os: windows-2022, ruby: mswin }
30- - { os: windows-2022, ruby: ucrt }
31- - { os: windows-2025, ruby: mingw }
32- - { os: windows-2025, ruby: mswin }
33- - { os: windows-2025, ruby: ucrt }
34- - { os: ubuntu-24.04, ruby: asan }
35- - { os: ubuntu-24.04, ruby: asan-release }
36- exclude :
37- # https://github.com/ruby/setup-ruby/issues/496
38- - { os: ubuntu-22.04, ruby: '2.2' }
39- - { os: ubuntu-24.04, ruby: '1.9' }
40- - { os: ubuntu-24.04, ruby: '2.2' }
41- # These old Rubies fail to compile on macOS arm64
42- - { os: macos-14, ruby: '1.9' }
43- - { os: macos-14, ruby: '2.0' }
44- - { os: macos-14, ruby: '2.1' }
45- - { os: macos-14, ruby: '2.2' }
46- - { os: macos-14, ruby: '2.3' }
47- - { os: macos-14, ruby: '2.4' }
48- - { os: macos-14, ruby: '2.5' }
49- - { os: macos-15, ruby: '1.9' }
50- - { os: macos-15, ruby: '2.0' }
51- - { os: macos-15, ruby: '2.1' }
52- - { os: macos-15, ruby: '2.2' }
53- - { os: macos-15, ruby: '2.3' }
54- - { os: macos-15, ruby: '2.4' }
55- - { os: macos-15, ruby: '2.5' }
56- # These old Rubies fail to compile or segfault on Linux arm64
57- - { os: ubuntu-22.04-arm, ruby: '1.9' }
58- - { os: ubuntu-22.04-arm, ruby: '2.0' }
59- - { os: ubuntu-22.04-arm, ruby: '2.1' }
60- - { os: ubuntu-22.04-arm, ruby: '2.2' }
61- - { os: ubuntu-24.04-arm, ruby: '1.9' }
62- - { os: ubuntu-24.04-arm, ruby: '2.0' }
63- - { os: ubuntu-24.04-arm, ruby: '2.1' }
64- - { os: ubuntu-24.04-arm, ruby: '2.2' }
65- # RubyInstaller windows-arm64 builds only exist for Ruby 3.4+
66- - { os: windows-11-arm, ruby: '2.0' }
67- - { os: windows-11-arm, ruby: '2.1' }
68- - { os: windows-11-arm, ruby: '2.2' }
69- - { os: windows-11-arm, ruby: '2.3' }
70- - { os: windows-11-arm, ruby: '2.4' }
71- - { os: windows-11-arm, ruby: '2.5' }
72- - { os: windows-11-arm, ruby: '2.6' }
73- - { os: windows-11-arm, ruby: '2.7' }
74- - { os: windows-11-arm, ruby: '3.0' }
75- - { os: windows-11-arm, ruby: '3.1' }
76- - { os: windows-11-arm, ruby: '3.2' }
77- - { os: windows-11-arm, ruby: '3.3' }
78- # RubyInstaller has no 64-bit builds of 1.9 on Windows
79- - { os: windows-2022, ruby: '1.9' }
80- - { os: windows-2025, ruby: '1.9' }
81- - { os: windows-11-arm, ruby: '1.9' }
82- # TruffleRuby does not support Windows
83- - { os: windows-2022, ruby: truffleruby }
84- - { os: windows-2025, ruby: truffleruby }
85- - { os: windows-11-arm, ruby: truffleruby }
86- - { os: windows-2022, ruby: truffleruby-head }
87- - { os: windows-2025, ruby: truffleruby-head }
88- - { os: windows-11-arm, ruby: truffleruby-head }
89- - { os: windows-2022, ruby: truffleruby+graalvm }
90- - { os: windows-2025, ruby: truffleruby+graalvm }
91- - { os: windows-11-arm, ruby: truffleruby+graalvm }
92- - { os: windows-2022, ruby: truffleruby+graalvm-head }
93- - { os: windows-2025, ruby: truffleruby+graalvm-head }
94- - { os: windows-11-arm, ruby: truffleruby+graalvm-head }
42+ include : ${{ fromJSON(needs.test-matrix.outputs.matrix) }}
9543
9644 name : ${{ matrix.os }} ${{ matrix.ruby }}
9745 runs-on : ${{ matrix.os }}
11361 run : |
11462 ruby -e "puts 'build compiler: ' + RbConfig::CONFIG.fetch('CC_VERSION_MESSAGE', 'unknown').lines.first"
11563 - name : gcc and ridk version (mingw)
116- if : startsWith(matrix .os, 'windows')
64+ if : runner .os == 'Windows'
11765 run : |
11866 $abi, $plat = $(ruby -e "STDOUT.write RbConfig::CONFIG['ruby_version'] + ' ' + RUBY_PLATFORM").split(' ')
11967 if ($plat.Contains('mingw')) {
@@ -154,15 +102,15 @@ jobs:
154102 - name : bundle install (bash)
155103 run : bundle install
156104 shell : bash
157- if : startsWith(matrix .os, 'windows')
105+ if : runner .os == 'Windows'
158106 - name : bundle exec rake --version (bash)
159107 run : bundle exec rake --version
160108 shell : bash
161- if : startsWith(matrix .os, 'windows')
109+ if : runner .os == 'Windows'
162110 - name : bundle exec rake (bash)
163111 run : bundle exec rake
164112 shell : bash
165- if : startsWith(matrix .os, 'windows')
113+ if : runner .os == 'Windows'
166114
167115 - name : Test `gem github:` in a Gemfile
168116 run : bundle install
@@ -179,9 +127,9 @@ jobs:
179127 if : " matrix.ruby != 'mingw' && matrix.ruby != 'mswin' && matrix.ruby != 'ucrt'"
180128 - name : which rake
181129 run : which -a rake
182- if : " !startsWith(matrix .os, 'windows') "
130+ if : runner .os != 'Windows'
183131 - name : where ruby, rake, bundle
184- if : startsWith(matrix .os, 'windows')
132+ if : runner .os == 'Windows'
185133 run : |
186134 $ErrorActionPreference = 'Continue'
187135 $where = 'ruby', 'rake', 'bundle'
@@ -195,7 +143,7 @@ jobs:
195143 shell : bash
196144 run : echo ~ && bundle install
197145 - name : Windows JRuby
198- if : startsWith(matrix .os, 'windows') && startsWith(matrix.ruby, 'jruby')
146+ if : runner .os == 'Windows' && startsWith(matrix.ruby, 'jruby')
199147 run : gem install sassc
200148
201149 testDotRubyVersion :
0 commit comments