diff --git a/.github/workflows/check-onemath.yaml b/.github/workflows/check-onemath.yaml index 87be2a4574e..544367ae819 100644 --- a/.github/workflows/check-onemath.yaml +++ b/.github/workflows/check-onemath.yaml @@ -9,6 +9,11 @@ on: permissions: contents: read +# Cancel superseded PR runs only; other runs get a unique group and always complete +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + env: # Pinned: Miniforge3 26.9.4-0 fails 'conda init' on Windows runners miniforge-version: '26.7.2-1' @@ -31,10 +36,6 @@ jobs: build_env_file: name: Build conda env file - permissions: - # Needed to cancel any previous runs that are not completed for a given workflow - actions: write - strategy: fail-fast: false matrix: @@ -49,11 +50,6 @@ jobs: python-install-spec: "python ${{ matrix.python_spec || format('{0}.*', matrix.python) }}" steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1 - with: - access_token: ${{ github.token }} - - name: Checkout DPNP repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: diff --git a/.github/workflows/conda-package-cf.yml b/.github/workflows/conda-package-cf.yml index 0fd80cb4375..9356b40da0d 100644 --- a/.github/workflows/conda-package-cf.yml +++ b/.github/workflows/conda-package-cf.yml @@ -9,9 +9,10 @@ on: permissions: contents: read +# Cancel superseded PR runs only; other runs get a unique group and always complete concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: linux: diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index ee904940916..4fc22b5b467 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -9,6 +9,11 @@ on: permissions: contents: read +# Cancel superseded PR runs only; other runs get a unique group and always complete +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + env: # Pinned: Miniforge3 26.9.4-0 fails 'conda init' on Windows runners miniforge-version: '26.7.2-1' @@ -60,10 +65,6 @@ jobs: # TODO: add free-threaded builds ('3.15.* *_cp315t') once NumPy and # dpctl cp315t builds are available - permissions: - # Needed to cancel any previous runs that are not completed for a given workflow - actions: write - runs-on: ${{ matrix.os }} timeout-minutes: 90 @@ -76,11 +77,6 @@ jobs: python-conda-spec: ${{ matrix.python_spec || matrix.python }} steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1 - with: - access_token: ${{ github.token }} - - name: Checkout DPNP repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index dff33007a81..75b7cd36f32 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -8,10 +8,6 @@ on: permissions: contents: read -concurrency: - group: coverity-${{ github.ref }} - cancel-in-progress: true - env: COVERITY_PROJECT: IntelPython/dpnp ONEAPI_ROOT: /opt/intel/oneapi diff --git a/.github/workflows/cron-run-tests.yaml b/.github/workflows/cron-run-tests.yaml index d1635b553a3..b832ebbec61 100644 --- a/.github/workflows/cron-run-tests.yaml +++ b/.github/workflows/cron-run-tests.yaml @@ -33,10 +33,6 @@ jobs: run: shell: ${{ matrix.runner == 'windows-2022' && 'cmd /C CALL {0}' || 'bash -el {0}' }} - permissions: - # Needed to cancel any previous runs that are not completed for a given workflow - actions: write - strategy: fail-fast: false matrix: @@ -68,11 +64,6 @@ jobs: python-install-spec: "python ${{ matrix.python_spec || format('{0}.*', matrix.python) }}" steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1 - with: - access_token: ${{ github.token }} - - name: Find the latest tag id: find_latest_tag uses: oprypin/find-latest-tag@6957ac556fa6d349727ecabfcaaf9f8e5ee37124 # v1.1.3 diff --git a/.github/workflows/generate_coverage.yaml b/.github/workflows/generate_coverage.yaml index 7e7c7c546ad..3978b68cb03 100644 --- a/.github/workflows/generate_coverage.yaml +++ b/.github/workflows/generate_coverage.yaml @@ -6,6 +6,11 @@ on: permissions: read-all +# Cancel superseded PR runs only; other runs get a unique group and always complete +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: generate-coverage: name: Generate coverage and push to Coveralls.io @@ -13,10 +18,6 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 180 - permissions: - # Needed to cancel any previous runs that are not completed for a given workflow - actions: write - defaults: run: shell: bash -el {0} @@ -34,11 +35,6 @@ jobs: dpctl-pkg-txt: 'environments/dpctl_pkg.txt' steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1 - with: - access_token: ${{ github.token }} - - name: Add Intel repository if: env.oneapi-pkgs-env == '' run: | diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index fc2a5fc6fa8..68d79d5abea 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -10,10 +10,10 @@ on: permissions: read-all -# Only one build at a time per ref; a newer run supersedes an in-progress one. +# Cancel superseded PR runs only; other runs get a unique group and always complete concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: install-compiler: diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 03c0718e957..b397ee5c70a 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -7,6 +7,11 @@ on: permissions: read-all +# Cancel superseded PR runs only; other runs get a unique group and always complete +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: pre-commit: name: Check diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index 7c4c1a527b3..c3258ad2f74 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -8,9 +8,10 @@ on: permissions: {} +# Cancel superseded PR runs only; other runs get a unique group and always complete concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: zizmor: