github: constrain triggers for longer builds
The previous trigger would start duplicate builds for each new label added to a PR. This commit locks this down a bit more so that builds only run when the trigger label is added or on other triggers when the label is present. Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
This commit is contained in:
parent
52a89f9e0f
commit
bd9a8b2ff7
2 changed files with 14 additions and 3 deletions
6
.github/workflows/proof.yml
vendored
6
.github/workflows/proof.yml
vendored
|
|
@ -12,7 +12,11 @@ jobs:
|
|||
cproof:
|
||||
name: C Proofs
|
||||
runs-on: ubuntu-latest
|
||||
if: contains(github.event.pull_request.labels.*.name, 'proof-test')
|
||||
# run on any normal trigger when the label exists, and run when the label is added
|
||||
# don't run again when other labels are added
|
||||
if: ${{ github.event.action != 'labeled' &&
|
||||
contains(github.event.pull_request.labels.*.name, 'proof-test') ||
|
||||
github.event.action == 'labeled' && github.event.label == 'proof-test' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
|
|
|||
11
.github/workflows/sel4test-sim.yml
vendored
11
.github/workflows/sel4test-sim.yml
vendored
|
|
@ -18,6 +18,8 @@ jobs:
|
|||
sim:
|
||||
name: Simulation
|
||||
runs-on: ubuntu-latest
|
||||
# do not re-run on PR labelling (already runs on other triggers):
|
||||
if: ${{ github.event_name != 'pull_request' || github.event.action != 'labeled' }}
|
||||
strategy:
|
||||
matrix:
|
||||
march: [armv6a, armv7a, armv8a, nehalem, rv32imac, rv64imac]
|
||||
|
|
@ -36,8 +38,13 @@ jobs:
|
|||
hw-build:
|
||||
name: HW Build
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.name == 'push' ||
|
||||
contains(github.event.pull_request.labels.*.name, 'hw-build') }}
|
||||
if: ${{ github.event_name == 'push' ||
|
||||
github.event_name == 'pull_request' &&
|
||||
github.event.action != 'labeled' &&
|
||||
contains(github.event.pull_request.labels.*.name, 'hw-build') ||
|
||||
github.event_name == 'pull_request' &&
|
||||
github.event.action == 'labeled' &&
|
||||
github.event.label == 'hw-build' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
|
|
|||
Loading…
Reference in a new issue