diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh index e1d0ec75b..6b4bccd6b 100755 --- a/.github/scripts/validate_binaries.sh +++ b/.github/scripts/validate_binaries.sh @@ -6,6 +6,11 @@ else conda create -y -n ${ENV_NAME} python=${MATRIX_PYTHON_VERSION} numpy ffmpeg conda activate ${ENV_NAME} INSTALLATION=${MATRIX_INSTALLATION/"conda install"/"conda install -y"} + TEST_SUFFIX="" + if [[ ${TORCH_ONLY} == 'true' ]]; then + INSTALLATION=${INSTALLATION/"torchvision torchaudio"/""} + TEST_SUFFIX=" --package torchonly" + fi export OLD_PATH=${PATH} # Workaround macos-arm64 runners. Issue: https://github.com/pytorch/test-infra/issues/4342 @@ -26,11 +31,11 @@ else fi if [[ ${TARGET_OS} == 'windows' ]]; then - python ./test/smoke_test/smoke_test.py + python ./test/smoke_test/smoke_test.py ${TEST_SUFFIX} elif [[ ${TARGET_OS} == 'linux-aarch64' ]]; then python3 ./test/smoke_test/smoke_test.py --package=torchonly else - python3 ./test/smoke_test/smoke_test.py + python3 ./test/smoke_test/smoke_test.py ${TEST_SUFFIX} fi if [[ ${TARGET_OS} == 'macos-arm64' ]]; then diff --git a/.github/workflows/validate-aarch64-linux-binaries.yml b/.github/workflows/validate-aarch64-linux-binaries.yml index 4b1f06720..92b5e48ea 100644 --- a/.github/workflows/validate-aarch64-linux-binaries.yml +++ b/.github/workflows/validate-aarch64-linux-binaries.yml @@ -12,6 +12,11 @@ on: default: "" required: false type: string + torchonly: + description: 'Validate torchonly' + default: false + required: false + type: boolean workflow_dispatch: inputs: channel: @@ -28,6 +33,11 @@ on: default: "" required: false type: string + torchonly: + description: 'Validate torchonly' + default: false + required: false + type: boolean jobs: generate-aarch64-linux-matrix: @@ -55,6 +65,7 @@ jobs: set -ex export ENV_NAME="conda-env-${{ github.run_id }}" export TARGET_OS="linux-aarch64" + export TORCH_ONLY=${{ inputs.torchonly }} eval "$(conda shell.bash hook)" # Standart case: Validate binaries diff --git a/.github/workflows/validate-binaries.yml b/.github/workflows/validate-binaries.yml index 7a679a267..9c877f4ed 100644 --- a/.github/workflows/validate-binaries.yml +++ b/.github/workflows/validate-binaries.yml @@ -22,6 +22,11 @@ on: default: "" required: false type: string + torchonly: + description: 'Validate torchonly' + default: false + required: false + type: boolean workflow_dispatch: inputs: os: @@ -50,6 +55,11 @@ on: default: "" required: false type: string + torchonly: + description: 'Validate torchonly' + default: false + required: false + type: boolean jobs: win: @@ -58,6 +68,7 @@ jobs: with: channel: ${{ inputs.channel }} ref: ${{ inputs.ref || github.ref }} + torchonly: ${{ inputs.torchonly }} linux: if: inputs.os == 'linux' || inputs.os == 'all' @@ -65,6 +76,7 @@ jobs: with: channel: ${{ inputs.channel }} ref: ${{ inputs.ref || github.ref }} + torchonly: ${{ inputs.torchonly }} linux-aarch64: if: inputs.os == 'linux-aarch64' @@ -72,6 +84,7 @@ jobs: with: channel: ${{ inputs.channel }} ref: ${{ inputs.ref || github.ref }} + torchonly: ${{ inputs.torchonly }} mac: if: inputs.os == 'macos' || inputs.os == 'all' @@ -79,6 +92,7 @@ jobs: with: channel: ${{ inputs.channel }} ref: ${{ inputs.ref || github.ref }} + torchonly: ${{ inputs.torchonly }} mac-arm64: if: inputs.os == 'macos' || inputs.os == 'all' @@ -86,3 +100,4 @@ jobs: with: channel: ${{ inputs.channel }} ref: ${{ inputs.ref || github.ref }} + torchonly: ${{ inputs.torchonly }} diff --git a/.github/workflows/validate-linux-binaries.yml b/.github/workflows/validate-linux-binaries.yml index 13d980488..937f0e95f 100644 --- a/.github/workflows/validate-linux-binaries.yml +++ b/.github/workflows/validate-linux-binaries.yml @@ -12,6 +12,11 @@ on: default: "" required: false type: string + torchonly: + description: 'Validate torchonly' + default: false + required: false + type: boolean workflow_dispatch: inputs: channel: @@ -28,6 +33,11 @@ on: default: "" required: false type: string + torchonly: + description: 'Validate torchonly' + default: false + required: false + type: boolean jobs: generate-linux-matrix: @@ -53,6 +63,7 @@ jobs: script: | set -ex export ENV_NAME="conda-env-${{ github.run_id }}" + export TORCH_ONLY=${{ inputs.torchonly }} export TARGET_OS="linux" eval "$(conda shell.bash hook)" diff --git a/.github/workflows/validate-macos-arm64-binaries.yml b/.github/workflows/validate-macos-arm64-binaries.yml index f321022d4..f23dec3f6 100644 --- a/.github/workflows/validate-macos-arm64-binaries.yml +++ b/.github/workflows/validate-macos-arm64-binaries.yml @@ -12,6 +12,11 @@ on: default: "" required: false type: string + torchonly: + description: 'Validate torchonly' + default: false + required: false + type: boolean workflow_dispatch: inputs: channel: @@ -28,6 +33,11 @@ on: default: "" required: false type: string + torchonly: + description: 'Validate torchonly' + default: false + required: false + type: boolean jobs: generate-macos-arm64-matrix: @@ -53,4 +63,5 @@ jobs: set -ex export ENV_NAME="conda-env-${{ github.run_id }}" export TARGET_OS="macos-arm64" + export TORCH_ONLY=${{ inputs.torchonly }} source ./.github/scripts/validate_binaries.sh diff --git a/.github/workflows/validate-macos-binaries.yml b/.github/workflows/validate-macos-binaries.yml index 0e3f38ff8..0926dbe93 100644 --- a/.github/workflows/validate-macos-binaries.yml +++ b/.github/workflows/validate-macos-binaries.yml @@ -12,6 +12,11 @@ on: default: "" required: false type: string + torchonly: + description: 'Validate torchonly' + default: false + required: false + type: boolean workflow_dispatch: inputs: channel: @@ -28,6 +33,11 @@ on: default: "" required: false type: string + torchonly: + description: 'Validate torchonly' + default: false + required: false + type: boolean jobs: generate-macos-matrix: @@ -53,4 +63,5 @@ jobs: set -ex export ENV_NAME="conda-env-${{ github.run_id }}" export TARGET_OS="macos" + export TORCH_ONLY=${{ inputs.torchonly }} source ./.github/scripts/validate_binaries.sh diff --git a/.github/workflows/validate-windows-binaries.yml b/.github/workflows/validate-windows-binaries.yml index 463626c5a..96d2b281e 100644 --- a/.github/workflows/validate-windows-binaries.yml +++ b/.github/workflows/validate-windows-binaries.yml @@ -12,6 +12,11 @@ on: default: "" required: false type: string + torchonly: + description: 'Validate torchonly' + default: false + required: false + type: boolean workflow_dispatch: inputs: channel: @@ -28,6 +33,11 @@ on: default: "" required: false type: string + torchonly: + description: 'Validate torchonly' + default: false + required: false + type: boolean jobs: generate-windows-matrix: @@ -55,6 +65,7 @@ jobs: set -ex export ENV_NAME="conda-env-${{ github.run_id }}" export TARGET_OS="windows" + export TORCH_ONLY=${{ inputs.torchonly }} source /c/Jenkins/Miniconda3/etc/profile.d/conda.sh if [[ ${MATRIX_GPU_ARCH_VERSION} == "12.1" ]]; then ./windows/internal/driver_update.bat