From 3394e80754d2bd7dc0664173ae6b904c2e9f0e0d Mon Sep 17 00:00:00 2001 From: atalman Date: Wed, 14 Dec 2022 13:54:23 -0800 Subject: [PATCH] Adding test for validate dm workflow and fixing dm validation workflow --- .../test-validate-domain-library.yml | 19 ++++++++ .github/workflows/validate-domain-library.yml | 48 ++++--------------- 2 files changed, 28 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/test-validate-domain-library.yml diff --git a/.github/workflows/test-validate-domain-library.yml b/.github/workflows/test-validate-domain-library.yml new file mode 100644 index 000000000..7df60395d --- /dev/null +++ b/.github/workflows/test-validate-domain-library.yml @@ -0,0 +1,19 @@ +name: Test validate domain library + +on: + pull_request: + paths: + - .github/workflows/validate-domain-library.yml + - .github/workflows/test-validate-domain-library.yml + workflow_dispatch: + +jobs: + test-linux-conda: + uses: ./.github/workflows/validate-domain-library.yml + with: + package_type: "conda" + os: "linux" + channel: "release" + repository: "pytorch/builder" + ref: main + smoke_test: "echo test" diff --git a/.github/workflows/validate-domain-library.yml b/.github/workflows/validate-domain-library.yml index 46633dbe1..19ee47ad2 100644 --- a/.github/workflows/validate-domain-library.yml +++ b/.github/workflows/validate-domain-library.yml @@ -5,44 +5,13 @@ name: Validate domain libary # For the details about parameter values, see: # pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main on: - workflow_dispatch: - inputs: - channel: - description: "Channel to use (nightly, test, release, all)" - required: true - type: choice - options: - - release - - nightly - - test - - all - package-type: - description: "Package type (conda, wheel, all)" - required: true - type: choice - options: - - conda - - wheel - - all - repository: - description: "Path to repository to checkout" - required: true - type: string - smoke_test: - description: "Path to a smoke test script" - required: true - type: string - ref: - description: 'Reference to checkout, defaults to empty' - default: "" - required: false - type: string workflow_call: inputs: os: description: "Operating system to generate for (linux, windows, macos, macos-arm64)" - required: true + required: false type: string + default: "all" channel: description: "Channel to use (nightly, test, release, all)" required: true @@ -52,10 +21,11 @@ on: default: "" required: false type: string - package-type: + package_type: description: "Package type (conda, wheel, all)" - required: true + required: false type: string + default: "all" repository: description: "Path to repository to checkout" required: true @@ -89,12 +59,12 @@ jobs: 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 }}" + name: "linux-${{ 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 }}" + job-name: "linux-${{ matrix.package_type }}-${{ matrix.python_version }}" script: | set -ex export ENV_NAME="conda-env-${{ github.run_id }}" @@ -110,12 +80,12 @@ jobs: 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 }}" + name: "linux-${{ 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 }}" + job-name: "linux-${{ matrix.package_type }}-${{ matrix.python_version }}" script: | set -ex export ENV_NAME="conda-env-${{ github.run_id }}"