Skip to content

Commit

Permalink
ci: don run ci, cross ci and msrv if the event for running the ci is …
Browse files Browse the repository at this point in the history
…actually a merged pr.

we assume, we have already run ci against that commit in the pr itself and the merge groups are doing the rest. if we push directly to main, ci should still run as usual.

Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan committed Mar 10, 2024
1 parent c2de371 commit 9504113
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ jobs:

powerset:
name: Check Powerset of Features
# Only run if the commit doesn't come from a merged PR, we assume CI is running in the PR as well
# so we don't want to have runs double up
if: github.event.pull_request.merged == false
runs-on: ${{ matrix.job.os }}
strategy:
matrix:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/cross-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ defaults:

jobs:
cross-check:
# Only run if the commit doesn't come from a merged PR, we assume CI is running in the PR as well
# so we don't want to have runs double up
if: github.event.pull_request.merged == false
name: Cross checking ${{ matrix.job.target }}
runs-on: ${{ matrix.job.os }}
strategy:
Expand Down Expand Up @@ -93,6 +96,9 @@ jobs:
project-cache-key: "rustic_core"

result:
# Only run if the commit doesn't come from a merged PR, we assume CI is running in the PR as well
# so we don't want to have runs double up
if: github.event.pull_request.merged == false
name: Result (Cross-CI)
runs-on: ubuntu-latest
needs: cross-check
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ concurrency:

jobs:
msrv:
# Only run if the commit doesn't come from a merged PR, we assume CI is running in the PR as well
# so we don't want to have runs double up
if: github.event.pull_request.merged == false
name: Check MSRV
runs-on: ubuntu-latest
strategy:
Expand All @@ -36,6 +39,9 @@ jobs:
run: cargo hack check --rust-version -p ${{ matrix.crate }}

result:
# Only run if the commit doesn't come from a merged PR, we assume CI is running in the PR as well
# so we don't want to have runs double up
if: github.event.pull_request.merged == false
name: Result (MSRV)
runs-on: ubuntu-latest
needs: msrv
Expand Down

0 comments on commit 9504113

Please sign in to comment.