@@ -11,17 +11,21 @@ jobs:
1111 - name : Check Whitespace
1212 run : git diff --check -- HEAD~1
1313 rust-build :
14+ name : Rust Build (${{ matrix.target }})
15+ runs-on : ${{ matrix.os }}
1416 strategy :
1517 matrix :
16- os :
17- - runner : ubuntu-latest
18- arch : x86_64
19- - runner : ubuntu-24.04-arm
20- arch : aarch64
21- - runner : macos-15
22- arch : aarch64
23- name : Rust Build (${{ matrix.os.runner }}-${{ matrix.os.arch }})
24- runs-on : ${{ matrix.os.runner }}
18+ include :
19+ - target : aarch64-apple-darwin
20+ os : macos-15
21+ - target : aarch64-unknown-linux-musl
22+ os : ubuntu-24.04-arm
23+ - target : aarch64-unknown-linux-gnu
24+ os : ubuntu-24.04-arm
25+ - target : x86_64-unknown-linux-musl
26+ os : ubuntu-24.04
27+ - target : x86_64-unknown-linux-gnu
28+ os : ubuntu-24.04
2529 steps :
2630 - uses : actions/checkout@v4
2731 - uses : actions/cache@v4
@@ -33,160 +37,107 @@ jobs:
3337 ~/.cargo/registry/cache/
3438 ~/.cargo/registry/index/
3539 ~/.rustup
36- key : ${{ matrix.os.runner }}-${{ matrix.os.arch }}-rust-${{ hashFiles('.github/workflows/ci.yml', 'Cargo.lock', 'rust-toolchain.yaml') }}
40+ key : ${{ matrix.target }}-rust-${{ hashFiles('.github/workflows/ci.yml', 'Cargo.lock', 'rust-toolchain.toml') }}
41+ - name : Install musl-tools
42+ if : endsWith(matrix.target, '-musl')
43+ run : sudo apt-get update && sudo apt-get install -y musl-tools
3744 - name : Run fmt
3845 run : cargo fmt --check
3946 - name : Build release
40- run : cargo build --release
47+ run : cargo build --release --target ${{ matrix.target }}
4148 - name : Run clippy
42- run : cargo clippy --release
43- ruby-spec :
44- name : Unit Specs
49+ run : cargo clippy --release --target ${{ matrix.target }}
50+ - uses : actions/upload-artifact@v4
51+ with :
52+ name : manager-${{ matrix.target }}
53+ path : target/${{ matrix.target }}/release/manager
54+ ruby-tests :
55+ name : Ruby Tests
56+ needs : rust-build
4557 runs-on : ${{ matrix.os }}
46- timeout-minutes : 10
47- defaults :
48- run :
49- working-directory : ruby
58+ timeout-minutes : 30
5059 strategy :
5160 fail-fast : false
5261 matrix :
5362 ruby : [ruby-3.2, ruby-3.3, ruby-3.4]
54- os : [ubuntu-latest, macos-latest]
63+ target :
64+ - aarch64-apple-darwin
65+ - aarch64-unknown-linux-musl
66+ - aarch64-unknown-linux-gnu
67+ - x86_64-unknown-linux-musl
68+ - x86_64-unknown-linux-gnu
5569 execution :
56- - bundle exec rspec spec/unit
57- - bundle exec mutant environment test run spec/unit
70+ - rspec spec-unit
71+ - mutant test
72+ - rspec integration-misc
73+ - rspec integration-minitest
74+ - rspec integration-rspec
75+ - rspec integration-generation
76+ - rubocop
77+ include :
78+ - target : aarch64-apple-darwin
79+ os : macos-15
80+ - target : aarch64-unknown-linux-musl
81+ os : ubuntu-24.04-arm
82+ - target : aarch64-unknown-linux-gnu
83+ os : ubuntu-24.04-arm
84+ - target : x86_64-unknown-linux-musl
85+ os : ubuntu-24.04
86+ - target : x86_64-unknown-linux-gnu
87+ os : ubuntu-24.04
5888 steps :
5989 - uses : actions/checkout@v4
90+ - uses : actions/download-artifact@v4
91+ with :
92+ name : manager-${{ matrix.target }}
93+ path : ./bin
94+ - run : chmod +x ./bin/manager
95+ - run : ./bin/manager ruby prepare
6096 - uses : ruby/setup-ruby@v1
6197 with :
6298 ruby-version : ${{ matrix.ruby }}
6399 bundler-cache : true
64100 working-directory : ./ruby
65- - run : ${{ matrix.execution }}
101+ - run : ./bin/manager ruby ${{ matrix.execution }}
66102 ruby-mutant :
67103 name : Mutation coverage
104+ needs : rust-build
68105 runs-on : ${{ matrix.os }}
69106 timeout-minutes : 30
70- defaults :
71- run :
72- working-directory : ruby
73107 strategy :
74108 fail-fast : false
75109 matrix :
76110 ruby : [ruby-3.2, ruby-3.3, ruby-3.4]
77- os : [ubuntu-latest, macos-latest]
111+ target :
112+ - aarch64-apple-darwin
113+ - aarch64-unknown-linux-musl
114+ - aarch64-unknown-linux-gnu
115+ - x86_64-unknown-linux-musl
116+ - x86_64-unknown-linux-gnu
117+ include :
118+ - target : aarch64-apple-darwin
119+ os : macos-15
120+ - target : aarch64-unknown-linux-musl
121+ os : ubuntu-24.04-arm
122+ - target : aarch64-unknown-linux-gnu
123+ os : ubuntu-24.04-arm
124+ - target : x86_64-unknown-linux-musl
125+ os : ubuntu-24.04
126+ - target : x86_64-unknown-linux-gnu
127+ os : ubuntu-24.04
78128 steps :
79129 - uses : actions/checkout@v4
80130 with :
81131 fetch-depth : 0
82- - uses : ruby/setup-ruby@v1
83- with :
84- ruby-version : ${{ matrix.ruby }}
85- bundler-cache : true
86- working-directory : ./ruby
87- - run : bundle exec mutant run --zombie --since HEAD~1
88- ruby-integration-misc :
89- name : Integration Misc
90- runs-on : ${{ matrix.os }}
91- timeout-minutes : 10
92- defaults :
93- run :
94- working-directory : ruby
95- strategy :
96- fail-fast : false
97- matrix :
98- ruby : [ruby-3.2, ruby-3.3, ruby-3.4]
99- os : [ubuntu-latest, macos-latest]
100- steps :
101- - uses : actions/checkout@v4
102- - uses : ruby/setup-ruby@v1
103- with :
104- ruby-version : ${{ matrix.ruby }}
105- bundler-cache : true
106- working-directory : ./ruby
107- - run : |
108- bundle exec rspec \
109- spec/integration/mutant/null_spec.rb \
110- spec/integration/mutant/isolation/fork_spec.rb \
111- spec/integration/mutant/test_mutator_handles_types_spec.rb \
112- spec/integration/mutant/parallel_spec.rb
113- ruby-integration-minitest :
114- name : Integration Minitest
115- runs-on : ${{ matrix.os }}
116- timeout-minutes : 10
117- defaults :
118- run :
119- working-directory : ruby
120- strategy :
121- fail-fast : false
122- matrix :
123- ruby : [ruby-3.2, ruby-3.3, ruby-3.4]
124- os : [ubuntu-latest, macos-latest]
125- steps :
126- - uses : actions/checkout@v4
127- - uses : ruby/setup-ruby@v1
132+ - uses : actions/download-artifact@v4
128133 with :
129- ruby-version : ${{ matrix.ruby }}
130- bundler-cache : true
131- working-directory : ./ruby
132- - run : bundle exec rspec spec/integration -e minitest
133- ruby-integration-rspec :
134- name : Integration RSpec
135- runs-on : ${{ matrix.os }}
136- timeout-minutes : 10
137- defaults :
138- run :
139- working-directory : ruby
140- strategy :
141- fail-fast : false
142- matrix :
143- ruby : [ruby-3.2, ruby-3.3, ruby-3.4]
144- os : [ubuntu-latest, macos-latest]
145- steps :
146- - uses : actions/checkout@v4
147- - uses : ruby/setup-ruby@v1
148- with :
149- ruby-version : ${{ matrix.ruby }}
150- bundler-cache : true
151- working-directory : ./ruby
152- - run : bundle exec rspec spec/integration -e rspec
153- ruby-integration-generation :
154- name : Integration Mutation Generation
155- runs-on : ${{ matrix.os }}
156- timeout-minutes : 10
157- defaults :
158- run :
159- working-directory : ruby
160- strategy :
161- fail-fast : false
162- matrix :
163- ruby : [ruby-3.2, ruby-3.3, ruby-3.4]
164- os : [ubuntu-latest, macos-latest]
165- steps :
166- - uses : actions/checkout@v4
167- - uses : ruby/setup-ruby@v1
168- with :
169- ruby-version : ${{ matrix.ruby }}
170- bundler-cache : true
171- working-directory : ./ruby
172- - run : bundle exec rspec spec/integration -e generation
173- ruby-rubocop :
174- name : Rubocop
175- runs-on : ${{ matrix.os }}
176- timeout-minutes : 10
177- defaults :
178- run :
179- working-directory : ruby
180- strategy :
181- fail-fast : false
182- matrix :
183- ruby : [ruby-3.2, ruby-3.3, ruby-3.4]
184- os : [ubuntu-latest, macos-latest]
185- steps :
186- - uses : actions/checkout@v4
134+ name : manager-${{ matrix.target }}
135+ path : ./bin
136+ - run : chmod +x ./bin/manager
137+ - run : ./bin/manager ruby prepare
187138 - uses : ruby/setup-ruby@v1
188139 with :
189140 ruby-version : ${{ matrix.ruby }}
190141 bundler-cache : true
191142 working-directory : ./ruby
192- - run : bundle exec rubocop
143+ - run : ./bin/manager ruby mutant run --zombie --since HEAD~1
0 commit comments