From ae4c54a9315645c6399d66b926802433e419f6ea Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 1 Dec 2022 09:16:42 -0800 Subject: [PATCH 01/23] Consolidating validation scripts --- .github/scripts/validate_binaries.sh | 17 +++++++++++++++++ .github/workflows/validate-linux-binaries.yml | 15 +-------------- 2 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 .github/scripts/validate_binaries.sh diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh new file mode 100644 index 000000000..5745563dc --- /dev/null +++ b/.github/scripts/validate_binaries.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -ex + +conda create -y -n ${ENV_NAME} python=${{ matrix.python_version }} numpy pillow +conda activate ${ENV_NAME} +export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib" +export LD_LIBRARY_PATH=$CONDA_LIBRARY_PATH:$LD_LIBRARY_PATH + +if [[ ${{ matrix.package_type }} == "libtorch" ]]; then + curl ${{ matrix.installation }} -o libtorch.zip + unzip libtorch.zip +else + INSTALLATION=${INSTALLATION/"conda install"/"conda install -y"} + eval $INSTALLATION + python ./test/smoke_test/smoke_test.py + ${PWD}/check_binary.sh +fi diff --git a/.github/workflows/validate-linux-binaries.yml b/.github/workflows/validate-linux-binaries.yml index a8f12c0ea..cd3d37534 100644 --- a/.github/workflows/validate-linux-binaries.yml +++ b/.github/workflows/validate-linux-binaries.yml @@ -61,17 +61,4 @@ jobs: export DESIRED_DEVTOOLSET="${{ matrix.devtoolset }}" export PACKAGE_TYPE="${{ matrix.package_type }}" export TARGET_OS="linux" - conda create -y -n ${ENV_NAME} python=${{ matrix.python_version }} numpy pillow - conda activate ${ENV_NAME} - export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib" - export LD_LIBRARY_PATH=$CONDA_LIBRARY_PATH:$LD_LIBRARY_PATH - - if [[ ${{ matrix.package_type }} == "libtorch" ]]; then - curl ${{ matrix.installation }} -o libtorch.zip - unzip libtorch.zip - else - INSTALLATION=${INSTALLATION/"conda install"/"conda install -y"} - eval $INSTALLATION - python ./test/smoke_test/smoke_test.py - ${PWD}/check_binary.sh - fi + ../scripts/validate.sh From 6f3863a3acced964ed0311255538cfa845277304 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 06:54:03 -0800 Subject: [PATCH 02/23] Fix validate script name --- .github/workflows/validate-linux-binaries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-linux-binaries.yml b/.github/workflows/validate-linux-binaries.yml index cd3d37534..b4a1d3172 100644 --- a/.github/workflows/validate-linux-binaries.yml +++ b/.github/workflows/validate-linux-binaries.yml @@ -61,4 +61,4 @@ jobs: export DESIRED_DEVTOOLSET="${{ matrix.devtoolset }}" export PACKAGE_TYPE="${{ matrix.package_type }}" export TARGET_OS="linux" - ../scripts/validate.sh + ../scripts/validate_binaries.sh From 7e20c245fdbbe0fa026143ee488cd2463ccf1c14 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 06:59:28 -0800 Subject: [PATCH 03/23] Correct script path --- .github/workflows/validate-linux-binaries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-linux-binaries.yml b/.github/workflows/validate-linux-binaries.yml index b4a1d3172..e106e3a54 100644 --- a/.github/workflows/validate-linux-binaries.yml +++ b/.github/workflows/validate-linux-binaries.yml @@ -61,4 +61,4 @@ jobs: export DESIRED_DEVTOOLSET="${{ matrix.devtoolset }}" export PACKAGE_TYPE="${{ matrix.package_type }}" export TARGET_OS="linux" - ../scripts/validate_binaries.sh + ./.github/scripts/validate_binaries.sh From bcac5e736a2a69be318ef2f2c065e7381f6bede8 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 07:03:05 -0800 Subject: [PATCH 04/23] Correct script path --- .github/workflows/validate-linux-binaries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-linux-binaries.yml b/.github/workflows/validate-linux-binaries.yml index e106e3a54..da9c60291 100644 --- a/.github/workflows/validate-linux-binaries.yml +++ b/.github/workflows/validate-linux-binaries.yml @@ -61,4 +61,4 @@ jobs: export DESIRED_DEVTOOLSET="${{ matrix.devtoolset }}" export PACKAGE_TYPE="${{ matrix.package_type }}" export TARGET_OS="linux" - ./.github/scripts/validate_binaries.sh + ./.github/scripts/validate_binaries.sh From 0c0b95848317066994bb1bdc4e005f0cb88ef1bd Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 07:09:12 -0800 Subject: [PATCH 05/23] test --- .github/scripts/validate_binaries.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .github/scripts/validate_binaries.sh diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh old mode 100644 new mode 100755 From e35024cfecdec0391ef7bbe78d08279484b07787 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 07:14:56 -0800 Subject: [PATCH 06/23] testing --- .github/scripts/validate_binaries.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100755 => 100644 .github/scripts/validate_binaries.sh diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh old mode 100755 new mode 100644 index 5745563dc..214f0936e --- a/.github/scripts/validate_binaries.sh +++ b/.github/scripts/validate_binaries.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash set -ex -conda create -y -n ${ENV_NAME} python=${{ matrix.python_version }} numpy pillow +conda create -y -n ${ENV_NAME} python=${DESIRED_PYTHON} numpy pillow conda activate ${ENV_NAME} export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib" export LD_LIBRARY_PATH=$CONDA_LIBRARY_PATH:$LD_LIBRARY_PATH -if [[ ${{ matrix.package_type }} == "libtorch" ]]; then - curl ${{ matrix.installation }} -o libtorch.zip +if [[ ${PACKAGE_TYPE} == "libtorch" ]]; then + curl ${INSTALLATION} -o libtorch.zip unzip libtorch.zip else INSTALLATION=${INSTALLATION/"conda install"/"conda install -y"} From dc16f53227b7e86e52cc72bae387ce206a8c5493 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 07:17:46 -0800 Subject: [PATCH 07/23] testing --- .github/scripts/validate_binaries.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .github/scripts/validate_binaries.sh diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh old mode 100644 new mode 100755 From 37ec4cfab252cc831d1a6e84221eec3a5360124e Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 07:19:21 -0800 Subject: [PATCH 08/23] testing --- .github/scripts/validate_binaries.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 .github/scripts/validate_binaries.sh diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh old mode 100755 new mode 100644 From 9dbeb67aa30ca036f5a7fc1d109f117b323f7bd9 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 07:22:15 -0800 Subject: [PATCH 09/23] testing --- .github/scripts/validate_binaries.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .github/scripts/validate_binaries.sh diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh old mode 100644 new mode 100755 From a169cc6341a93f467a11237a17f4147d2dcca4e1 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 07:29:07 -0800 Subject: [PATCH 10/23] test --- .github/workflows/validate-linux-binaries.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/validate-linux-binaries.yml b/.github/workflows/validate-linux-binaries.yml index da9c60291..64ef5c491 100644 --- a/.github/workflows/validate-linux-binaries.yml +++ b/.github/workflows/validate-linux-binaries.yml @@ -50,7 +50,6 @@ jobs: ref: ${{ inputs.ref || github.ref }} job-name: ${{ matrix.build_name }} script: | - set -ex export ENV_NAME="conda-env-${{ github.run_id }}" export GPU_ARCH_VER="${{ matrix.gpu_arch_version }}" export GPU_ARCH_TYPE="${{ matrix.gpu_arch_type }}" From 0a899e063267743714ca2196fde4544230077261 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 07:34:56 -0800 Subject: [PATCH 11/23] test --- .github/scripts/validate_binaries.sh | 1 - 1 file changed, 1 deletion(-) mode change 100755 => 100644 .github/scripts/validate_binaries.sh diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh old mode 100755 new mode 100644 index 214f0936e..832c12b57 --- a/.github/scripts/validate_binaries.sh +++ b/.github/scripts/validate_binaries.sh @@ -1,4 +1,3 @@ -#!/usr/bin/env bash set -ex conda create -y -n ${ENV_NAME} python=${DESIRED_PYTHON} numpy pillow From 59c477a238d3b84390e9511c68d83dc895ef9f6d Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 07:38:44 -0800 Subject: [PATCH 12/23] test --- .github/scripts/validate_binaries.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .github/scripts/validate_binaries.sh diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh old mode 100644 new mode 100755 From 31804045702ba090cc738ae67ebb6ef0de9066b6 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 07:41:35 -0800 Subject: [PATCH 13/23] testing --- .github/workflows/validate-linux-binaries.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/validate-linux-binaries.yml b/.github/workflows/validate-linux-binaries.yml index 64ef5c491..da9c60291 100644 --- a/.github/workflows/validate-linux-binaries.yml +++ b/.github/workflows/validate-linux-binaries.yml @@ -50,6 +50,7 @@ jobs: ref: ${{ inputs.ref || github.ref }} job-name: ${{ matrix.build_name }} script: | + set -ex export ENV_NAME="conda-env-${{ github.run_id }}" export GPU_ARCH_VER="${{ matrix.gpu_arch_version }}" export GPU_ARCH_TYPE="${{ matrix.gpu_arch_type }}" From 99a141505d147db30571421f1cf72e97cb6b2feb Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 07:55:01 -0800 Subject: [PATCH 14/23] testc --- .github/workflows/validate-linux-binaries.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-linux-binaries.yml b/.github/workflows/validate-linux-binaries.yml index da9c60291..bdf7dfa5e 100644 --- a/.github/workflows/validate-linux-binaries.yml +++ b/.github/workflows/validate-linux-binaries.yml @@ -61,4 +61,17 @@ jobs: export DESIRED_DEVTOOLSET="${{ matrix.devtoolset }}" export PACKAGE_TYPE="${{ matrix.package_type }}" export TARGET_OS="linux" - ./.github/scripts/validate_binaries.sh + conda create -y -n ${ENV_NAME} python=${DESIRED_PYTHON} numpy pillow + conda activate ${ENV_NAME} + export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib" + export LD_LIBRARY_PATH=$CONDA_LIBRARY_PATH:$LD_LIBRARY_PATH + + if [[ ${PACKAGE_TYPE} == "libtorch" ]]; then + curl ${INSTALLATION} -o libtorch.zip + unzip libtorch.zip + else + INSTALLATION=${INSTALLATION/"conda install"/"conda install -y"} + eval $INSTALLATION + python ./test/smoke_test/smoke_test.py + ${PWD}/check_binary.sh + fi From a3ce3f875edaf4eba3c1e86095d3cfaef1a2cc87 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 08:04:55 -0800 Subject: [PATCH 15/23] test hook --- .github/scripts/validate_binaries.sh | 3 ++- .github/workflows/validate-linux-binaries.yml | 15 +-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh index 832c12b57..0d117f067 100755 --- a/.github/scripts/validate_binaries.sh +++ b/.github/scripts/validate_binaries.sh @@ -1,5 +1,6 @@ +#!/usr/bin/env bash set -ex - +eval "$(conda shell.bash hook)" conda create -y -n ${ENV_NAME} python=${DESIRED_PYTHON} numpy pillow conda activate ${ENV_NAME} export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib" diff --git a/.github/workflows/validate-linux-binaries.yml b/.github/workflows/validate-linux-binaries.yml index bdf7dfa5e..da9c60291 100644 --- a/.github/workflows/validate-linux-binaries.yml +++ b/.github/workflows/validate-linux-binaries.yml @@ -61,17 +61,4 @@ jobs: export DESIRED_DEVTOOLSET="${{ matrix.devtoolset }}" export PACKAGE_TYPE="${{ matrix.package_type }}" export TARGET_OS="linux" - conda create -y -n ${ENV_NAME} python=${DESIRED_PYTHON} numpy pillow - conda activate ${ENV_NAME} - export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib" - export LD_LIBRARY_PATH=$CONDA_LIBRARY_PATH:$LD_LIBRARY_PATH - - if [[ ${PACKAGE_TYPE} == "libtorch" ]]; then - curl ${INSTALLATION} -o libtorch.zip - unzip libtorch.zip - else - INSTALLATION=${INSTALLATION/"conda install"/"conda install -y"} - eval $INSTALLATION - python ./test/smoke_test/smoke_test.py - ${PWD}/check_binary.sh - fi + ./.github/scripts/validate_binaries.sh From 995744c37e16b10bf1ff635c95d9912aa4a65563 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 08:17:58 -0800 Subject: [PATCH 16/23] adding wondows use case --- .github/scripts/validate_binaries.sh | 14 ++++++++------ .github/workflows/validate-windows-binaries.yml | 12 ++---------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh index 0d117f067..ff76c33cc 100755 --- a/.github/scripts/validate_binaries.sh +++ b/.github/scripts/validate_binaries.sh @@ -1,17 +1,19 @@ #!/usr/bin/env bash set -ex -eval "$(conda shell.bash hook)" -conda create -y -n ${ENV_NAME} python=${DESIRED_PYTHON} numpy pillow -conda activate ${ENV_NAME} -export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib" -export LD_LIBRARY_PATH=$CONDA_LIBRARY_PATH:$LD_LIBRARY_PATH if [[ ${PACKAGE_TYPE} == "libtorch" ]]; then curl ${INSTALLATION} -o libtorch.zip unzip libtorch.zip else + eval "$(conda shell.bash hook)" + conda create -y -n ${ENV_NAME} python=${DESIRED_PYTHON} numpy pillow + conda activate ${ENV_NAME} + export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib" + export LD_LIBRARY_PATH=$CONDA_LIBRARY_PATH:$LD_LIBRARY_PATH INSTALLATION=${INSTALLATION/"conda install"/"conda install -y"} eval $INSTALLATION python ./test/smoke_test/smoke_test.py - ${PWD}/check_binary.sh + if [[ ${TARGET_OS} != 'windows' ]]; then + ${PWD}/check_binary.sh + fi fi diff --git a/.github/workflows/validate-windows-binaries.yml b/.github/workflows/validate-windows-binaries.yml index 7ab7bf3b2..cfbadad4a 100644 --- a/.github/workflows/validate-windows-binaries.yml +++ b/.github/workflows/validate-windows-binaries.yml @@ -56,13 +56,5 @@ jobs: export GPU_ARCH_TYPE="${{ matrix.gpu_arch_type }}" export INSTALLATION="${{ matrix.installation }}" export CUDA_VER="${{ matrix.desired_cuda }}" - - if [[ ${{ matrix.package_type }} == "libtorch" ]]; then - curl ${{ matrix.installation }} -o libtorch.zip - unzip libtorch.zip - else - conda create -y -n ${ENV_NAME} python=${{ matrix.python_version }} numpy pillow - conda activate ${ENV_NAME} - eval $INSTALLATION - python ./test/smoke_test/smoke_test.py - fi + export TARGET_OS="windows" + ./.github/scripts/validate_binaries.sh From b87492bfe68a523cd1b9d867b3a7798c6ee7ba59 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 08:30:16 -0800 Subject: [PATCH 17/23] windows use case --- .github/scripts/validate_binaries.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) mode change 100755 => 100644 .github/scripts/validate_binaries.sh diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh old mode 100755 new mode 100644 index ff76c33cc..b808807ab --- a/.github/scripts/validate_binaries.sh +++ b/.github/scripts/validate_binaries.sh @@ -5,7 +5,10 @@ if [[ ${PACKAGE_TYPE} == "libtorch" ]]; then curl ${INSTALLATION} -o libtorch.zip unzip libtorch.zip else - eval "$(conda shell.bash hook)" + if [[ ${TARGET_OS} != 'windows' ]]; then + eval "$(conda shell.bash hook)" + fi + conda create -y -n ${ENV_NAME} python=${DESIRED_PYTHON} numpy pillow conda activate ${ENV_NAME} export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib" From 784843943e0bb6c7f2d89feda05dc15f7a4c33de Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 08:30:41 -0800 Subject: [PATCH 18/23] test --- .github/scripts/validate_binaries.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .github/scripts/validate_binaries.sh diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh old mode 100644 new mode 100755 From 0e2def4bd76164e8166de543e4015a3803052208 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 09:09:10 -0800 Subject: [PATCH 19/23] testing --- .github/scripts/validate_binaries.sh | 7 ++---- .github/workflows/validate-macos-binaries.yml | 25 +++---------------- .../workflows/validate-windows-binaries.yml | 11 +++++++- 3 files changed, 15 insertions(+), 28 deletions(-) diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh index b808807ab..be9096182 100755 --- a/.github/scripts/validate_binaries.sh +++ b/.github/scripts/validate_binaries.sh @@ -5,10 +5,7 @@ if [[ ${PACKAGE_TYPE} == "libtorch" ]]; then curl ${INSTALLATION} -o libtorch.zip unzip libtorch.zip else - if [[ ${TARGET_OS} != 'windows' ]]; then - eval "$(conda shell.bash hook)" - fi - + eval "$(conda shell.bash hook)" conda create -y -n ${ENV_NAME} python=${DESIRED_PYTHON} numpy pillow conda activate ${ENV_NAME} export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib" @@ -16,7 +13,7 @@ else INSTALLATION=${INSTALLATION/"conda install"/"conda install -y"} eval $INSTALLATION python ./test/smoke_test/smoke_test.py - if [[ ${TARGET_OS} != 'windows' ]]; then + if [[ ${TARGET_OS} != 'macos' ]]; then ${PWD}/check_binary.sh fi fi diff --git a/.github/workflows/validate-macos-binaries.yml b/.github/workflows/validate-macos-binaries.yml index 8cfac3f50..c79bb307c 100644 --- a/.github/workflows/validate-macos-binaries.yml +++ b/.github/workflows/validate-macos-binaries.yml @@ -67,20 +67,7 @@ jobs: export DESIRED_DEVTOOLSET="${{ matrix.devtoolset }}" export PACKAGE_TYPE="${{ matrix.package_type }}" export TARGET_OS="macos" - export LD_LIBRARY_PATH="$(dirname $(which python))/../lib" - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib - conda create -y -n ${ENV_NAME} python=${{ matrix.python_version }} numpy pillow - conda activate ${ENV_NAME} - - - if [[ ${{ matrix.package_type }} == "libtorch" ]]; then - curl ${{ matrix.installation }} -o libtorch.zip - unzip libtorch.zip - else - eval $INSTALLATION - python ./test/smoke_test/smoke_test.py - ${PWD}/check_binary.sh - fi + ./.github/scripts/validate_binaries.sh macos-arm64: needs: generate-macos-arm64-matrix @@ -104,11 +91,5 @@ jobs: export DESIRED_PYTHON="${{ matrix.python_version }}" export DESIRED_CUDA="${{ matrix.desired_cuda }}" export PACKAGE_TYPE="${{ matrix.package_type }}" - export TARGET_OS="macos" - export LD_LIBRARY_PATH="$(dirname $(which python))/../lib" - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib - conda create -y -n ${ENV_NAME} python=${{ matrix.python_version }} numpy pillow - conda activate ${ENV_NAME} - eval $INSTALLATION - python ./test/smoke_test/smoke_test.py - ${PWD}/check_binary.sh + export TARGET_OS="macos-arm64" + ./.github/scripts/validate_binaries.sh diff --git a/.github/workflows/validate-windows-binaries.yml b/.github/workflows/validate-windows-binaries.yml index cfbadad4a..594a186d9 100644 --- a/.github/workflows/validate-windows-binaries.yml +++ b/.github/workflows/validate-windows-binaries.yml @@ -57,4 +57,13 @@ jobs: export INSTALLATION="${{ matrix.installation }}" export CUDA_VER="${{ matrix.desired_cuda }}" export TARGET_OS="windows" - ./.github/scripts/validate_binaries.sh + + if [[ ${{ matrix.package_type }} == "libtorch" ]]; then + curl ${{ matrix.installation }} -o libtorch.zip + unzip libtorch.zip + else + conda create -y -n ${ENV_NAME} python=${{ matrix.python_version }} numpy pillow + conda activate ${ENV_NAME} + eval $INSTALLATION + python ./test/smoke_test/smoke_test.py + fi From 1ca3efee33c26ab77bdb979d2195045f5038bf94 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 11:56:28 -0800 Subject: [PATCH 20/23] Windows fixes --- .github/scripts/validate_binaries.sh | 9 +++++++-- .github/workflows/validate-windows-binaries.yml | 11 +---------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh index be9096182..c7ef82dee 100755 --- a/.github/scripts/validate_binaries.sh +++ b/.github/scripts/validate_binaries.sh @@ -1,11 +1,16 @@ #!/usr/bin/env bash set -ex +if [[ ${TARGET_OS} == 'windows' ]]; then + source /c/Jenkins/Miniconda3/etc/profile.d/conda.sh +else + eval "$(conda shell.bash hook)" +fi + if [[ ${PACKAGE_TYPE} == "libtorch" ]]; then curl ${INSTALLATION} -o libtorch.zip unzip libtorch.zip else - eval "$(conda shell.bash hook)" conda create -y -n ${ENV_NAME} python=${DESIRED_PYTHON} numpy pillow conda activate ${ENV_NAME} export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib" @@ -13,7 +18,7 @@ else INSTALLATION=${INSTALLATION/"conda install"/"conda install -y"} eval $INSTALLATION python ./test/smoke_test/smoke_test.py - if [[ ${TARGET_OS} != 'macos' ]]; then + if [[ ${TARGET_OS} != 'macos' and ${TARGET_OS} != 'windows' ]]; then ${PWD}/check_binary.sh fi fi diff --git a/.github/workflows/validate-windows-binaries.yml b/.github/workflows/validate-windows-binaries.yml index 594a186d9..cfbadad4a 100644 --- a/.github/workflows/validate-windows-binaries.yml +++ b/.github/workflows/validate-windows-binaries.yml @@ -57,13 +57,4 @@ jobs: export INSTALLATION="${{ matrix.installation }}" export CUDA_VER="${{ matrix.desired_cuda }}" export TARGET_OS="windows" - - if [[ ${{ matrix.package_type }} == "libtorch" ]]; then - curl ${{ matrix.installation }} -o libtorch.zip - unzip libtorch.zip - else - conda create -y -n ${ENV_NAME} python=${{ matrix.python_version }} numpy pillow - conda activate ${ENV_NAME} - eval $INSTALLATION - python ./test/smoke_test/smoke_test.py - fi + ./.github/scripts/validate_binaries.sh From 98860ceb3555c06e8a9adb15edd07c03931de22e Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 12:44:37 -0800 Subject: [PATCH 21/23] more fixes --- .github/scripts/validate_binaries.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh index c7ef82dee..d08931fc9 100755 --- a/.github/scripts/validate_binaries.sh +++ b/.github/scripts/validate_binaries.sh @@ -18,7 +18,7 @@ else INSTALLATION=${INSTALLATION/"conda install"/"conda install -y"} eval $INSTALLATION python ./test/smoke_test/smoke_test.py - if [[ ${TARGET_OS} != 'macos' and ${TARGET_OS} != 'windows' ]]; then + if [[ ${TARGET_OS} != 'macos' && ${TARGET_OS} != 'windows' ]]; then ${PWD}/check_binary.sh fi fi From cfa63cb7a28ca1b7170a990c6ce34df3dc562d6a Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 15:18:24 -0800 Subject: [PATCH 22/23] Add package type --- .github/workflows/validate-windows-binaries.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/validate-windows-binaries.yml b/.github/workflows/validate-windows-binaries.yml index cfbadad4a..9c894376e 100644 --- a/.github/workflows/validate-windows-binaries.yml +++ b/.github/workflows/validate-windows-binaries.yml @@ -56,5 +56,6 @@ jobs: export GPU_ARCH_TYPE="${{ matrix.gpu_arch_type }}" export INSTALLATION="${{ matrix.installation }}" export CUDA_VER="${{ matrix.desired_cuda }}" + export PACKAGE_TYPE="${{ matrix.package_type }}" export TARGET_OS="windows" ./.github/scripts/validate_binaries.sh From 30fe3f21413380efdd896caace773b812fe9a3a5 Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 5 Dec 2022 15:33:09 -0800 Subject: [PATCH 23/23] testing more --- .github/workflows/validate-windows-binaries.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/validate-windows-binaries.yml b/.github/workflows/validate-windows-binaries.yml index 9c894376e..4d93e5db8 100644 --- a/.github/workflows/validate-windows-binaries.yml +++ b/.github/workflows/validate-windows-binaries.yml @@ -56,6 +56,9 @@ jobs: export GPU_ARCH_TYPE="${{ matrix.gpu_arch_type }}" export INSTALLATION="${{ matrix.installation }}" export CUDA_VER="${{ matrix.desired_cuda }}" + export DESIRED_PYTHON="${{ matrix.python_version }}" + export DESIRED_CUDA="${{ matrix.desired_cuda }}" + export DESIRED_DEVTOOLSET="${{ matrix.devtoolset }}" export PACKAGE_TYPE="${{ matrix.package_type }}" export TARGET_OS="windows" ./.github/scripts/validate_binaries.sh