Skip to content

Commit 7345cfd

Browse files
committed
setup periodic test to run binary verification  pytorch/pytorch#84764:
* add a reusable workflow to run all smoke tests/or smoke tests for a specific os/channel * add workflows to schedule the periodic smoke tests for nightly and release channels
1 parent af651e4 commit 7345cfd

6 files changed

+210
-56
lines changed
+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Validate binaries
2+
3+
# A reusable workflow that triggers a set of jobs that perform a smoke test / validation of pytorch binaries.
4+
# Optionally restricts validation to the specified OS and channel.
5+
# For the details about parameter values, see:
6+
# pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
7+
# For an example of the `workflow_call` usage see:
8+
# https://github.com/pytorch/builder/pull/1144
9+
on:
10+
workflow_call:
11+
inputs:
12+
os:
13+
description: "Operating system to generate for (linux, windows, macos, macos-arm64)"
14+
required: true
15+
type: string
16+
channel:
17+
description: "Channel to use (nightly, test, release, all)"
18+
required: true
19+
type: string
20+
workflow_dispatch:
21+
inputs:
22+
os:
23+
description: "Operating system to generate for (linux, windows, macos, macos-arm64)"
24+
required: true
25+
type: choice
26+
default: all
27+
options:
28+
- windows
29+
- linux
30+
- macos
31+
- all
32+
channel:
33+
description: "Channel to use (nightly, test, release, all)"
34+
required: true
35+
type: choice
36+
default: all
37+
options:
38+
- release
39+
- nightly
40+
- test
41+
- all
42+
43+
jobs:
44+
validate-windows-binaries:
45+
if: inputs.os == 'windows' || inputs.os == 'all'
46+
uses: ./.github/workflows/validate-windows-binaries.yml
47+
with:
48+
channel: ${{ inputs.channel }}
49+
50+
validate-linux-binaries:
51+
if: inputs.os == 'linux' || inputs.os == 'all'
52+
uses: ./.github/workflows/validate-linux-binaries.yml
53+
with:
54+
channel: ${{ inputs.channel }}
55+
56+
validate-mac-binaries:
57+
if: inputs.os == 'macos' || inputs.os == 'all'
58+
uses: ./.github/workflows/validate-macos-binaries.yml
59+
with:
60+
channel: ${{ inputs.channel }}

.github/workflows/validate-linux-binaries.yml

+27-20
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,46 @@
11
name: Validate linux binaries
22

