55 branches : [main]
66 pull_request :
77 branches : ['*']
8+ # release.yml runs the whole CI on the commit it releases.
9+ workflow_call :
10+ inputs :
11+ all :
12+ description : Run every job, ignoring the path filters
13+ type : boolean
14+ default : false
815
916env :
1017 CARGO_TERM_COLOR : always
@@ -13,16 +20,19 @@ jobs:
1320 changes :
1421 runs-on : ubuntu-latest
1522 outputs :
16- parser : ${{ steps.filter.outputs.parser }}
17- converters : ${{ steps.filter.outputs.converters }}
18- cli : ${{ steps.filter.outputs.cli }}
19- lsp : ${{ steps.filter.outputs.lsp }}
20- mcp : ${{ steps.filter.outputs.mcp }}
21- pdf : ${{ steps.filter.outputs.pdf }}
22- wasm : ${{ steps.filter.outputs.wasm }}
23+ parser : ${{ inputs.all && 'true' || steps.filter.outputs.parser }}
24+ converters : ${{ inputs.all && 'true' || steps.filter.outputs.converters }}
25+ cli : ${{ inputs.all && 'true' || steps.filter.outputs.cli }}
26+ lsp : ${{ inputs.all && 'true' || steps.filter.outputs.lsp }}
27+ mcp : ${{ inputs.all && 'true' || steps.filter.outputs.mcp }}
28+ pdf : ${{ inputs.all && 'true' || steps.filter.outputs.pdf }}
29+ wasm : ${{ inputs.all && 'true' || steps.filter.outputs.wasm }}
30+ workflows : ${{ inputs.all && 'true' || steps.filter.outputs.workflows }}
2331 steps :
2432 - uses : actions/checkout@v7
33+ if : ${{ !inputs.all }}
2534 - uses : dorny/paths-filter@v4
35+ if : ${{ !inputs.all }}
2636 id : filter
2737 with :
2838 filters : |
7585 - 'Cargo.toml'
7686 - 'Cargo.lock'
7787 - 'rust-toolchain.toml'
88+ workflows:
89+ - '.github/workflows/**'
7890
7991 fmt :
8092 runs-on : ubuntu-latest
@@ -186,7 +198,14 @@ jobs:
186198 test-cli :
187199 needs : changes
188200 if : needs.changes.outputs.cli == 'true'
189- runs-on : ubuntu-latest
201+ strategy :
202+ fail-fast : false
203+ matrix :
204+ # Release builds don't run tests, so the CLI suite runs on every
205+ # release OS here. libghostty-vt's C++ needs the VS 2022 STL on
206+ # Windows (see the target table in release.yml).
207+ os : [ubuntu-latest, windows-2022, macos-15]
208+ runs-on : ${{ matrix.os }}
190209 steps :
191210 - uses : actions/checkout@v7
192211 - uses : dtolnay/rust-toolchain@stable
@@ -198,33 +217,56 @@ jobs:
198217 env-vars : ImageOS
199218 - uses : taiki-e/install-action@nextest
200219 - name : Run CLI and execute library tests
220+ if : runner.os == 'Linux'
201221 run : cargo nextest run -p acdc-cli -p acdc-execute --all-features --verbose --no-tests warn --test-threads 1 # we've added this until https://github.com/nextest-rs/nextest/pull/3553 gets merged
222+ - name : Run CLI tests
223+ if : runner.os != 'Linux'
224+ run : cargo nextest run -p acdc-cli --all-features --verbose --test-threads 1 --no-fail-fast
202225 - name : Run execute-only tests
226+ if : runner.os == 'Linux'
203227 run : cargo nextest run -p acdc-cli -p acdc-execute --no-default-features --features execute --verbose --test-threads 1
204228 - name : Test execute with the parser network capability
229+ if : runner.os == 'Linux'
205230 run : cargo nextest run -p acdc-execute --no-default-features --features acdc-parser/network -E 'test(substitution_is_independent_of_optional_capabilities)' --verbose
206231 - name : Smoke-test backend-only CLI builds
232+ if : runner.os == 'Linux'
207233 shell : bash
208234 run : |
209235 for feature in html manpage markdown pdf terminal; do
210236 cargo run -p acdc-cli --no-default-features --features "$feature" -- convert --help
211237 done
212238 - name : Smoke-test tool-only CLI builds
239+ if : runner.os == 'Linux'
213240 shell : bash
214241 run : |
215242 cargo run -p acdc-cli --no-default-features --features execute -- execute --help
216243 cargo run -p acdc-cli --no-default-features --features inspect -- inspect --help
217244 cargo run -p acdc-cli --no-default-features --features lint -- lint --help
218245 cargo run -p acdc-cli --no-default-features --features tck -- tck --help
219246 - name : Test native JSON without backends
247+ if : runner.os == 'Linux'
220248 run : cargo nextest run -p acdc-cli --no-default-features --test cli --test json_output
221249 - name : Test standalone ASG and fixed TCK export
250+ if : runner.os == 'Linux'
222251 shell : bash
223252 run : |
224253 for feature in asg tck; do
225254 cargo nextest run -p acdc-cli --no-default-features --features "$feature" --test json_output
226255 done
227256
257+ lint-workflows :
258+ needs : changes
259+ if : needs.changes.outputs.workflows == 'true'
260+ runs-on : ubuntu-latest
261+ steps :
262+ - uses : actions/checkout@v7
263+ - name : Lint workflows
264+ env :
265+ ACTIONLINT_VERSION : 1.7.12
266+ run : |
267+ bash <(curl -sSfL "https://raw.githubusercontent.com/rhysd/actionlint/v${ACTIONLINT_VERSION}/scripts/download-actionlint.bash") "$ACTIONLINT_VERSION"
268+ ./actionlint -color .github/workflows/ci.yml .github/workflows/tck.yml .github/workflows/release.yml
269+
228270 test-lsp :
229271 needs : changes
230272 if : needs.changes.outputs.lsp == 'true'
0 commit comments