From 60462edc47fd00f9d3dc8c18aea2e8ddd94b8f7d Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Mon, 12 Aug 2024 13:33:29 +0100 Subject: [PATCH] messed up merge, Update workflows --- .github/workflows/build-cmake.yml | 6 +- .github/workflows/build-conda-linux.yml | 100 ++++++++--------- .../workflows/build-wheels-aarch64-linux.yml | 102 +++++++++--------- .github/workflows/docs.yml | 2 +- .github/workflows/lint.yml | 16 +-- .github/workflows/tests.yml | 13 +-- 6 files changed, 114 insertions(+), 125 deletions(-) diff --git a/.github/workflows/build-cmake.yml b/.github/workflows/build-cmake.yml index 1ab20669f0b..561b419297f 100644 --- a/.github/workflows/build-cmake.yml +++ b/.github/workflows/build-cmake.yml @@ -30,7 +30,7 @@ jobs: script: | set -euo pipefail - export PYTHON_VERSION=3.8 + export PYTHON_VERSION=3.9 export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} @@ -50,7 +50,7 @@ jobs: script: | set -euo pipefail - export PYTHON_VERSION=3.8 + export PYTHON_VERSION=3.9 export GPU_ARCH_TYPE=cpu export GPU_ARCH_VERSION='' @@ -76,7 +76,7 @@ jobs: script: | set -euo pipefail - export PYTHON_VERSION=3.8 + export PYTHON_VERSION=3.9 export VC_YEAR=2022 export VSDEVCMD_ARGS="" export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} diff --git a/.github/workflows/build-conda-linux.yml b/.github/workflows/build-conda-linux.yml index c7036ad9155..a445ef9af25 100644 --- a/.github/workflows/build-conda-linux.yml +++ b/.github/workflows/build-conda-linux.yml @@ -1,52 +1,52 @@ -# name: Build Linux Conda +name: Build Linux Conda -# on: -# pull_request: -# push: -# branches: -# - nightly -# - main -# - release/* -# tags: -# # NOTE: Binary build pipelines should only get triggered on release candidate builds -# # Release candidate tags look like: v1.11.0-rc1 -# - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ -# workflow_dispatch: +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + workflow_dispatch: -# jobs: -# generate-matrix: -# uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main -# with: -# package-type: conda -# os: linux -# test-infra-repository: pytorch/test-infra -# test-infra-ref: main -# build: -# needs: generate-matrix -# strategy: -# fail-fast: false -# matrix: -# include: -# - repository: pytorch/vision -# pre-script: "" -# post-script: "" -# conda-package-directory: packaging/torchvision -# smoke-test-script: test/smoke_test.py -# package-name: torchvision -# name: ${{ matrix.repository }} -# uses: pytorch/test-infra/.github/workflows/build_conda_linux.yml@main -# with: -# conda-package-directory: ${{ matrix.conda-package-directory }} -# repository: ${{ matrix.repository }} -# ref: "" -# test-infra-repository: pytorch/test-infra -# test-infra-ref: main -# build-matrix: ${{ needs.generate-matrix.outputs.matrix }} -# pre-script: ${{ matrix.pre-script }} -# post-script: ${{ matrix.post-script }} -# package-name: ${{ matrix.package-name }} -# smoke-test-script: ${{ matrix.smoke-test-script }} -# trigger-event: ${{ github.event_name }} -# secrets: -# CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} -# CONDA_PYTORCHBOT_TOKEN_TEST: ${{ secrets.CONDA_PYTORCHBOT_TOKEN_TEST }} +jobs: + generate-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: conda + os: linux + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build: + needs: generate-matrix + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/vision + pre-script: "" + post-script: "" + conda-package-directory: packaging/torchvision + smoke-test-script: test/smoke_test.py + package-name: torchvision + name: ${{ matrix.repository }} + uses: pytorch/test-infra/.github/workflows/build_conda_linux.yml@main + with: + conda-package-directory: ${{ matrix.conda-package-directory }} + repository: ${{ matrix.repository }} + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-matrix.outputs.matrix }} + pre-script: ${{ matrix.pre-script }} + post-script: ${{ matrix.post-script }} + package-name: ${{ matrix.package-name }} + smoke-test-script: ${{ matrix.smoke-test-script }} + trigger-event: ${{ github.event_name }} + secrets: + CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} + CONDA_PYTORCHBOT_TOKEN_TEST: ${{ secrets.CONDA_PYTORCHBOT_TOKEN_TEST }} diff --git a/.github/workflows/build-wheels-aarch64-linux.yml b/.github/workflows/build-wheels-aarch64-linux.yml index 6266905d7b8..05c83991d5b 100644 --- a/.github/workflows/build-wheels-aarch64-linux.yml +++ b/.github/workflows/build-wheels-aarch64-linux.yml @@ -1,54 +1,54 @@ -# name: Build Aarch64 Linux Wheels +name: Build Aarch64 Linux Wheels -# on: -# pull_request: -# push: -# branches: -# - nightly -# - main -# - release/* -# tags: -# # NOTE: Binary build pipelines should only get triggered on release candidate builds -# # Release candidate tags look like: v1.11.0-rc1 -# - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ -# workflow_dispatch: +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + workflow_dispatch: -# permissions: -# id-token: write -# contents: read +permissions: + id-token: write + contents: read -# jobs: -# generate-matrix: -# uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main -# with: -# package-type: wheel -# os: linux-aarch64 -# test-infra-repository: pytorch/test-infra -# test-infra-ref: main -# with-cuda: disable -# build: -# needs: generate-matrix -# strategy: -# fail-fast: false -# matrix: -# include: -# - repository: pytorch/vision -# pre-script: packaging/pre_build_script.sh -# post-script: packaging/post_build_script.sh -# smoke-test-script: test/smoke_test.py -# package-name: torchvision -# name: ${{ matrix.repository }} -# uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main -# with: -# repository: ${{ matrix.repository }} -# ref: "" -# test-infra-repository: pytorch/test-infra -# test-infra-ref: main -# build-matrix: ${{ needs.generate-matrix.outputs.matrix }} -# pre-script: ${{ matrix.pre-script }} -# post-script: ${{ matrix.post-script }} -# package-name: ${{ matrix.package-name }} -# smoke-test-script: ${{ matrix.smoke-test-script }} -# trigger-event: ${{ github.event_name }} -# architecture: aarch64 -# setup-miniconda: false +jobs: + generate-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: wheel + os: linux-aarch64 + test-infra-repository: pytorch/test-infra + test-infra-ref: main + with-cuda: disable + build: + needs: generate-matrix + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/vision + pre-script: packaging/pre_build_script.sh + post-script: packaging/post_build_script.sh + smoke-test-script: test/smoke_test.py + package-name: torchvision + name: ${{ matrix.repository }} + uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main + with: + repository: ${{ matrix.repository }} + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-matrix.outputs.matrix }} + pre-script: ${{ matrix.pre-script }} + post-script: ${{ matrix.post-script }} + package-name: ${{ matrix.package-name }} + smoke-test-script: ${{ matrix.smoke-test-script }} + trigger-event: ${{ github.event_name }} + architecture: aarch64 + setup-miniconda: false diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5402294322d..4899b81c956 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,7 +22,7 @@ jobs: script: | set -euo pipefail - export PYTHON_VERSION=3.8 + export PYTHON_VERSION=3.10 export GPU_ARCH_TYPE=cpu export GPU_ARCH_VERSION='' ./.github/scripts/setup-env.sh diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5c2b3344247..eac1c009eec 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,7 +21,7 @@ jobs: echo '::group::Setup environment' CONDA_PATH=$(which conda) eval "$(${CONDA_PATH} shell.bash hook)" - conda create --name ci --quiet --yes python=3.8 pip + conda create --name ci --quiet --yes python=3.9 pip conda activate ci echo '::endgroup::' @@ -48,22 +48,14 @@ jobs: echo '::group::Setup environment' CONDA_PATH=$(which conda) eval "$(${CONDA_PATH} shell.bash hook)" - # clang-format needs some shared libraries that conflict with the system ones. Thus, we install them from conda - # and prepend the libraries to linker path to prioritize them. `ncurses=5` is only available on the conda-forge - # channel. Since we are not building or testing here, this is fine. - conda create --name ci --quiet --yes -c conda-forge python=3.8 ncurses=5 libgcc + conda create --name ci --quiet --yes -c conda-forge python=3.9 clang-format conda activate ci - export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}" echo '::endgroup::' - echo '::group::Install lint tools' - curl https://oss-clang-format.s3.us-east-2.amazonaws.com/linux64/clang-format-linux64 -o ./clang-format - chmod +x ./clang-format - echo '::endgroup::' echo '::group::Lint C source' set +e - ./.github/scripts/run-clang-format.py -r torchvision/csrc --clang-format-executable ./clang-format --exclude "torchvision/csrc/io/image/cpu/giflib/*" + ./.github/scripts/run-clang-format.py -r torchvision/csrc --exclude "torchvision/csrc/io/image/cpu/giflib/*" if [ $? -ne 0 ]; then git --no-pager diff @@ -80,7 +72,7 @@ jobs: script: | set -euo pipefail - export PYTHON_VERSION=3.8 + export PYTHON_VERSION=3.9 export GPU_ARCH_TYPE=cpu export GPU_ARCH_VERSION='' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 93d6afb00d5..6f03b0a59eb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,6 @@ jobs: strategy: matrix: python-version: - - "3.8" - "3.9" - "3.10" - "3.11" @@ -22,7 +21,7 @@ jobs: runner: ["linux.12xlarge"] gpu-arch-type: ["cpu"] include: - - python-version: 3.8 + - python-version: 3.9 runner: linux.g5.4xlarge.nvidia.gpu gpu-arch-type: cuda gpu-arch-version: "11.8" @@ -48,7 +47,6 @@ jobs: strategy: matrix: python-version: - - "3.8" - "3.9" - "3.10" - "3.11" @@ -74,7 +72,6 @@ jobs: strategy: matrix: python-version: - - "3.8" - "3.9" - "3.10" - "3.11" @@ -82,7 +79,7 @@ jobs: runner: ["windows.4xlarge"] gpu-arch-type: ["cpu"] include: - - python-version: "3.8" + - python-version: "3.9" runner: windows.g5.4xlarge.nvidia.gpu gpu-arch-type: cuda gpu-arch-version: "11.8" @@ -114,7 +111,7 @@ jobs: script: | set -euo pipefail - export PYTHON_VERSION=3.8 + export PYTHON_VERSION=3.10 export GPU_ARCH_TYPE=cpu export GPU_ARCH_VERSION='' @@ -130,7 +127,7 @@ jobs: echo '::endgroup::' echo '::group::Install testing utilities' - pip install --progress-bar=off pytest + pip install --progress-bar=off pytest "numpy<2" echo '::endgroup::' echo '::group::Run ONNX tests' @@ -146,7 +143,7 @@ jobs: script: | set -euo pipefail - export PYTHON_VERSION=3.8 + export PYTHON_VERSION=3.9 export GPU_ARCH_TYPE=cpu export GPU_ARCH_VERSION=''