Skip to content

Commit b32dc28

Browse files
Cancel in-progress ci build when a new commit is pushed (#2903)
1 parent a2f29f6 commit b32dc28

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

.github/workflows/build-test-linux.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,3 +261,7 @@ jobs:
261261
cd tests/py/core
262262
${CONDA_RUN} python -m pytest -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_core_test_results.xml .
263263
popd
264+
265+
concurrency:
266+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}
267+
cancel-in-progress: true

.github/workflows/build-test-windows.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,7 @@ jobs:
153153
${CONDA_RUN} python -m pytest -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_partitioning_test_results.xml partitioning/
154154
${CONDA_RUN} python -m pytest -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_lowering_test_results.xml lowering/
155155
popd
156+
157+
concurrency:
158+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}
159+
cancel-in-progress: true

.github/workflows/docgen.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,7 @@ jobs:
5757
commit_user_name: Torch-TensorRT Github Bot
5858
commit_user_email: [email protected]
5959
commit_author: Torch-TensorRT Github Bot <[email protected]>
60+
61+
concurrency:
62+
group: ${{ github.workflow }}-${{ github.ref_name }}
63+
cancel-in-progress: true

.github/workflows/linux-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,5 +195,5 @@ jobs:
195195
s3-prefix: ${{ env.REPOSITORY }}/${{ github.event.pull_request.number }}
196196

197197
concurrency:
198-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}
198+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}
199199
cancel-in-progress: true

.github/workflows/windows-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,5 @@ jobs:
136136
uses: ./test-infra/.github/actions/teardown-windows
137137

138138
concurrency:
139-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}
139+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}
140140
cancel-in-progress: true

0 commit comments

Comments
 (0)