Skip to content

Commit b639eb0

Browse files
authored
setup periodic test to run binary verification  pytorch/pytorch#84764: (#1144)
* 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 24d91ba commit b639eb0

6 files changed

+220
-66
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

+30-23
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,49 @@
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:
39-
${{ fromJson(needs.generate-conda-matrix.outputs.matrix) }}
46+
${{ fromJson(needs.generate-linux-conda-matrix.outputs.matrix) }}
4047
fail-fast: false
4148
runs-on: ${{ matrix.validation_runner }}
4249
steps:
@@ -48,10 +55,10 @@ 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:
54-
${{ fromJson(needs.generate-wheel-matrix.outputs.matrix) }}
61+
${{ fromJson(needs.generate-linux-wheel-matrix.outputs.matrix) }}
5562
fail-fast: false
5663
runs-on: ${{ matrix.validation_runner }}
5764
steps:
@@ -63,10 +70,10 @@ 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:
69-
${{ fromJson(needs.generate-libtorch-matrix.outputs.matrix) }}
76+
${{ fromJson(needs.generate-linux-libtorch-matrix.outputs.matrix) }}
7077
fail-fast: false
7178
runs-on: "ubuntu-20.04"
7279
env:

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

+34-20
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,55 @@
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:
38-
${{ fromJson(needs.generate-arm64-conda-matrix.outputs.matrix) }}
52+
${{ fromJson(needs.generate-macos-arm64-conda-matrix.outputs.matrix) }}
3953
fail-fast: false
4054
runs-on: ${{ matrix.validation_runner }}
4155
steps:
@@ -48,10 +62,10 @@ 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:
54-
${{ fromJson(needs.generate-arm64-wheel-matrix.outputs.matrix) }}
68+
${{ fromJson(needs.generate-macos-arm64-wheel-matrix.outputs.matrix) }}
5569
fail-fast: false
5670
runs-on: ${{ matrix.validation_runner }}
5771
steps:
@@ -64,10 +78,10 @@ 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:
70-
${{ fromJson(needs.generate-x86_64-conda-matrix.outputs.matrix) }}
84+
${{ fromJson(needs.generate-macos-x86_64-conda-matrix.outputs.matrix) }}
7185
fail-fast: false
7286
runs-on: ${{ matrix.validation_runner }}
7387
steps:
@@ -80,10 +94,10 @@ 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:
86-
${{ fromJson(needs.generate-x86_64-wheel-matrix.outputs.matrix) }}
100+
${{ fromJson(needs.generate-macos-x86_64-wheel-matrix.outputs.matrix) }}
87101
fail-fast: false
88102
runs-on: ${{ matrix.validation_runner }}
89103
steps:
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

0 commit comments

Comments
 (0)