33
on:
4-
push:
5-
branches:
6-
main
7-
paths:
8-
- .github/workflows/validate-linux-binaries.yml
9-
- .test/smoke_test/*
10-
pull_request:
11-
paths:
12-
- .github/workflows/validate-linux-binaries.yml
13-
- .test/smoke_test/*
4+
workflow_call:
5+
inputs:
6+
channel:
7+
description: "Channel to use (nightly, test, release, all)"
8+
required: true
9+
type: string
10+
workflow_dispatch:
11+
inputs:
12+
channel:
13+
description: "Channel to use (nightly, test, release, all)"
14+
required: true
15+
type: choice
16+
options:
17+
- release
18+
- nightly
19+
- test
20+
- all
21+
1422
jobs:
15-
generate-conda-matrix:
23+
generate-linux-conda-matrix:
1624
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
1725
with:
1826
package-type: conda
1927
os: linux
20-
channel: nightly
21-
generate-wheel-matrix:
28+
channel: ${{ inputs.channel }}
29+
generate-linux-wheel-matrix:
2230
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
2331
with:
2432
package-type: wheel
2533
os: linux
26-
channel: nightly
27-
generate-libtorch-matrix:
34+
channel: ${{ inputs.channel }}
35+
generate-linux-libtorch-matrix:
2836
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
2937
with:
3038
package-type: libtorch
3139
os: linux
32-
channel: nightly
33-
40+
channel: ${{ inputs.channel }}
3441

3542
validate-linux-binaries-conda:
36-
needs: generate-conda-matrix
43+
needs: generate-linux-conda-matrix
3744
strategy:
3845
matrix:
3946
${{ fromJson(needs.generate-conda-matrix.outputs.matrix) }}
@@ -48,7 +55,7 @@ jobs:
4855
installation: ${{ matrix.installation }}
4956
python_version: ${{ matrix.python_version }}
5057
validate-linux-binaries-wheels:
51-
needs: generate-wheel-matrix
58+
needs: generate-linux-wheel-matrix
5259
strategy:
5360
matrix:
5461
${{ fromJson(needs.generate-wheel-matrix.outputs.matrix) }}
@@ -63,7 +70,7 @@ jobs:
6370
installation: ${{ matrix.installation }}
6471
python_version: ${{ matrix.python_version }}
6572
validate-linux-libtorch-binaries:
66-
needs: generate-libtorch-matrix
73+
needs: generate-linux-libtorch-matrix
6774
strategy:
6875
matrix:
6976
${{ fromJson(needs.generate-libtorch-matrix.outputs.matrix) }}

.github/workflows/validate-macos-binaries.yml

+30-16
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,52 @@
11
name: Validate MacOS Binaries
22

33
on:
4-
pull_request:
5-
paths:
6-
- .github/workflows/validate-macos-binaries.yml
7-
- .test/smoke_test/*
4+
workflow_call:
5+
inputs:
6+
channel:
7+
description: "Channel to use (nightly, test, release, all)"
8+
required: true
9+
type: string
10+
workflow_dispatch:
11+
inputs:
12+
channel:
13+
description: "Channel to use (nightly, test, release, all)"
14+
required: true
15+
type: choice
16+
options:
17+
- release
18+
- nightly
19+
- test
20+
- all
21+
822
jobs:
9-
generate-arm64-conda-matrix:
23+
generate-macos-arm64-conda-matrix:
1024
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
1125
with:
1226
package-type: conda
1327
os: macos-arm64
14-
channel: nightly
15-
generate-arm64-wheel-matrix:
28+
channel: ${{ inputs.channel }}
29+
generate-macos-arm64-wheel-matrix:
1630
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
1731
with:
1832
package-type: wheel
1933
os: macos-arm64
20-
channel: nightly
21-
generate-x86_64-conda-matrix:
34+
channel: ${{ inputs.channel }}
35+
generate-macos-x86_64-conda-matrix:
2236
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
2337
with:
2438
package-type: conda
2539
os: macos
26-
channel: nightly
27-
generate-x86_64-wheel-matrix:
40+
channel: ${{ inputs.channel }}
41+
generate-macos-x86_64-wheel-matrix:
2842
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
2943
with:
3044
package-type: wheel
3145
os: macos
32-
channel: nightly
46+
channel: ${{ inputs.channel }}
3347

3448
validate-macos-arm64-binaries-conda:
35-
needs: generate-arm64-conda-matrix
49+
needs: generate-macos-arm64-conda-matrix
3650
strategy:
3751
matrix:
3852
${{ fromJson(needs.generate-arm64-conda-matrix.outputs.matrix) }}
@@ -48,7 +62,7 @@ jobs:
4862
python_version: ${{ matrix.python_version }}
4963
target_os: macos
5064
validate-macos-arm64-binaries-wheel:
51-
needs: generate-arm64-wheel-matrix
65+
needs: generate-macos-arm64-wheel-matrix
5266
strategy:
5367
matrix:
5468
${{ fromJson(needs.generate-arm64-wheel-matrix.outputs.matrix) }}
@@ -64,7 +78,7 @@ jobs:
6478
python_version: ${{ matrix.python_version }}
6579
target_os: macos
6680
validate-macos-x86_64-binaries-conda:
67-
needs: generate-x86_64-conda-matrix
81+
needs: generate-macos-x86_64-conda-matrix
6882
strategy:
6983
matrix:
7084
${{ fromJson(needs.generate-x86_64-conda-matrix.outputs.matrix) }}
@@ -80,7 +94,7 @@ jobs:
8094
python_version: ${{ matrix.python_version }}
8195
target_os: macos
8296
validate-macos-x86_64-binaries-wheel:
83-
needs: generate-x86_64-wheel-matrix
97+
needs: generate-macos-x86_64-wheel-matrix
8498
strategy:
8599
matrix:
86100
${{ fromJson(needs.generate-x86_64-wheel-matrix.outputs.matrix) }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Validate nightly binaries (all OS)
2+
3+
on:
4+
schedule:
5+
# At 2:30 pm UTC (7:30 am PDT)
6+
- cron: "30 14 * * *"
7+
# Have the ability to trigger this job manually through the API
8+
workflow_dispatch:
9+
push:
10+
branches:
11+
main
12+
paths:
13+
- .github/workflows/validate-nightly-binaries.yml
14+
- .github/workflows/validate-linux-binaries.yml
15+
- .github/workflows/validate-windows-binaries.yml
16+
- .github/workflows/validate-macos-binaries.yml
17+
- .test/smoke_test/*
18+
pull_request:
19+
paths:
20+
- .github/workflows/validate-nightly-binaries.yml
21+
- .github/workflows/validate-linux-binaries.yml
22+
- .github/workflows/validate-windows-binaries.yml
23+
- .github/workflows/validate-macos-binaries.yml
24+
- .test/smoke_test/*
25+
26+
jobs:
27+
validate-nightly-binaries:
28+
uses: ./.github/workflows/validate-binaries.yml
29+
with:
30+
channel: nightly
31+
os: all
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Validate release binaries (all OS)
2+
3+
on:
4+
schedule:
5+
# At 3 am and 2 pm UTC (7 am and 8 pm PDT)
6+
- cron: "0 3,14 * * *"
7+
# Have the ability to trigger this job manually through the API
8+
workflow_dispatch:
9+
push:
10+
branches:
11+
main
12+
paths:
13+
- .github/workflows/validate-release-binaries.yml
14+
- .github/workflows/validate-linux-binaries.yml
15+
- .github/workflows/validate-windows-binaries.yml
16+
- .github/workflows/validate-macos-binaries.yml
17+
- .test/smoke_test/*
18+
pull_request:
19+
paths:
20+
- .github/workflows/validate-release-binaries.yml
21+
- .github/workflows/validate-linux-binaries.yml
22+
- .github/workflows/validate-windows-binaries.yml
23+
- .github/workflows/validate-macos-binaries.yml
24+
- .test/smoke_test/*
25+
26+
jobs:
27+
validate-nightly-binaries:
28+
uses: ./.github/workflows/validate-binaries.yml
29+
with:
30+
channel: release
31+
os: all

.github/workflows/validate-windows-binaries.yml

+31-20
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,46 @@
1-
name: Validate binary images
1+
name: Validate Windows binary images
22

33
on:
4-
push:
5-
branches:
6-
main
7-
paths:
8-
- .github/workflows/validate-windows-binaries.yml
9-
- .test/smoke_test/*
10-
pull_request:
11-
paths:
12-
- .github/workflows/validate-windows-binaries.yml
13-
- .test/smoke_test/*
4+
workflow_call:
5+
inputs:
6+
channel:
7+
description: "Channel to use (nightly, test, release, all)"
8+
required: true
9+
type: string
10+
workflow_dispatch:
11+
inputs:
12+
channel:
13+
description: "Channel to use (nightly, test, release, all)"
14+
required: true
15+
type: choice
16+
options:
17+
- release
18+
- nightly
19+
- test
20+
- all
21+
1422
jobs:
15-
generate-conda-matrix:
23+
generate-windows-conda-matrix:
1624
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
1725
with:
1826
package-type: conda
1927
os: windows
20-
channel: nightly
21-
generate-wheel-matrix:
28+
channel: ${{ inputs.channel }}
29+
generate-windows-wheel-matrix:
2230
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
2331
with:
2432
package-type: wheel
2533
os: windows
26-
channel: nightly
27-
generate-libtorch-matrix:
34+
channel: ${{ inputs.channel }}
35+
generate-windows-libtorch-matrix:
2836
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
2937
with:
3038
package-type: libtorch
3139
os: windows
32-
channel: nightly
40+
channel: ${{ inputs.channel }}
41+
3342
validate-windows-binaries-conda:
34-
needs: generate-conda-matrix
43+
needs: generate-windows-conda-matrix
3544
strategy:
3645
matrix:
3746
${{ fromJson(needs.generate-conda-matrix.outputs.matrix) }}
@@ -47,8 +56,9 @@ jobs:
4756
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
4857
installation: ${{ matrix.installation }}
4958
python_version: ${{ matrix.python_version }}
59+
5060
validate-windows-binaries-wheel:
51-
needs: generate-wheel-matrix
61+
needs: generate-windows-wheel-matrix
5262
strategy:
5363
matrix:
5464
${{ fromJson(needs.generate-wheel-matrix.outputs.matrix) }}
@@ -64,8 +74,9 @@ jobs:
6474
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
6575
installation: ${{ matrix.installation }}
6676
python_version: ${{ matrix.python_version }}
77+
6778
validate-linux-libtorch-binaries:
68-
needs: generate-libtorch-matrix
79+
needs: generate-windows-libtorch-matrix
6980
strategy:
7081
matrix:
7182
${{ fromJson(needs.generate-libtorch-matrix.outputs.matrix) }}

0 commit comments

Comments
 (0)