From bdb931f27a8afc88f809faed7954c8fd74ffaeb5 Mon Sep 17 00:00:00 2001 From: atalman Date: Wed, 14 Dec 2022 15:19:39 -0800 Subject: [PATCH 1/4] Adding more OS's to validate domain library workflow --- .../test-validate-domain-library.yml | 4 +- .github/workflows/validate-domain-library.yml | 64 ++++++++++++++++++- 2 files changed, 63 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-validate-domain-library.yml b/.github/workflows/test-validate-domain-library.yml index 7df60395d..ae885ea40 100644 --- a/.github/workflows/test-validate-domain-library.yml +++ b/.github/workflows/test-validate-domain-library.yml @@ -8,11 +8,11 @@ on: workflow_dispatch: jobs: - test-linux-conda: + test-all-conda: uses: ./.github/workflows/validate-domain-library.yml with: package_type: "conda" - os: "linux" + os: "all" channel: "release" repository: "pytorch/builder" ref: main diff --git a/.github/workflows/validate-domain-library.yml b/.github/workflows/validate-domain-library.yml index 19ee47ad2..6cca01b14 100644 --- a/.github/workflows/validate-domain-library.yml +++ b/.github/workflows/validate-domain-library.yml @@ -50,7 +50,23 @@ jobs: with: package-type: wheel os: linux - channel: ${{ inputs.channel || 'nightly' }} + channel: ${{ inputs.channel }} + with-cuda: disable + generate-windows-conda-matrix: + if: (inputs.os == 'windows' || 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: windows + channel: ${{ inputs.channel }} + with-cuda: disable + generate-windows-wheel-matrix: + if: (inputs.os == 'windows' || 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: windows + channel: ${{ inputs.channel }} with-cuda: disable validate-conda-linux: if: (inputs.os == 'linux' || inputs.os == 'all') && (inputs.package_type == 'conda' || inputs.package_type == 'all') @@ -61,7 +77,7 @@ jobs: 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 }}" @@ -82,7 +98,7 @@ jobs: 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 }}" @@ -94,3 +110,45 @@ jobs: export CHANNEL="${{ matrix.channel }}" export SMOKE_TEST="${{ inputs.smoke_test }}" eval $SMOKE_TEST + validate-conda-windows: + if: (inputs.os == 'windows' || inputs.os == 'all') && (inputs.package_type == 'conda' || inputs.package_type == 'all') + needs: generate-windows-conda-matrix + strategy: + matrix: ${{ fromJson(needs.generate-windows-conda-matrix.outputs.matrix) }} + fail-fast: false + uses: pytorch/test-infra/.github/workflows/windows_job.yml@main + name: "windows-${{ matrix.package_type }}-${{ matrix.python_version }}" + with: + runner: ${{ matrix.validation_runner }} + repository: ${{ inputs.repository }} + ref: ${{ inputs.ref || github.ref }} + 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-wheel-windows: + if: (inputs.os == 'windows' || inputs.os == 'all') && (inputs.package_type == 'wheel' || inputs.package_type == 'all') + needs: generate-windows-wheel-matrix + strategy: + matrix: ${{ fromJson(needs.generate-windows-wheel-matrix.outputs.matrix) }} + fail-fast: false + uses: pytorch/test-infra/.github/workflows/windows_job.yml@main + name: "windows-${{ matrix.package_type }}-${{ matrix.python_version }}" + with: + runner: ${{ matrix.validation_runner }} + repository: ${{ inputs.repository }} + ref: ${{ inputs.ref || github.ref }} + 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 From 9c59cee2dc350c9875b38a0c57466254d26d052a Mon Sep 17 00:00:00 2001 From: atalman Date: Sat, 17 Dec 2022 09:03:54 -0800 Subject: [PATCH 2/4] conda and wheel togeather --- .../test-validate-domain-library.yml | 4 +- .github/workflows/validate-domain-library.yml | 86 +++---------------- 2 files changed, 16 insertions(+), 74 deletions(-) diff --git a/.github/workflows/test-validate-domain-library.yml b/.github/workflows/test-validate-domain-library.yml index ae885ea40..6c651e709 100644 --- a/.github/workflows/test-validate-domain-library.yml +++ b/.github/workflows/test-validate-domain-library.yml @@ -8,10 +8,10 @@ on: workflow_dispatch: jobs: - test-all-conda: + test-validate-domain-library: uses: ./.github/workflows/validate-domain-library.yml with: - package_type: "conda" + package_type: "conda,wheel" os: "all" channel: "release" repository: "pytorch/builder" diff --git a/.github/workflows/validate-domain-library.yml b/.github/workflows/validate-domain-library.yml index 6cca01b14..ad245d319 100644 --- a/.github/workflows/validate-domain-library.yml +++ b/.github/workflows/validate-domain-library.yml @@ -36,64 +36,27 @@ 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 }} - with-cuda: disable - generate-windows-conda-matrix: - if: (inputs.os == 'windows' || 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 + package-type: ${{ inputs.package_type }} os: windows channel: ${{ inputs.channel }} with-cuda: disable - generate-windows-wheel-matrix: - if: (inputs.os == 'windows' || 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: windows - 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 - strategy: - matrix: ${{ fromJson(needs.generate-linux-conda-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: ${{ matrix.validation_runner }} - repository: ${{ inputs.repository }} - ref: ${{ inputs.ref || github.ref }} - job-name: "linux-${{ 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 + validate-linux: + if: (inputs.os == 'linux' || inputs.os == 'all') + needs: generate-linux-matrix strategy: - matrix: ${{ fromJson(needs.generate-linux-wheel-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 }}" @@ -110,32 +73,11 @@ jobs: export CHANNEL="${{ matrix.channel }}" export SMOKE_TEST="${{ inputs.smoke_test }}" eval $SMOKE_TEST - validate-conda-windows: - if: (inputs.os == 'windows' || inputs.os == 'all') && (inputs.package_type == 'conda' || inputs.package_type == 'all') - needs: generate-windows-conda-matrix - strategy: - matrix: ${{ fromJson(needs.generate-windows-conda-matrix.outputs.matrix) }} - fail-fast: false - uses: pytorch/test-infra/.github/workflows/windows_job.yml@main - name: "windows-${{ matrix.package_type }}-${{ matrix.python_version }}" - with: - runner: ${{ matrix.validation_runner }} - repository: ${{ inputs.repository }} - ref: ${{ inputs.ref || github.ref }} - 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-wheel-windows: - if: (inputs.os == 'windows' || inputs.os == 'all') && (inputs.package_type == 'wheel' || inputs.package_type == 'all') - needs: generate-windows-wheel-matrix + validate-windows: + if: (inputs.os == 'windows' || inputs.os == 'all') + needs: generate-windows-matrix strategy: - matrix: ${{ fromJson(needs.generate-windows-wheel-matrix.outputs.matrix) }} + matrix: ${{ fromJson(needs.generate-windows-matrix.outputs.matrix) }} fail-fast: false uses: pytorch/test-infra/.github/workflows/windows_job.yml@main name: "windows-${{ matrix.package_type }}-${{ matrix.python_version }}" From ad75a7f36736a3145a39974eac6386450e12495a Mon Sep 17 00:00:00 2001 From: atalman Date: Sat, 17 Dec 2022 09:15:22 -0800 Subject: [PATCH 3/4] add macos workflows --- .github/workflows/validate-domain-library.yml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/.github/workflows/validate-domain-library.yml b/.github/workflows/validate-domain-library.yml index ad245d319..04085a9bb 100644 --- a/.github/workflows/validate-domain-library.yml +++ b/.github/workflows/validate-domain-library.yml @@ -52,6 +52,22 @@ jobs: os: windows channel: ${{ inputs.channel }} with-cuda: disable + 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-linux: if: (inputs.os == 'linux' || inputs.os == 'all') needs: generate-linux-matrix @@ -94,3 +110,43 @@ jobs: 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 }}" + ./.github/scripts/validate_binaries.sh + 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 }}" + export DESIRED_PYTHON="${{ matrix.python_version }}" + export PACKAGE_TYPE="${{ matrix.package_type }}" + export CHANNEL="${{ matrix.channel }}" + ./.github/scripts/validate_binaries.sh From aad4c246985d0e73ab02bafe9322514dd91981b8 Mon Sep 17 00:00:00 2001 From: atalman Date: Sat, 17 Dec 2022 09:22:11 -0800 Subject: [PATCH 4/4] fix workflow --- .github/workflows/validate-domain-library.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate-domain-library.yml b/.github/workflows/validate-domain-library.yml index 04085a9bb..3e66900f3 100644 --- a/.github/workflows/validate-domain-library.yml +++ b/.github/workflows/validate-domain-library.yml @@ -129,7 +129,8 @@ jobs: export DESIRED_PYTHON="${{ matrix.python_version }}" export PACKAGE_TYPE="${{ matrix.package_type }}" export CHANNEL="${{ matrix.channel }}" - ./.github/scripts/validate_binaries.sh + export SMOKE_TEST="${{ inputs.smoke_test }}" + eval $SMOKE_TEST validate-macos-arm64: if: (inputs.os == 'macos-arm64' || inputs.os == 'all') needs: generate-macos-matrix @@ -149,4 +150,5 @@ jobs: export DESIRED_PYTHON="${{ matrix.python_version }}" export PACKAGE_TYPE="${{ matrix.package_type }}" export CHANNEL="${{ matrix.channel }}" - ./.github/scripts/validate_binaries.sh + export SMOKE_TEST="${{ inputs.smoke_test }}" + eval $SMOKE_TEST