Skip to content

Commit b2b4639

Browse files
atalmanizaitsevfb
authored andcommitted
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 b2b4639

6 files changed

+190
-36
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

+21-14
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,43 @@
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:
1523
generate-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
28+
channel: ${{ inputs.channel }}
2129
generate-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
34+
channel: ${{ inputs.channel }}
2735
generate-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:
3643
needs: generate-conda-matrix

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

+22-8
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,49 @@
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:
923
generate-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
28+
channel: ${{ inputs.channel }}
1529
generate-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
34+
channel: ${{ inputs.channel }}
2135
generate-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
40+
channel: ${{ inputs.channel }}
2741
generate-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:
3549
needs: generate-arm64-conda-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

+25-14
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,44 @@
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:
1523
generate-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
28+
channel: ${{ inputs.channel }}
2129
generate-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
34+
channel: ${{ inputs.channel }}
2735
generate-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:
3443
needs: generate-conda-matrix
3544
strategy:
@@ -47,6 +56,7 @@ 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:
5161
needs: generate-wheel-matrix
5262
strategy:
@@ -64,6 +74,7 @@ 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:
6879
needs: generate-libtorch-matrix
6980
strategy:

0 commit comments

Comments
 (0)