From 386ef22000ffaff9e59ac28f91aa21f22fa671f7 Mon Sep 17 00:00:00 2001 From: Adam Laiacano <108741458+nv-alaiacano@users.noreply.github.com> Date: Thu, 13 Apr 2023 11:15:36 -0400 Subject: [PATCH] use concurrency setting to kill already-running jobs when new commits come in (#327) * use concurrency setting to kill already-running jobs when new commits come in * use concurrency setting to kill already-running jobs when new commits come in * add to lint and docs preview --- .github/workflows/cpu-ci.yml | 4 ++++ .github/workflows/docs-preview-pr.yaml | 4 ++++ .github/workflows/gpu-ci.yml | 4 ++++ .github/workflows/lint.yaml | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/.github/workflows/cpu-ci.yml b/.github/workflows/cpu-ci.yml index 04ce15c6d..98495ba79 100644 --- a/.github/workflows/cpu-ci.yml +++ b/.github/workflows/cpu-ci.yml @@ -6,6 +6,10 @@ on: branches: [main] types: [opened, synchronize, reopened] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: cpu-ci-premerge: runs-on: ${{ matrix.os }} diff --git a/.github/workflows/docs-preview-pr.yaml b/.github/workflows/docs-preview-pr.yaml index 408e8b8ce..fd64b157e 100644 --- a/.github/workflows/docs-preview-pr.yaml +++ b/.github/workflows/docs-preview-pr.yaml @@ -5,6 +5,10 @@ on: workflows: [CPU CI] types: [completed] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: WF_ID: ${{ github.event.workflow_run.id }} diff --git a/.github/workflows/gpu-ci.yml b/.github/workflows/gpu-ci.yml index 4aead7c29..9b2334a95 100644 --- a/.github/workflows/gpu-ci.yml +++ b/.github/workflows/gpu-ci.yml @@ -6,6 +6,10 @@ on: branches: [main] types: [opened, synchronize, reopened] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: gpu-ci-premerge: runs-on: 1GPU diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 9bff9947d..4e2b920ac 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -10,6 +10,10 @@ on: branches: [main] types: [opened, synchronize, reopened] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint: runs-on: ubuntu-latest