Skip to content

Commit 744188e

Browse files
Cancel in-progress but out-of-date GPU actions (#289)
## Summary When updating a PR branch, a lot of concurrent CICD actions can be triggered. This creates a backlog and it takes time for the tests to actually get around to running on the most recent commit. Github makes it easy to cancel in-progress actions when new actions are trigged within a group. This will help avoid wasting GPU time running CICD on out of date commits. Avoids cancelations on main, so that a complete CICD history is available there. - Hardware Type: <BLANK> - [x] run `make test` to ensure correctness - [x] run `make checkstyle` to ensure code style - [x] run `make test-convergence` to ensure convergence --------- Co-authored-by: Steven Shimizu <[email protected]>
1 parent 8e2f3a4 commit 744188e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/gpu-ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@ name: GPU CI Pipeline
33
on:
44
push:
55
branches:
6-
- main
6+
- main
77
pull_request:
88
branches:
99
- main
1010

11+
concurrency:
12+
# This causes it to cancel previous in-progress actions on the same PR / branch,
13+
# but not on main
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
16+
1117
jobs:
1218
gpu-ci-tests:
1319
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)