Skip to content

Commit

Permalink
setup periodic test to run binary verification  pytorch/pytorch#84764:
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
izaitsevfb committed Sep 22, 2022
1 parent af651e4 commit 5c299f7
Show file tree
Hide file tree
Showing 6 changed files with 190 additions and 36 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/validate-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Validate binaries

# A reusable workflow that triggers a set of jobs that perform a smoke test / validation of pytorch binaries.
# Optionally restricts validation to the specified OS and channel.
# For the details about parameter values, see:
# pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
# For an example of the `workflow_call` usage see:
# https://github.com/pytorch/builder/pull/1144
on:
workflow_call:
inputs:
os:
description: "Operating system to generate for (linux, windows, macos, macos-arm64)"
required: true
type: string
channel:
description: "Channel to use (nightly, test, release, all)"
required: true
type: string
workflow_dispatch:
inputs:
os:
description: "Operating system to generate for (linux, windows, macos, macos-arm64)"
required: true
type: choice
default: all
options:
- windows
- linux
- macos
- all
channel:
description: "Channel to use (nightly, test, release, all)"
required: true
type: choice
default: all
options:
- release
- nightly
- test
- all

jobs:
validate-windows-binaries:
if: inputs.os == 'windows' || inputs.os == 'all'
uses: ./.github/workflows/validate-windows-binaries.yml
with:
channel: ${{ inputs.channel }}

validate-linux-binaries:
if: inputs.os == 'linux' || inputs.os == 'all'
uses: ./.github/workflows/validate-linux-binaries.yml
with:
channel: ${{ inputs.channel }}

validate-mac-binaries:
if: inputs.os == 'macos' || inputs.os == 'all'
uses: ./.github/workflows/validate-macos-binaries.yml
with:
channel: ${{ inputs.channel }}
35 changes: 21 additions & 14 deletions .github/workflows/validate-linux-binaries.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
name: Validate linux binaries

on:
push:
branches:
main
paths:
- .github/workflows/validate-linux-binaries.yml
- .test/smoke_test/*
pull_request:
paths:
- .github/workflows/validate-linux-binaries.yml
- .test/smoke_test/*
workflow_call:
inputs:
channel:
description: "Channel to use (nightly, test, release, all)"
required: true
type: string
workflow_dispatch:
inputs:
channel:
description: "Channel to use (nightly, test, release, all)"
required: true
type: choice
options:
- release
- nightly
- test
- all

jobs:
generate-conda-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: conda
os: linux
channel: nightly
channel: ${{ inputs.channel }}
generate-wheel-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: wheel
os: linux
channel: nightly
channel: ${{ inputs.channel }}
generate-libtorch-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: libtorch
os: linux
channel: nightly

channel: ${{ inputs.channel }}

validate-linux-binaries-conda:
needs: generate-conda-matrix
Expand Down
30 changes: 22 additions & 8 deletions .github/workflows/validate-macos-binaries.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,49 @@
name: Validate MacOS Binaries

on:
pull_request:
paths:
- .github/workflows/validate-macos-binaries.yml
- .test/smoke_test/*
workflow_call:
inputs:
channel:
description: "Channel to use (nightly, test, release, all)"
required: true
type: string
workflow_dispatch:
inputs:
channel:
description: "Channel to use (nightly, test, release, all)"
required: true
type: choice
options:
- release
- nightly
- test
- all

jobs:
generate-arm64-conda-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: conda
os: macos-arm64
channel: nightly
channel: ${{ inputs.channel }}
generate-arm64-wheel-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: wheel
os: macos-arm64
channel: nightly
channel: ${{ inputs.channel }}
generate-x86_64-conda-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: conda
os: macos
channel: nightly
channel: ${{ inputs.channel }}
generate-x86_64-wheel-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: wheel
os: macos
channel: nightly
channel: ${{ inputs.channel }}

validate-macos-arm64-binaries-conda:
needs: generate-arm64-conda-matrix
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/validate-nightly-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Validate nightly binaries (all OS)

on:
schedule:
# At 2:30 pm UTC (7:30 am PDT)
- cron: "30 14 * * *"
# Have the ability to trigger this job manually through the API
workflow_dispatch:
push:
branches:
main
paths:
- .github/workflows/validate-nightly-binaries.yml
- .github/workflows/validate-linux-binaries.yml
- .github/workflows/validate-windows-binaries.yml
- .github/workflows/validate-macos-binaries.yml
- .test/smoke_test/*
pull_request:
paths:
- .github/workflows/validate-nightly-binaries.yml
- .github/workflows/validate-linux-binaries.yml
- .github/workflows/validate-windows-binaries.yml
- .github/workflows/validate-macos-binaries.yml
- .test/smoke_test/*

jobs:
validate-nightly-binaries:
uses: ./.github/workflows/validate-binaries.yml
with:
channel: nightly
os: all
31 changes: 31 additions & 0 deletions .github/workflows/validate-release-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Validate release binaries (all OS)

on:
schedule:
# At 3 am and 2 pm UTC (7 am and 8 pm PDT)
- cron: "0 3,14 * * *"
# Have the ability to trigger this job manually through the API
workflow_dispatch:
push:
branches:
main
paths:
- .github/workflows/validate-release-binaries.yml
- .github/workflows/validate-linux-binaries.yml
- .github/workflows/validate-windows-binaries.yml
- .github/workflows/validate-macos-binaries.yml
- .test/smoke_test/*
pull_request:
paths:
- .github/workflows/validate-release-binaries.yml
- .github/workflows/validate-linux-binaries.yml
- .github/workflows/validate-windows-binaries.yml
- .github/workflows/validate-macos-binaries.yml
- .test/smoke_test/*

jobs:
validate-nightly-binaries:
uses: ./.github/workflows/validate-binaries.yml
with:
channel: release
os: all
39 changes: 25 additions & 14 deletions .github/workflows/validate-windows-binaries.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,44 @@
name: Validate binary images
name: Validate Windows binary images

on:
push:
branches:
main
paths:
- .github/workflows/validate-windows-binaries.yml
- .test/smoke_test/*
pull_request:
paths:
- .github/workflows/validate-windows-binaries.yml
- .test/smoke_test/*
workflow_call:
inputs:
channel:
description: "Channel to use (nightly, test, release, all)"
required: true
type: string
workflow_dispatch:
inputs:
channel:
description: "Channel to use (nightly, test, release, all)"
required: true
type: choice
options:
- release
- nightly
- test
- all

jobs:
generate-conda-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: conda
os: windows
channel: nightly
channel: ${{ inputs.channel }}
generate-wheel-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: wheel
os: windows
channel: nightly
channel: ${{ inputs.channel }}
generate-libtorch-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: libtorch
os: windows
channel: nightly
channel: ${{ inputs.channel }}

validate-windows-binaries-conda:
needs: generate-conda-matrix
strategy:
Expand All @@ -47,6 +56,7 @@ jobs:
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
installation: ${{ matrix.installation }}
python_version: ${{ matrix.python_version }}

validate-windows-binaries-wheel:
needs: generate-wheel-matrix
strategy:
Expand All @@ -64,6 +74,7 @@ jobs:
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
installation: ${{ matrix.installation }}
python_version: ${{ matrix.python_version }}

validate-linux-libtorch-binaries:
needs: generate-libtorch-matrix
strategy:
Expand Down

0 comments on commit 5c299f7

Please sign in to comment.