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.
This commit is contained in:
Ralf Gommers 2023-11-10 15:58:30 +01:00
parent 273f4e8794
commit 1d4ed20c2f
5 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,7 @@ permissions:
jobs:
build:
if: "github.repository == 'OpenMathLib/OpenBLAS'"
runs-on: "cirun-aws-runner-graviton--${{ github.run_id }}"
strategy:

View File

@ -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

View File

@ -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:

View File

@ -4,6 +4,7 @@ on: [push, pull_request]
jobs:
TEST:
if: "github.repository == 'OpenMathLib/OpenBLAS'"
runs-on: ubuntu-latest
strategy:
fail-fast: false

View File

@ -7,6 +7,7 @@ permissions:
jobs:
TEST:
if: "github.repository == 'OpenMathLib/OpenBLAS'"
runs-on: ubuntu-latest
strategy:
fail-fast: false