Skip to content

Commit b59e94a

Browse files
committed
[CI] Allow release workflows to use forked test-infra
1 parent 5b646a4 commit b59e94a

5 files changed

Lines changed: 37 additions & 8 deletions

File tree

.github/workflows/build-wheels-aarch64-linux.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ on:
2525
required: false
2626
type: string
2727
default: 'main'
28+
test-infra-repository:
29+
description: 'PyTorch test-infra repository to use'
30+
required: false
31+
type: string
32+
default: 'pytorch/test-infra'
2833
tensordict-source:
2934
description: 'TensorDict source: stable (PyPI), git, or auto (branch-based detection)'
3035
required: false
@@ -57,7 +62,7 @@ jobs:
5762
with:
5863
package-type: wheel
5964
os: linux-aarch64
60-
test-infra-repository: pytorch/test-infra
65+
test-infra-repository: ${{ inputs.test-infra-repository || 'pytorch/test-infra' }}
6166
test-infra-ref: ${{ inputs.test-infra-ref || 'main' }}
6267
# aarch64 only supports CPU builds
6368
with-cuda: disable
@@ -80,7 +85,7 @@ jobs:
8085
with:
8186
repository: ${{ matrix.repository }}
8287
ref: ""
83-
test-infra-repository: pytorch/test-infra
88+
test-infra-repository: ${{ inputs.test-infra-repository || 'pytorch/test-infra' }}
8489
test-infra-ref: ${{ inputs.test-infra-ref || 'main' }}
8590
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
8691
package-name: ${{ matrix.package-name }}

.github/workflows/build-wheels-linux.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ on:
3535
required: false
3636
type: string
3737
default: 'main'
38+
test-infra-repository:
39+
description: 'PyTorch test-infra repository to use'
40+
required: false
41+
type: string
42+
default: 'pytorch/test-infra'
3843
tensordict-source:
3944
description: 'TensorDict source: stable (PyPI), git, or auto (branch-based detection)'
4045
required: false
@@ -77,7 +82,7 @@ jobs:
7782
with:
7883
package-type: wheel
7984
os: linux
80-
test-infra-repository: pytorch/test-infra
85+
test-infra-repository: ${{ inputs.test-infra-repository || 'pytorch/test-infra' }}
8186
test-infra-ref: ${{ inputs.test-infra-ref || 'main' }}
8287
channel: ${{ inputs.channel || '' }}
8388
use-only-dl-pytorch-org: ${{ inputs.channel == 'release' && 'true' || 'false' }}
@@ -103,7 +108,7 @@ jobs:
103108
with:
104109
repository: ${{ matrix.repository }}
105110
ref: ""
106-
test-infra-repository: pytorch/test-infra
111+
test-infra-repository: ${{ inputs.test-infra-repository || 'pytorch/test-infra' }}
107112
test-infra-ref: ${{ inputs.test-infra-ref || 'main' }}
108113
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
109114
package-name: ${{ matrix.package-name }}

.github/workflows/build-wheels-m1.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ on:
2525
required: false
2626
type: string
2727
default: 'main'
28+
test-infra-repository:
29+
description: 'PyTorch test-infra repository to use'
30+
required: false
31+
type: string
32+
default: 'pytorch/test-infra'
2833
tensordict-source:
2934
description: 'TensorDict source: stable (PyPI), git, or auto (branch-based detection)'
3035
required: false
@@ -57,7 +62,7 @@ jobs:
5762
with:
5863
package-type: wheel
5964
os: macos-arm64
60-
test-infra-repository: pytorch/test-infra
65+
test-infra-repository: ${{ inputs.test-infra-repository || 'pytorch/test-infra' }}
6166
test-infra-ref: ${{ inputs.test-infra-ref || 'main' }}
6267
channel: ${{ inputs.channel || '' }}
6368
use-only-dl-pytorch-org: ${{ inputs.channel == 'release' && 'true' || 'false' }}
@@ -79,7 +84,7 @@ jobs:
7984
with:
8085
repository: ${{ matrix.repository }}
8186
ref: ""
82-
test-infra-repository: pytorch/test-infra
87+
test-infra-repository: ${{ inputs.test-infra-repository || 'pytorch/test-infra' }}
8388
test-infra-ref: ${{ inputs.test-infra-ref || 'main' }}
8489
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
8590
package-name: ${{ matrix.package-name }}

