Skip to content

Commit

Permalink
Test version validations (#1603)
Browse files Browse the repository at this point in the history
* test

* test
  • Loading branch information
atalman committed Nov 16, 2023
1 parent 6e1fc13 commit 8a85f50
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 36 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/validate-aarch64-linux-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string
workflow_dispatch:
inputs:
channel:
Expand All @@ -48,6 +53,11 @@ on:
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string

jobs:
generate-aarch64-linux-matrix:
Expand All @@ -57,12 +67,8 @@ jobs:
os: linux-aarch64
channel: ${{ inputs.channel }}
with-cuda: disable
generate-release-matrix:
uses: pytorch/test-infra/.github/workflows/generate_release_matrix.yml@main
with:
version: ${{ inputs.version }}
linux-aarch64:
needs: [generate-aarch64-linux-matrix, generate-release-matrix]
needs: generate-aarch64-linux-matrix
strategy:
matrix: ${{ fromJson(needs.generate-aarch64-linux-matrix.outputs.matrix) }}
fail-fast: false
Expand All @@ -86,7 +92,7 @@ jobs:
export TARGET_OS="linux-aarch64"
export TORCH_ONLY=${{ inputs.torchonly }}
export RELEASE_VERSION=${{ inputs.version }}
printf '%s\n' ${{ toJson(needs.generate-release-matrix.outputs.matrix) }} > release_matrix.json
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
eval "$(conda shell.bash hook)"
# Standart case: Validate binaries
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/validate-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,54 +61,69 @@ on:
required: false
type: boolean
version:
description: 'Version to validate - optional'
description: 'Version to validate'
default: ""
required: false
type: string


jobs:
generate-release-matrix:
uses: pytorch/test-infra/.github/workflows/generate_release_matrix.yml@main
with:
version: ${{ inputs.version }}

win:
if: inputs.os == 'windows' || inputs.os == 'all'
needs: generate-release-matrix
uses: ./.github/workflows/validate-windows-binaries.yml
with:
channel: ${{ inputs.channel }}
ref: ${{ inputs.ref || github.ref }}
torchonly: ${{ inputs.torchonly }}
version: ${{ inputs.version }}
release-matrix: ${{ fromJson(needs.generate-linux-matrix.outputs.matrix) }}

linux:
if: inputs.os == 'linux' || inputs.os == 'all'
needs: generate-release-matrix
uses: ./.github/workflows/validate-linux-binaries.yml
with:
channel: ${{ inputs.channel }}
ref: ${{ inputs.ref || github.ref }}
torchonly: ${{ inputs.torchonly }}
version: ${{ inputs.version }}
release-matrix: ${{ fromJson(needs.generate-linux-matrix.outputs.matrix) }}

linux-aarch64:
if: inputs.os == 'linux-aarch64'
needs: generate-release-matrix
uses: ./.github/workflows/validate-aarch64-linux-binaries.yml
with:
channel: ${{ inputs.channel }}
ref: ${{ inputs.ref || github.ref }}
torchonly: ${{ inputs.torchonly }}
version: ${{ inputs.version }}
release-matrix: ${{ fromJson(needs.generate-linux-matrix.outputs.matrix) }}

mac:
if: inputs.os == 'macos' || inputs.os == 'all'
needs: generate-release-matrix
uses: ./.github/workflows/validate-macos-binaries.yml
with:
channel: ${{ inputs.channel }}
ref: ${{ inputs.ref || github.ref }}
torchonly: ${{ inputs.torchonly }}
version: ${{ inputs.version }}
release-matrix: ${{ fromJson(needs.generate-linux-matrix.outputs.matrix) }}

mac-arm64:
if: inputs.os == 'macos' || inputs.os == 'all'
needs: generate-release-matrix
uses: ./.github/workflows/validate-macos-arm64-binaries.yml
with:
channel: ${{ inputs.channel }}
ref: ${{ inputs.ref || github.ref }}
torchonly: ${{ inputs.torchonly }}
version: ${{ inputs.version }}
release-matrix: ${{ fromJson(needs.generate-linux-matrix.outputs.matrix) }}
20 changes: 12 additions & 8 deletions .github/workflows/validate-linux-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string
workflow_dispatch:
inputs:
channel:
Expand All @@ -48,7 +53,11 @@ on:
default: ""
required: false
type: string

release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string

jobs:
generate-linux-matrix:
Expand All @@ -57,14 +66,9 @@ jobs:
package-type: all
os: linux
channel: ${{ inputs.channel }}
generate-release-matrix:
needs: generate-linux-matrix
uses: pytorch/test-infra/.github/workflows/generate_release_matrix.yml@main
with:
version: ${{ inputs.version }}

linux:
needs: [generate-linux-matrix, generate-release-matrix]
needs: generate-linux-matrix
strategy:
matrix: ${{ fromJson(needs.generate-linux-matrix.outputs.matrix) }}
fail-fast: false
Expand All @@ -83,7 +87,7 @@ jobs:
export RELEASE_VERSION=${{ inputs.version }}
export TARGET_OS="linux"
eval "$(conda shell.bash hook)"
printf '%s\n' ${{ toJson(needs.generate-release-matrix.outputs.matrix) }} > release_matrix.json
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
# Special case PyPi installation package. And Install of PyPi package via poetry
if [[ ${MATRIX_PACKAGE_TYPE} == "manywheel" && ${MATRIX_GPU_ARCH_VERSION} == "12.1" ]]; then
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/validate-macos-arm64-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string
workflow_dispatch:
inputs:
channel:
Expand All @@ -48,6 +53,11 @@ on:
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string

jobs:
generate-macos-arm64-matrix:
Expand All @@ -56,13 +66,8 @@ jobs:
package-type: all
os: macos-arm64
channel: ${{ inputs.channel }}
generate-release-matrix:
needs: generate-macos-arm64-matrix
uses: pytorch/test-infra/.github/workflows/generate_release_matrix.yml@main
with:
version: ${{ inputs.version }}
macos-arm64:
needs: [generate-macos-arm64-matrix, generate-release-matrix]
needs: generate-macos-arm64-matrix
strategy:
matrix: ${{ fromJson(needs.generate-macos-arm64-matrix.outputs.matrix) }}
fail-fast: false
Expand All @@ -80,5 +85,5 @@ jobs:
export TARGET_OS="macos-arm64"
export TORCH_ONLY=${{ inputs.torchonly }}
export RELEASE_VERSION=${{ inputs.version }}
printf '%s\n' ${{ toJson(needs.generate-release-matrix.outputs.matrix) }} > release_matrix.json
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
source ./.github/scripts/validate_binaries.sh
19 changes: 12 additions & 7 deletions .github/workflows/validate-macos-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string
workflow_dispatch:
inputs:
channel:
Expand All @@ -48,6 +53,11 @@ on:
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string

jobs:
generate-macos-matrix:
Expand All @@ -56,13 +66,8 @@ jobs:
package-type: all
os: macos
channel: ${{ inputs.channel }}
generate-release-matrix:
needs: generate-macos-matrix
uses: pytorch/test-infra/.github/workflows/generate_release_matrix.yml@main
with:
version: ${{ inputs.version }}
macos:
needs: [generate-macos-matrix, generate-release-matrix]
needs: generate-macos-matrix
strategy:
matrix: ${{ fromJson(needs.generate-macos-matrix.outputs.matrix) }}
fail-fast: false
Expand All @@ -80,5 +85,5 @@ jobs:
export TARGET_OS="macos"
export TORCH_ONLY=${{ inputs.torchonly }}
export RELEASE_VERSION=${{ inputs.version }}
printf '%s\n' ${{ toJson(needs.generate-release-matrix.outputs.matrix) }} > release_matrix.json
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
source ./.github/scripts/validate_binaries.sh
19 changes: 12 additions & 7 deletions .github/workflows/validate-windows-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string
workflow_dispatch:
inputs:
channel:
Expand All @@ -48,6 +53,11 @@ on:
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string

jobs:
generate-windows-matrix:
Expand All @@ -56,13 +66,8 @@ jobs:
package-type: all
os: windows
channel: ${{ inputs.channel }}
generate-release-matrix:
needs: generate-windows-matrix
uses: pytorch/test-infra/.github/workflows/generate_release_matrix.yml@main
with:
version: ${{ inputs.version }}
win:
needs: [generate-windows-matrix, generate-release-matrix]
needs: generate-windows-matrix
strategy:
matrix: ${{ fromJson(needs.generate-windows-matrix.outputs.matrix) }}
fail-fast: false
Expand All @@ -81,7 +86,7 @@ jobs:
export TARGET_OS="windows"
export TORCH_ONLY=${{ inputs.torchonly }}
export RELEASE_VERSION=${{ inputs.version }}
printf '%s\n' ${{ toJson(needs.generate-release-matrix.outputs.matrix) }} > release_matrix.json
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
source /c/Jenkins/Miniconda3/etc/profile.d/conda.sh
if [[ ${MATRIX_GPU_ARCH_VERSION} == "12.1" ]]; then
./windows/internal/driver_update.bat
Expand Down

0 comments on commit 8a85f50

Please sign in to comment.