aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-12 17:11:34 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-12 17:12:54 +0800
commit2efec9d3924ce1d806b04e2d51c1cda285bf501d (patch)
tree5490a4ab433f77ae0e078558028f808b1dc6087e /.github/workflows/ci.yml
parent9dad6b93e4e735d061db6b4349227d8f23b65116 (diff)
ci: Refactor CI workflows into single check matrix
Replace the separate code/docs CI jobs and local check flags with a unified `--check-*` flag system, enabling each check to run independently across a platform matrix.
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml39
1 files changed, 6 insertions, 33 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d8b133f..8210703 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -8,48 +8,21 @@ permissions:
contents: write
jobs:
- Check-Codes:
+ Check:
strategy:
+ fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
+ item: [build, clippy, test, arg-picker, markdown-code, examples, docs-refresh, api-docs]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- - name: Restore .temp cache
- id: cache-temp
- uses: actions/cache@v4
- with:
- path: .temp
- key: ${{ runner.os }}-mingling-temp-codes-${{ hashFiles('.run/Cargo.toml', '.run/src/**/*.rs', 'Cargo.lock', 'verified-docs.toml', 'examples/test-examples.toml') }}
- restore-keys: |
- ${{ runner.os }}-mingling-temp-codes-
-
- - run: cargo ci --test-codes
-
- Check-Docs:
- strategy:
- matrix:
- os: [ubuntu-latest, windows-latest]
- runs-on: ${{ matrix.os }}
- steps:
- - uses: actions/checkout@v4
- - uses: actions-rust-lang/setup-rust-toolchain@v1
-
- - name: Restore .temp cache
- id: cache-temp
- uses: actions/cache@v4
- with:
- path: .temp
- key: ${{ runner.os }}-mingling-temp-docs-${{ hashFiles('.run/Cargo.toml', '.run/src/**/*.rs', 'Cargo.lock', 'verified-docs.toml', 'examples/test-examples.toml') }}
- restore-keys: |
- ${{ runner.os }}-mingling-temp-docs-
-
- - run: cargo ci --test-docs
+ - run: cargo ci --check-${{ matrix.item }}
- name: Upload docs test result on failure
- if: failure()
+ if: failure() && matrix.item == 'markdown-code'
uses: actions/upload-artifact@v4
with:
name: docs-test-result-${{ matrix.os }}.md
@@ -57,7 +30,7 @@ jobs:
Move-Unreleased-Tag:
if: github.ref == 'refs/heads/main'
- needs: [Check-Codes, Check-Docs]
+ needs: [Check]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4