.github/workflows/build-wheels-windows.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ on:
3030
required: false
3131
type: string
3232
default: 'main'
33+
test-infra-repository:
34+
description: 'PyTorch test-infra repository to use'
35+
required: false
36+
type: string
37+
default: 'pytorch/test-infra'
3338
tensordict-source:
3439
description: 'TensorDict source: stable (PyPI), git, or auto (branch-based detection)'
3540
required: false
@@ -67,7 +72,7 @@ jobs:
6772
with:
6873
package-type: wheel
6974
os: windows
70-
test-infra-repository: pytorch/test-infra
75+
test-infra-repository: ${{ inputs.test-infra-repository || 'pytorch/test-infra' }}
7176
test-infra-ref: ${{ inputs.test-infra-ref || 'main' }}
7277
channel: ${{ inputs.channel || '' }}
7378
use-only-dl-pytorch-org: ${{ inputs.channel == 'release' && 'true' || 'false' }}
@@ -94,7 +99,7 @@ jobs:
9499
with:
95100
repository: ${{ matrix.repository }}
96101
ref: ""
97-
test-infra-repository: pytorch/test-infra
102+
test-infra-repository: ${{ inputs.test-infra-repository || 'pytorch/test-infra' }}
98103
test-infra-ref: ${{ inputs.test-infra-ref || 'main' }}
99104
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
100105
pre-script: ${{ matrix.pre-script }}

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ on:
3838
required: false
3939
type: string
4040
default: 'main'
41+
test_infra_repository:
42+
description: 'PyTorch test-infra repository to use for wheel matrix/build helpers'
43+
required: false
44+
type: string
45+
default: 'pytorch/test-infra'
4146
skip_sanity_checks:
4247
description: 'Skip sanity checks'
4348
required: false
@@ -264,6 +269,7 @@ jobs:
264269
uses: ./.github/workflows/build-wheels-linux.yml
265270
with:
266271
test-infra-ref: ${{ inputs.pytorch_release || 'main' }}
272+
test-infra-repository: ${{ inputs.test_infra_repository || 'pytorch/test-infra' }}
267273
tensordict-source: ${{ inputs.tensordict_source || 'auto' }}
268274
channel: release
269275
with-cpu: ${{ inputs.build_cpu && 'enable' || 'disable' }}
@@ -279,6 +285,7 @@ jobs:
279285
uses: ./.github/workflows/build-wheels-windows.yml
280286
with:
281287
test-infra-ref: ${{ inputs.pytorch_release || 'main' }}
288+
test-infra-repository: ${{ inputs.test_infra_repository || 'pytorch/test-infra' }}
282289
tensordict-source: ${{ inputs.tensordict_source || 'auto' }}
283290
channel: release
284291
with-cpu: ${{ inputs.build_cpu && 'enable' || 'disable' }}
@@ -293,6 +300,7 @@ jobs:
293300
uses: ./.github/workflows/build-wheels-m1.yml
294301
with:
295302
test-infra-ref: ${{ inputs.pytorch_release || 'main' }}
303+
test-infra-repository: ${{ inputs.test_infra_repository || 'pytorch/test-infra' }}
296304
tensordict-source: ${{ inputs.tensordict_source || 'auto' }}
297305
channel: release
298306
with-cpu: ${{ inputs.build_cpu && 'enable' || 'disable' }}
@@ -306,6 +314,7 @@ jobs:
306314
uses: ./.github/workflows/build-wheels-aarch64-linux.yml
307315
with:
308316
test-infra-ref: ${{ inputs.pytorch_release || 'main' }}
317+
test-infra-repository: ${{ inputs.test_infra_repository || 'pytorch/test-infra' }}
309318
tensordict-source: ${{ inputs.tensordict_source || 'auto' }}
310319
channel: release
311320
with-cpu: ${{ inputs.build_cpu && 'enable' || 'disable' }}

0 commit comments

Comments
 (0)