From 1d4ed20c2f47994cba88432de2c5a5ea3c1db58e Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Fri, 10 Nov 2023 15:58:30 +0100 Subject: [PATCH] Add conditions to all CI jobs to only run on main repo by default This is a follow-up to gh-4271. At the moment, when a contributor pushes the latest `develop` to their own branch to bring their own fork in sync with `main`, or if they push another branch, this triggers 30 CI jobs to run. Most will complete silently and only burn CPU time unnecessarily. If there's a failure, this may result in unexpected failure notifications. And the AWS Graviton3 run won't complete at all and time out, since the Cirun hook will only work when triggered from the main repo. --- .github/workflows/arm64_graviton.yml | 1 + .github/workflows/c910v.yml | 1 + .github/workflows/dynamic_arch.yml | 3 +++ .github/workflows/loongarch64.yml | 1 + .github/workflows/mips64.yml | 1 + 5 files changed, 7 insertions(+) diff --git a/.github/workflows/arm64_graviton.yml b/.github/workflows/arm64_graviton.yml index bcb05047c..9dd0ae589 100644 --- a/.github/workflows/arm64_graviton.yml +++ b/.github/workflows/arm64_graviton.yml @@ -7,6 +7,7 @@ permissions: jobs: build: + if: "github.repository == 'OpenMathLib/OpenBLAS'" runs-on: "cirun-aws-runner-graviton--${{ github.run_id }}" strategy: diff --git a/.github/workflows/c910v.yml b/.github/workflows/c910v.yml index 199304fb1..e6ed08f2c 100644 --- a/.github/workflows/c910v.yml +++ b/.github/workflows/c910v.yml @@ -7,6 +7,7 @@ permissions: jobs: TEST: + if: "github.repository == 'OpenMathLib/OpenBLAS'" runs-on: ubuntu-latest env: xuetie_toolchain: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1663142514282 diff --git a/.github/workflows/dynamic_arch.yml b/.github/workflows/dynamic_arch.yml index 0c39bfddf..02429e317 100644 --- a/.github/workflows/dynamic_arch.yml +++ b/.github/workflows/dynamic_arch.yml @@ -7,6 +7,7 @@ permissions: jobs: build: + if: "github.repository == 'OpenMathLib/OpenBLAS'" runs-on: ${{ matrix.os }} strategy: @@ -146,6 +147,7 @@ jobs: msys2: + if: "github.repository == 'OpenMathLib/OpenBLAS'" runs-on: windows-latest strategy: @@ -312,6 +314,7 @@ jobs: cross_build: + if: "github.repository == 'OpenMathLib/OpenBLAS'" runs-on: ubuntu-22.04 strategy: diff --git a/.github/workflows/loongarch64.yml b/.github/workflows/loongarch64.yml index e0236ca86..fa62d0b41 100644 --- a/.github/workflows/loongarch64.yml +++ b/.github/workflows/loongarch64.yml @@ -4,6 +4,7 @@ on: [push, pull_request] jobs: TEST: + if: "github.repository == 'OpenMathLib/OpenBLAS'" runs-on: ubuntu-latest strategy: fail-fast: false diff --git a/.github/workflows/mips64.yml b/.github/workflows/mips64.yml index de7c0c0f3..7f09d4fca 100644 --- a/.github/workflows/mips64.yml +++ b/.github/workflows/mips64.yml @@ -7,6 +7,7 @@ permissions: jobs: TEST: + if: "github.repository == 'OpenMathLib/OpenBLAS'" runs-on: ubuntu-latest strategy: fail-fast: false