Skip to content

Adding more OS's to validate domain library workflow #1238

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

Merged
merged 4 commits into from
Dec 17, 2022
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions .github/workflows/test-validate-domain-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
workflow_dispatch:

jobs:
test-linux-conda:
test-validate-domain-library:
uses: ./.github/workflows/validate-domain-library.yml
with:
package_type: "conda"
os: "linux"
package_type: "conda,wheel"
os: "all"
channel: "release"
repository: "pytorch/builder"
ref: main
Expand Down
100 changes: 79 additions & 21 deletions .github/workflows/validate-domain-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,48 @@ on:
type: string

jobs:
generate-linux-conda-matrix:
if: (inputs.os == 'linux' || inputs.os == 'all') && (inputs.package_type == 'conda' || inputs.package_type == 'all')
generate-linux-matrix:
if: (inputs.os == 'linux' || inputs.os == 'all')
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: conda
package-type: ${{ inputs.package_type }}
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')
generate-windows-matrix:
if: (inputs.os == 'windows' || inputs.os == 'all')
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: wheel
os: linux
channel: ${{ inputs.channel || 'nightly' }}
package-type: ${{ inputs.package_type }}
os: windows
channel: ${{ inputs.channel }}
with-cuda: disable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is disable with-cuda intentional here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. For now. Will add this as input parameter later

generate-macos-matrix:
if: (inputs.os == 'macos' || inputs.os == 'all')
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: ${{ inputs.package_type }}
os: macos
channel: ${{ inputs.channel }}
with-cuda: disable
generate-macos-arm64-matrix:
if: (inputs.os == 'macos-arm64' || inputs.os == 'all')
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: ${{ inputs.package_type }}
os: macos-arm64
channel: ${{ inputs.channel }}
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
validate-linux:
if: (inputs.os == 'linux' || inputs.os == 'all')
needs: generate-linux-matrix
strategy:
matrix: ${{ fromJson(needs.generate-linux-conda-matrix.outputs.matrix) }}
matrix: ${{ fromJson(needs.generate-linux-matrix.outputs.matrix) }}
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
name: "linux-${{ matrix.package_type }}-${{ matrix.python_version }}"
with:
runner: "linux.2xlarge"
runner: ${{ matrix.validation_runner }}
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref || github.ref }}
job-name: "linux-${{ matrix.package_type }}-${{ matrix.python_version }}"
Expand All @@ -73,19 +89,61 @@ jobs:
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
validate-windows:
if: (inputs.os == 'windows' || inputs.os == 'all')
needs: generate-windows-matrix
strategy:
matrix: ${{ fromJson(needs.generate-linux-wheel-matrix.outputs.matrix) }}
matrix: ${{ fromJson(needs.generate-windows-matrix.outputs.matrix) }}
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
name: "linux-${{ matrix.package_type }}-${{ matrix.python_version }}"
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
name: "windows-${{ matrix.package_type }}-${{ matrix.python_version }}"
with:
runner: "linux.2xlarge"
runner: ${{ matrix.validation_runner }}
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref || github.ref }}
job-name: "linux-${{ matrix.package_type }}-${{ matrix.python_version }}"
job-name: "windows-${{ 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-macos:
if: (inputs.os == 'macos' || inputs.os == 'all')
needs: generate-macos-matrix
strategy:
matrix: ${{ fromJson(needs.generate-macos-matrix.outputs.matrix) }}
fail-fast: false
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
name: "macos-${{ matrix.package_type }}-${{ matrix.python_version }}"
with:
runner: ${{ matrix.validation_runner }}
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref || github.ref }}
job-name: "macos-${{ 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-macos-arm64:
if: (inputs.os == 'macos-arm64' || inputs.os == 'all')
needs: generate-macos-matrix
strategy:
matrix: ${{ fromJson(needs.generate-macos-arm64-matrix.outputs.matrix) }}
fail-fast: false
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
name: "macos-${{ matrix.package_type }}-${{ matrix.python_version }}"
with:
runner: ${{ matrix.validation_runner }}
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref || github.ref }}
job-name: "macos-arm64-${{ matrix.package_type }}-${{ matrix.python_version }}"
script: |
set -ex
export ENV_NAME="conda-env-${{ github.run_id }}"
Expand Down