Skip to content

Commit e7b26dd

Browse files
nlopesclaude
andcommitted
ci(release): release crates from a release tag
Pushing a `release-*` tag on a commit on main releases every crate (acdc-cli, acdc-lsp, acdc-mcp, acdc-editor-wasm) whose `<crate>-vX.Y.Z` tag doesn't exist yet. release.yml runs the full CI and TCK on that commit, builds each crate for five targets with taiki-e/upload-rust-binary-action, and publishes each crate's GitHub release, with notes from its changelog, once CI, TCK and all of its builds pass. Changes to release.yml build everything without publishing. This replaces release-cli.yml, release-lsp.yml and release-editor-wasm.yml. The CLI tests also run on Windows and macOS now, since release builds don't run tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y3gNNefj3Dtn8WRLNzapGr
1 parent 3668171 commit e7b26dd

13 files changed

Lines changed: 414 additions & 405 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 50 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ on:
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

916
env:
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: |
@@ -75,6 +85,8 @@ jobs:
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'

‎.github/workflows/release-cli.yml‎

Lines changed: 0 additions & 169 deletions
This file was deleted.

‎.github/workflows/release-editor-wasm.yml‎

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)