Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new workflow to call from domain libraries to validate on domain libraries such as text #1234

Merged
merged 2 commits into from
Dec 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions .github/workflows/validate-domain-library.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Validate domain libary

# 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
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
ref:
description: 'Reference to checkout, defaults to empty'
default: ""
required: false
type: string
package-type:
description: "Package type (conda, wheel, all)"
required: true
type: string
repository:
description: "Path to repository to checkout"
required: true
type: string
smoke_test:
description: "Path to a smoke test script"
required: true
type: string

jobs:
generate-linux-conda-matrix:
if: (inputs.os == 'linux' || inputs.os == 'all') && (inputs.package_type == 'conda' || inputs.package_type == 'all')
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: conda
os: linux
channel: ${{ inputs.channel }}
with-cuda: disable
generate-linux-wheel-matrix:
if: (inputs.os == 'linux' || inputs.os == 'all') && (inputs.package_type == 'wheel' || inputs.package_type == 'all')
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: wheel
os: linux
channel: ${{ inputs.channel || 'nightly' }}
with-cuda: disable
validate-conda-linux:
if: (inputs.os == 'linux' || inputs.os == 'all') && (inputs.package_type == 'conda' || inputs.package_type == 'all')
needs: generate-linux-conda-matrix
strategy:
matrix: ${{ fromJson(needs.generate-linux-conda-matrix.outputs.matrix) }}
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
name: "text-${{ matrix.package_type }}-${{ matrix.python_version }}"
with:
runner: "linux.2xlarge"
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref || github.ref }}
job-name: "text-${{ matrix.package_type }}-${{ matrix.python_version }}"
script: |
set -ex
export ENV_NAME="conda-env-${{ github.run_id }}"
export DESIRED_PYTHON="${{ matrix.python_version }}"
export PACKAGE_TYPE="${{ matrix.package_type }}"
export CHANNEL="${{ matrix.channel }}"
export SMOKE_TEST="${{ inputs.smoke_test }}"
eval $SMOKE_TEST
validate-wheel-linux:
if: (inputs.os == 'linux' || inputs.os == 'all') && (inputs.package_type == 'wheel' || inputs.package_type == 'all')
needs: generate-linux-wheel-matrix
strategy:
matrix: ${{ fromJson(needs.generate-linux-wheel-matrix.outputs.matrix) }}
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
name: "text-${{ matrix.package_type }}-${{ matrix.python_version }}"
with:
runner: "linux.2xlarge"
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref || github.ref }}
job-name: "text-${{ matrix.package_type }}-${{ matrix.python_version }}"
script: |
set -ex
export ENV_NAME="conda-env-${{ github.run_id }}"
export DESIRED_PYTHON="${{ matrix.python_version }}"
export PACKAGE_TYPE="${{ matrix.package_type }}"
export CHANNEL="${{ matrix.channel }}"
export SMOKE_TEST="${{ inputs.smoke_test }}"
eval $SMOKE_TEST