summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2021-11-27 06:39:22 -0500
committerGitHub <noreply@github.com>2021-11-27 06:39:22 -0500
commit16f091330734acae7c6ab17ea4912fe835004e2f (patch)
tree8d0e572724a13cece2dd2a6162669b4e87bb2d8c
parent5c8757a1fa2d90a1902594706b6e29771703d576 (diff)
ci: deal with skipping, matrices, reliant jobs (#617)
This time, the problem is that since the matrix jobs rely on another job, they never trigger and clog up CI.
-rw-r--r--.github/workflows/ci.yml42
1 files changed, 25 insertions, 17 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4c56ba56..7e0f6631 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -14,22 +14,7 @@ on:
- master
jobs:
- pre_job:
- runs-on: ubuntu-latest
- outputs:
- should_skip: ${{ steps.skip_check.outputs.should_skip }}
- steps:
- - id: skip_check
- uses: fkirc/skip-duplicate-actions@master
- with:
- concurrent_skipping: "same_content_newer"
- skip_after_successful_duplicate: "true"
- paths_ignore: '["**/README.md", "**/docs/**", "assets/**", ".cargo-husky/**", ".all-contributorsrc", ".gitignore", ".markdownlint.json", "deployment/**", ".github/ISSUE_TEMPLATE/**", "CHANGELOG.md", "CONTRIBUTING.md"]'
- do_not_skip: '["workflow_dispatch"]'
-
rustfmt:
- needs: pre_job
- if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@@ -39,8 +24,19 @@ jobs:
- macOS-latest
- windows-2019
steps:
+ - id: skip_check
+ uses: fkirc/skip-duplicate-actions@master
+ with:
+ concurrent_skipping: "same_content_newer"
+ skip_after_successful_duplicate: "true"
+ paths_ignore: '["**/README.md", "**/docs/**", "assets/**", ".cargo-husky/**", ".all-contributorsrc", ".gitignore", ".markdownlint.json", "deployment/**", ".github/ISSUE_TEMPLATE/**", "CHANGELOG.md", "CONTRIBUTING.md"]'
+ do_not_skip: '["workflow_dispatch"]'
+
- uses: actions/checkout@v2
+ if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
+
- uses: actions-rs/toolchain@v1
+ if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
with:
profile: minimal
toolchain: stable
@@ -48,12 +44,12 @@ jobs:
components: rustfmt
- uses: Swatinem/rust-cache@v1
+ if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
- run: cargo fmt --all -- --check
+ if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
clippy:
- needs: pre_job
- if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@@ -63,9 +59,19 @@ jobs:
- macOS-latest
- windows-2019
steps:
+ - id: skip_check
+ uses: fkirc/skip-duplicate-actions@master
+ with:
+ concurrent_skipping: "same_content_newer"
+ skip_after_successful_duplicate: "true"
+ paths_ignore: '["**/README.md", "**/docs/**", "assets/**", ".cargo-husky/**", ".all-contributorsrc", ".gitignore", ".markdownlint.json", "deployment/**", ".github/ISSUE_TEMPLATE/**", "CHANGELOG.md", "CONTRIBUTING.md"]'
+ do_not_skip: '["workflow_dispatch"]'
+
- uses: actions/checkout@v2
+ if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
- uses: actions-rs/toolchain@v1
+ if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
with:
profile: minimal
toolchain: stable
@@ -73,8 +79,10 @@ jobs:
components: clippy
- uses: Swatinem/rust-cache@v1
+ if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
- run: cargo clippy --all-targets --workspace -- -D warnings
+ if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
# Run cargo --check on all platforms
check: