Skip to content

Commit

Permalink
messed up merge, Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug committed Aug 12, 2024
1 parent 2fdbdbf commit 60462ed
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 125 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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=''
Expand All @@ -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 }}
Expand Down
100 changes: 50 additions & 50 deletions .github/workflows/build-conda-linux.yml
Original file line number Diff line number Diff line change
@@ -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 }}
102 changes: 51 additions & 51 deletions .github/workflows/build-wheels-aarch64-linux.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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::'
Expand All @@ -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
Expand All @@ -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=''
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ jobs:
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
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"
Expand All @@ -48,7 +47,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
Expand All @@ -74,15 +72,14 @@ jobs:
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
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"
Expand Down Expand Up @@ -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=''
Expand All @@ -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'
Expand All @@ -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=''
Expand Down

0 comments on commit 60462ed

Please sign in to comment.