From 53cc628257d99f46a652f4dcc119f80c8f60e0cf Mon Sep 17 00:00:00 2001 From: atalman Date: Wed, 14 Dec 2022 12:58:48 -0800 Subject: [PATCH 1/2] Testing new workflow Fix naming fix input --- .github/workflows/validate-domain-library.yml | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 .github/workflows/validate-domain-library.yml diff --git a/.github/workflows/validate-domain-library.yml b/.github/workflows/validate-domain-library.yml new file mode 100644 index 000000000..d1c5d68ef --- /dev/null +++ b/.github/workflows/validate-domain-library.yml @@ -0,0 +1,97 @@ +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 +# 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 + 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 From fd3f1734fcb251be4dd951c84711afce39ca9e45 Mon Sep 17 00:00:00 2001 From: atalman Date: Wed, 14 Dec 2022 13:22:20 -0800 Subject: [PATCH 2/2] Changed comments --- .github/workflows/validate-domain-library.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/validate-domain-library.yml b/.github/workflows/validate-domain-library.yml index d1c5d68ef..63c82ba02 100644 --- a/.github/workflows/validate-domain-library.yml +++ b/.github/workflows/validate-domain-library.yml @@ -4,8 +4,6 @@ name: Validate domain libary # 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: @@ -36,7 +34,6 @@ on: 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