Skip to content

Commit

Permalink
Use public runners on forked repos (#1052)
Browse files Browse the repository at this point in the history
Resolves actions stalling endlessly on forks with:
<img width="662" alt="image"
src="https://user-images.githubusercontent.com/3036970/216694700-4b071f21-2408-4d37-b594-889b0ced2b24.png">


See: https://github.com/GleasonK/stablehlo/actions/runs/4087406604
- clang-format has the change and uses the public runner
- lint whitespace does not and waits for runner

Forked repo running CI:
https://github.com/GleasonK/stablehlo/actions?query=ci-runner
OpenXLA repo running CI:
https://github.com/openxla/stablehlo/actions?query=ci-runner
  • Loading branch information
GleasonK authored Feb 5, 2023
1 parent 90f16b2 commit 5ee08ec
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/buildAndTestCMake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
STABLEHLO_PYTHON_BUILD_DIR: "stablehlo-python-build"
strategy:
fail-fast: false
runs-on: ubuntu-22.04-64core
runs-on: ${{ github.repository == 'openxla/stablehlo' && 'ubuntu-22.04-64core' || 'ubuntu-22.04' }}

steps:
- name: Checkout StableHLO
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/buildBazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
bazel-build:
strategy:
fail-fast: false
runs-on: ubuntu-22.04-64core
runs-on: ${{ github.repository == 'openxla/stablehlo' && 'ubuntu-22.04-64core' || 'ubuntu-22.04' }}

steps:
- name: Checkout StableHLO
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ on:
jobs:
clang-format:
# This job can only be run on pull_request since GITHUB_BASE_REF is only set on PR.
# In forks, run this on public GH runners. 64core infra will ignore jobs from forks.
if: "github.event_name == 'pull_request'"
runs-on: ubuntu-22.04-64core
runs-on: ${{ github.repository == 'openxla/stablehlo' && 'ubuntu-22.04-64core' || 'ubuntu-22.04' }}
steps:
- name: Checking out repository
uses: actions/checkout@v2
Expand All @@ -35,7 +36,7 @@ jobs:
whitespace-checks:
# This job can only be run on pull_request since GITHUB_BASE_REF is only set on PR.
if: "github.event_name == 'pull_request'"
runs-on: ubuntu-22.04-64core
runs-on: ${{ github.repository == 'openxla/stablehlo' && 'ubuntu-22.04-64core' || 'ubuntu-22.04' }}
steps:
- name: Checking out repository
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/markdown_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:

jobs:
markdown-lint:
runs-on: ubuntu-22.04-64core
runs-on: ${{ github.repository == 'openxla/stablehlo' && 'ubuntu-22.04-64core' || 'ubuntu-22.04' }}
steps:
- name: Checking out repository
uses: actions/checkout@v3
Expand Down

0 comments on commit 5ee08ec

Please sign in to comment.