diff --git a/.azure-pipelines/ansible-integration-test.yml b/.azure-pipelines/ansible-integration-test.yml index 9c8550966..004684a0e 100644 --- a/.azure-pipelines/ansible-integration-test.yml +++ b/.azure-pipelines/ansible-integration-test.yml @@ -5,6 +5,14 @@ trigger: - main - release/* +pr: + autoCancel: true + drafts: false + branches: + include: + - main + - release/* + pool: name: SuperBench CI demands: ansible-agent diff --git a/.azure-pipelines/cpu-unit-test.yml b/.azure-pipelines/cpu-unit-test.yml index aa57a8821..b68dbdb61 100644 --- a/.azure-pipelines/cpu-unit-test.yml +++ b/.azure-pipelines/cpu-unit-test.yml @@ -5,6 +5,14 @@ trigger: - main - release/* +pr: + autoCancel: true + drafts: false + branches: + include: + - main + - release/* + strategy: matrix: python-3.7: diff --git a/.azure-pipelines/cuda-unit-test.yml b/.azure-pipelines/cuda-unit-test.yml index 0e514e78e..4f36ba8ab 100644 --- a/.azure-pipelines/cuda-unit-test.yml +++ b/.azure-pipelines/cuda-unit-test.yml @@ -5,6 +5,14 @@ trigger: - main - release/* +pr: + autoCancel: true + drafts: false + branches: + include: + - main + - release/* + pool: name: SuperBench CI demands: cuda-agent diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 57f837fcf..d1357cd36 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -9,16 +9,28 @@ on: branches: - main - release/* + types: + - opened + - synchronize + - reopened + - ready_for_review + - converted_to_draft + - closed release: types: - published workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || format('{0}-{1}', github.event_name, github.ref) }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + env: BUILDKIT_IMAGE: mcr.microsoft.com/oss/v2/moby/buildkit:v0.33.1-6@sha256:0bf1f35cb440e6f19c2e154ed007d798c206ad899c9495a2f8e9276eebfaaf69 jobs: docker-build: + if: ${{ !github.event.pull_request.draft && github.event.action != 'closed' }} name: Docker build ${{ matrix.name }} runs-on: ${{ matrix.runner }} timeout-minutes: 1200 @@ -193,7 +205,7 @@ jobs: run: echo ${{ steps.docker_build.outputs.digest }} docker-merge: needs: docker-build - if: ${{ !cancelled() }} + if: ${{ !cancelled() && github.event_name != 'pull_request' }} name: Docker merge ${{ matrix.name }} runs-on: self-hosted timeout-minutes: 300 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c389223b4..1d2ef33a4 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,11 +9,23 @@ on: branches: - main - release/* + types: + - opened + - synchronize + - reopened + - ready_for_review + - converted_to_draft + - closed schedule: - cron: "30 1 * * 1" +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || format('{0}-{1}', github.event_name, github.ref) }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: analyze: + if: ${{ !github.event.pull_request.draft && github.event.action != 'closed' }} name: CodeQL analyze ${{ matrix.language }} runs-on: ubuntu-latest permissions: @@ -38,6 +50,7 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@1190a975f95ce23525efb6a3fc21ea29567c1b52 # v3.38.2 analyze-cpp: + if: ${{ !github.event.pull_request.draft && github.event.action != 'closed' }} name: CodeQL analyze cpp runs-on: ubuntu-latest container: diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 602011003..48eee4d6c 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -9,6 +9,10 @@ on: - main - release/* +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || format('{0}-{1}', github.event_name, github.ref) }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: docs-build: runs-on: ubuntu-latest diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7b371a1ee..9d26183fe 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,6 +6,10 @@ on: - main - release/* +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || format('{0}-{1}', github.event_name, github.ref) }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: spelling: name: Spelling check