diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86dae20344..cf354642cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,24 @@ concurrency: ## `rust-toolchain` is always used and the only source of truth. jobs: + skip_check: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@v5 + with: + cancel_others: 'true' + concurrent_skipping: 'same_content_newer' + paths_ignore: '["**/README.md"]' + test: + needs: [skip_check] + if: | + github.event.pull_request.draft == false && + (github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true') + name: Test runs-on: ["${{github.run_id}}", self-hosted, c5.9xlarge] @@ -61,7 +78,10 @@ jobs: args: --verbose --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks serial_ -- --ignored --test-threads 1 build: - if: github.event.pull_request.draft == false + needs: [skip_check] + if: | + github.event.pull_request.draft == false && + (github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true') name: Build target ${{ matrix.target }} runs-on: ubuntu-latest @@ -111,7 +131,10 @@ jobs: args: --verbose --release --all-features -p circuit-benchmarks --no-run bitrot: - if: github.event.pull_request.draft == false + needs: [skip_check] + if: | + github.event.pull_request.draft == false && + (github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true') name: Bitrot check runs-on: ubuntu-latest @@ -149,7 +172,10 @@ jobs: args: --benches --examples --all-features doc-links: - if: github.event.pull_request.draft == false + needs: [skip_check] + if: | + github.event.pull_request.draft == false && + (github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true') name: Intra-doc links runs-on: ubuntu-latest @@ -193,7 +219,10 @@ jobs: args: --no-deps --all --document-private-items fmt: - if: github.event.pull_request.draft == false + needs: [skip_check] + if: | + github.event.pull_request.draft == false && + (github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true') name: Rustfmt timeout-minutes: 30 diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index a2e165549d..7f59474bb8 100644 --- a/.github/workflows/lints.yml +++ b/.github/workflows/lints.yml @@ -10,8 +10,23 @@ on: - main jobs: + skip_check: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@v5 + with: + cancel_others: 'true' + concurrent_skipping: 'same_content_newer' + paths_ignore: '["**/README.md"]' + clippy: - if: github.event.pull_request.draft == false + needs: [skip_check] + if: | + github.event.pull_request.draft == false && + (github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true') name: Clippy timeout-minutes: 30