Skip to content

Commit eae19b0

Browse files
update selfhost runner logic1
1 parent 03f61f3 commit eae19b0

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

.github/workflows/_linux-build.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,25 @@ jobs:
106106
build:
107107
environment: ${{ github.ref == 'refs/heads/main' && 'scribe-protected' || startsWith(github.ref, 'refs/heads/release/') && 'scribe-protected' || contains(github.event.pull_request.labels.*.name, 'ci-scribe') && 'scribe-pr' || '' }}
108108
# Don't run on forked repos
109-
110-
runs-on: ${{ inputs.runner_prefix}}${{ inputs.runner }}${{ inputs.runner-ppc64le }}
109+
runs-on: ${{ matrix.runner.labels }}
111110

112111
timeout-minutes: 240
113112
outputs:
114113
docker-image: ${{ steps.calculate-docker-image.outputs.docker-image }}
115114
test-matrix: ${{ steps.filter.outputs.test-matrix }}
115+
116+
strategy:
117+
matrix:
118+
runner:
119+
- type: ppc64le
120+
labels: ["self-hosted", "linux", "ppc64le"]
121+
- type: default
122+
labels: ["${{ inputs.runner_prefix }}", "${{ inputs.runner }}"]
123+
exclude:
124+
- type: ppc64le
125+
when: ${{ inputs.runner != 'ppc64le' }}
116126
steps:
127+
117128
- name: Setup SSH (Click me for login details)
118129
uses: pytorch/test-infra/.github/actions/setup-ssh@main
119130
if: inputs.build-environment != 'linux-s390x-binary-manywheel' && inputs.build-environment != 'linux-ppc64le-binary-manywheel'

.github/workflows/ppc64le.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ jobs:
3939
with:
4040
build-environment: linux-ppc64le-binary-manywheel
4141
docker-image-name: pytorch-ppc64le:ubi9.3
42-
runner_prefix: '[self-hosted,' # Example prefix
43-
runner: 'linux,' # Example runner
44-
runner-ppc64le: 'ppc64le]' # Specific architecture
42+
#runner_prefix: '[self-hosted,' # Example prefix
43+
runner: 'ppc64le,' # Example runner
44+
#runner-ppc64le: '["self-hosted", "linux", "ppc64le"]' # Specific architecture

0 commit comments

Comments
 (0)