Unverified Commit 1d6f7875 authored by Huy Do's avatar Huy Do Committed by GitHub
Browse files

Specify test-infra branch to main (#8046)

parent 70a8e05a
...@@ -26,6 +26,7 @@ jobs: ...@@ -26,6 +26,7 @@ jobs:
runner: ${{ matrix.runner }} runner: ${{ matrix.runner }}
gpu-arch-type: ${{ matrix.gpu-arch-type }} gpu-arch-type: ${{ matrix.gpu-arch-type }}
gpu-arch-version: ${{ matrix.gpu-arch-version }} gpu-arch-version: ${{ matrix.gpu-arch-version }}
test-infra-ref: main
script: | script: |
set -euo pipefail set -euo pipefail
...@@ -46,6 +47,7 @@ jobs: ...@@ -46,6 +47,7 @@ jobs:
with: with:
repository: pytorch/vision repository: pytorch/vision
runner: ${{ matrix.runner }} runner: ${{ matrix.runner }}
test-infra-ref: main
script: | script: |
set -euo pipefail set -euo pipefail
...@@ -71,6 +73,7 @@ jobs: ...@@ -71,6 +73,7 @@ jobs:
runner: ${{ matrix.runner }} runner: ${{ matrix.runner }}
gpu-arch-type: ${{ matrix.gpu-arch-type }} gpu-arch-type: ${{ matrix.gpu-arch-type }}
gpu-arch-version: ${{ matrix.gpu-arch-version }} gpu-arch-version: ${{ matrix.gpu-arch-version }}
test-infra-ref: main
script: | script: |
set -euo pipefail set -euo pipefail
......
...@@ -18,6 +18,7 @@ jobs: ...@@ -18,6 +18,7 @@ jobs:
with: with:
repository: pytorch/vision repository: pytorch/vision
upload-artifact: docs upload-artifact: docs
test-infra-ref: main
script: | script: |
set -euo pipefail set -euo pipefail
...@@ -25,7 +26,7 @@ jobs: ...@@ -25,7 +26,7 @@ jobs:
export GPU_ARCH_TYPE=cpu export GPU_ARCH_TYPE=cpu
export GPU_ARCH_VERSION='' export GPU_ARCH_VERSION=''
./.github/scripts/setup-env.sh ./.github/scripts/setup-env.sh
# Prepare conda # Prepare conda
CONDA_PATH=$(which conda) CONDA_PATH=$(which conda)
eval "$(${CONDA_PATH} shell.bash hook)" eval "$(${CONDA_PATH} shell.bash hook)"
...@@ -36,13 +37,13 @@ jobs: ...@@ -36,13 +37,13 @@ jobs:
# Should we maybe always do this in `./.github/scripts/setup-env.sh` so that we don't # Should we maybe always do this in `./.github/scripts/setup-env.sh` so that we don't
# have to pay attention in all other workflows? # have to pay attention in all other workflows?
export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}" export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}"
cd docs cd docs
echo '::group::Install doc requirements' echo '::group::Install doc requirements'
pip install --progress-bar=off -r requirements.txt pip install --progress-bar=off -r requirements.txt
echo '::endgroup::' echo '::endgroup::'
if [[ ${{ github.event_name }} == push && (${{ github.ref_type }} == tag || (${{ github.ref_type }} == branch && ${{ github.ref_name }} == release/*)) ]]; then if [[ ${{ github.event_name }} == push && (${{ github.ref_type }} == tag || (${{ github.ref_type }} == branch && ${{ github.ref_name }} == release/*)) ]]; then
echo '::group::Enable version string sanitization' echo '::group::Enable version string sanitization'
# This environment variable just has to exist and must not be empty. The actual value is arbitrary. # This environment variable just has to exist and must not be empty. The actual value is arbitrary.
...@@ -66,9 +67,9 @@ jobs: ...@@ -66,9 +67,9 @@ jobs:
cp $file build/html/_generated_ipynb_notebooks/ cp $file build/html/_generated_ipynb_notebooks/
fi fi
done done
cp -r build/html "${RUNNER_ARTIFACT_DIR}" cp -r build/html "${RUNNER_ARTIFACT_DIR}"
# On PRs we also want to upload the docs into our S3 bucket for preview. # On PRs we also want to upload the docs into our S3 bucket for preview.
if [[ ${{ github.event_name == 'pull_request' }} ]]; then if [[ ${{ github.event_name == 'pull_request' }} ]]; then
cp -r build/html/* "${RUNNER_DOCS_DIR}" cp -r build/html/* "${RUNNER_DOCS_DIR}"
...@@ -85,9 +86,10 @@ jobs: ...@@ -85,9 +86,10 @@ jobs:
repository: pytorch/vision repository: pytorch/vision
download-artifact: docs download-artifact: docs
ref: gh-pages ref: gh-pages
test-infra-ref: main
script: | script: |
set -euo pipefail set -euo pipefail
REF_TYPE=${{ github.ref_type }} REF_TYPE=${{ github.ref_type }}
REF_NAME=${{ github.ref_name }} REF_NAME=${{ github.ref_name }}
...@@ -112,14 +114,14 @@ jobs: ...@@ -112,14 +114,14 @@ jobs:
rm -rf "${TARGET_FOLDER}"/* rm -rf "${TARGET_FOLDER}"/*
mv "${RUNNER_ARTIFACT_DIR}"/html/* "${TARGET_FOLDER}" mv "${RUNNER_ARTIFACT_DIR}"/html/* "${TARGET_FOLDER}"
git add "${TARGET_FOLDER}" || true git add "${TARGET_FOLDER}" || true
if [[ "${TARGET_FOLDER}" == main ]]; then if [[ "${TARGET_FOLDER}" == main ]]; then
mkdir -p _static mkdir -p _static
rm -rf _static/* rm -rf _static/*
cp -r "${TARGET_FOLDER}"/_static/* _static cp -r "${TARGET_FOLDER}"/_static/* _static
git add _static || true git add _static || true
fi fi
git config user.name 'pytorchbot' git config user.name 'pytorchbot'
git config user.email 'soumith+bot@pytorch.org' git config user.email 'soumith+bot@pytorch.org'
git config http.postBuffer 524288000 git config http.postBuffer 524288000
......
...@@ -14,6 +14,7 @@ jobs: ...@@ -14,6 +14,7 @@ jobs:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with: with:
repository: pytorch/vision repository: pytorch/vision
test-infra-ref: main
script: | script: |
set -euo pipefail set -euo pipefail
...@@ -23,14 +24,14 @@ jobs: ...@@ -23,14 +24,14 @@ jobs:
conda create --name ci --quiet --yes python=3.8 pip conda create --name ci --quiet --yes python=3.8 pip
conda activate ci conda activate ci
echo '::endgroup::' echo '::endgroup::'
echo '::group::Install lint tools' echo '::group::Install lint tools'
pip install --progress-bar=off pre-commit pip install --progress-bar=off pre-commit
echo '::endgroup::' echo '::endgroup::'
set +e set +e
pre-commit run --all-files pre-commit run --all-files
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
git --no-pager diff git --no-pager diff
exit 1 exit 1
...@@ -40,9 +41,10 @@ jobs: ...@@ -40,9 +41,10 @@ jobs:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with: with:
repository: pytorch/vision repository: pytorch/vision
test-infra-ref: main
script: | script: |
set -euo pipefail set -euo pipefail
echo '::group::Setup environment' echo '::group::Setup environment'
CONDA_PATH=$(which conda) CONDA_PATH=$(which conda)
eval "$(${CONDA_PATH} shell.bash hook)" eval "$(${CONDA_PATH} shell.bash hook)"
...@@ -53,7 +55,7 @@ jobs: ...@@ -53,7 +55,7 @@ jobs:
conda activate ci conda activate ci
export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}" export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}"
echo '::endgroup::' echo '::endgroup::'
echo '::group::Install lint tools' echo '::group::Install lint tools'
curl https://oss-clang-format.s3.us-east-2.amazonaws.com/linux64/clang-format-linux64 -o ./clang-format curl https://oss-clang-format.s3.us-east-2.amazonaws.com/linux64/clang-format-linux64 -o ./clang-format
chmod +x ./clang-format chmod +x ./clang-format
...@@ -62,7 +64,7 @@ jobs: ...@@ -62,7 +64,7 @@ jobs:
echo '::group::Lint C source' echo '::group::Lint C source'
set +e set +e
./.github/scripts/run-clang-format.py -r torchvision/csrc --clang-format-executable ./clang-format ./.github/scripts/run-clang-format.py -r torchvision/csrc --clang-format-executable ./clang-format
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
git --no-pager diff git --no-pager diff
exit 1 exit 1
...@@ -74,23 +76,24 @@ jobs: ...@@ -74,23 +76,24 @@ jobs:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with: with:
repository: pytorch/vision repository: pytorch/vision
test-infra-ref: main
script: | script: |
set -euo pipefail set -euo pipefail
export PYTHON_VERSION=3.8 export PYTHON_VERSION=3.8
export GPU_ARCH_TYPE=cpu export GPU_ARCH_TYPE=cpu
export GPU_ARCH_VERSION='' export GPU_ARCH_VERSION=''
./.github/scripts/setup-env.sh ./.github/scripts/setup-env.sh
CONDA_PATH=$(which conda) CONDA_PATH=$(which conda)
eval "$(${CONDA_PATH} shell.bash hook)" eval "$(${CONDA_PATH} shell.bash hook)"
conda activate ci conda activate ci
echo '::group::Install lint tools' echo '::group::Install lint tools'
pip install --progress-bar=off mypy pip install --progress-bar=off mypy
echo '::endgroup::' echo '::endgroup::'
echo '::group::Lint Python types' echo '::group::Lint Python types'
mypy --install-types --non-interactive --config-file mypy.ini mypy --install-types --non-interactive --config-file mypy.ini
echo '::endgroup::' echo '::endgroup::'
......
...@@ -33,6 +33,7 @@ jobs: ...@@ -33,6 +33,7 @@ jobs:
gpu-arch-type: ${{ matrix.gpu-arch-type }} gpu-arch-type: ${{ matrix.gpu-arch-type }}
gpu-arch-version: ${{ matrix.gpu-arch-version }} gpu-arch-version: ${{ matrix.gpu-arch-version }}
timeout: 120 timeout: 120
test-infra-ref: main
script: | script: |
set -euo pipefail set -euo pipefail
...@@ -41,7 +42,7 @@ jobs: ...@@ -41,7 +42,7 @@ jobs:
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
./.github/scripts/unittest.sh ./.github/scripts/unittest.sh
unittests-macos: unittests-macos:
strategy: strategy:
matrix: matrix:
...@@ -62,6 +63,7 @@ jobs: ...@@ -62,6 +63,7 @@ jobs:
# and needs roughly 2 hours to just run the test suite # and needs roughly 2 hours to just run the test suite
timeout: 240 timeout: 240
runner: ${{ matrix.runner }} runner: ${{ matrix.runner }}
test-infra-ref: main
script: | script: |
set -euo pipefail set -euo pipefail
...@@ -94,6 +96,7 @@ jobs: ...@@ -94,6 +96,7 @@ jobs:
gpu-arch-type: ${{ matrix.gpu-arch-type }} gpu-arch-type: ${{ matrix.gpu-arch-type }}
gpu-arch-version: ${{ matrix.gpu-arch-version }} gpu-arch-version: ${{ matrix.gpu-arch-version }}
timeout: 120 timeout: 120
test-infra-ref: main
script: | script: |
set -euxo pipefail set -euxo pipefail
...@@ -102,13 +105,14 @@ jobs: ...@@ -102,13 +105,14 @@ jobs:
export VSDEVCMD_ARGS="" export VSDEVCMD_ARGS=""
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
./.github/scripts/unittest.sh ./.github/scripts/unittest.sh
onnx: onnx:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with: with:
repository: pytorch/vision repository: pytorch/vision
test-infra-ref: main
script: | script: |
set -euo pipefail set -euo pipefail
...@@ -117,20 +121,20 @@ jobs: ...@@ -117,20 +121,20 @@ jobs:
export GPU_ARCH_VERSION='' export GPU_ARCH_VERSION=''
./.github/scripts/setup-env.sh ./.github/scripts/setup-env.sh
# Prepare conda # Prepare conda
CONDA_PATH=$(which conda) CONDA_PATH=$(which conda)
eval "$(${CONDA_PATH} shell.bash hook)" eval "$(${CONDA_PATH} shell.bash hook)"
conda activate ci conda activate ci
echo '::group::Install ONNX' echo '::group::Install ONNX'
pip install --progress-bar=off onnx onnxruntime pip install --progress-bar=off onnx onnxruntime
echo '::endgroup::' echo '::endgroup::'
echo '::group::Install testing utilities' echo '::group::Install testing utilities'
pip install --progress-bar=off pytest pip install --progress-bar=off pytest
echo '::endgroup::' echo '::endgroup::'
echo '::group::Run ONNX tests' echo '::group::Run ONNX tests'
pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_onnx.py pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_onnx.py
echo '::endgroup::' echo '::endgroup::'
...@@ -139,6 +143,7 @@ jobs: ...@@ -139,6 +143,7 @@ jobs:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with: with:
repository: pytorch/vision repository: pytorch/vision
test-infra-ref: main
script: | script: |
set -euo pipefail set -euo pipefail
...@@ -147,21 +152,21 @@ jobs: ...@@ -147,21 +152,21 @@ jobs:
export GPU_ARCH_VERSION='' export GPU_ARCH_VERSION=''
./.github/scripts/setup-env.sh ./.github/scripts/setup-env.sh
# Prepare conda # Prepare conda
CONDA_PATH=$(which conda) CONDA_PATH=$(which conda)
eval "$(${CONDA_PATH} shell.bash hook)" eval "$(${CONDA_PATH} shell.bash hook)"
conda activate ci conda activate ci
echo '::group::Pre-download model weights' echo '::group::Pre-download model weights'
pip install --progress-bar=off aiohttp aiofiles tqdm pip install --progress-bar=off aiohttp aiofiles tqdm
python scripts/download_model_urls.py python scripts/download_model_urls.py
echo '::endgroup::' echo '::endgroup::'
echo '::group::Install testing utilities' echo '::group::Install testing utilities'
pip install --progress-bar=off pytest pip install --progress-bar=off pytest
echo '::endgroup::' echo '::endgroup::'
echo '::group::Run extended unittests' echo '::group::Run extended unittests'
export PYTORCH_TEST_WITH_EXTENDED=1 export PYTORCH_TEST_WITH_EXTENDED=1
pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_extended_*.py pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_extended_*.py
......
...@@ -18,6 +18,7 @@ jobs: ...@@ -18,6 +18,7 @@ jobs:
with: with:
repository: pytorch/vision repository: pytorch/vision
required_checks: "Build Linux,Build M1,Build Macos,Build Windows,Tests,CMake,Lint,Docs" required_checks: "Build Linux,Build M1,Build Macos,Build Windows,Tests,CMake,Lint,Docs"
test-infra-ref: main
secrets: secrets:
ROCKSET_API_KEY: ${{ secrets.ROCKSET_API_KEY }} ROCKSET_API_KEY: ${{ secrets.ROCKSET_API_KEY }}
GITHUB_DEPLOY_KEY : ${{ secrets.VISION_GITHUB_DEPLOY_KEY }} GITHUB_DEPLOY_KEY : ${{ secrets.VISION_GITHUB_DEPLOY_KEY }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment