diff --git a/.github/workflows/build-cmake.yml b/.github/workflows/build-cmake.yml index 3871dca340f..092f3dc683c 100644 --- a/.github/workflows/build-cmake.yml +++ b/.github/workflows/build-cmake.yml @@ -4,9 +4,11 @@ on: pull_request: push: branches: - - nightly - main - release/* + tags: + # Nightly builds look like: nightly-2022-06-03 + - nightly-.[0-9]+-.[0-9]+-.[0-9]+ workflow_dispatch: jobs: diff --git a/.github/workflows/build-conda-linux.yml b/.github/workflows/build-conda-linux.yml index e44bb877ed6..ddb6b75eb48 100644 --- a/.github/workflows/build-conda-linux.yml +++ b/.github/workflows/build-conda-linux.yml @@ -4,13 +4,14 @@ on: pull_request: push: branches: - - nightly - main - release/* tags: - # NOTE: Binary build pipelines should only get triggered on release candidate builds + # NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds # Release candidate tags look like: v1.11.0-rc1 + # Nightly builds look like: nightly-2022-06-03 - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + - nightly-.[0-9]+-.[0-9]+-.[0-9]+ workflow_dispatch: jobs: diff --git a/.github/workflows/build-conda-m1.yml b/.github/workflows/build-conda-m1.yml index 7006b6714aa..581121a0508 100644 --- a/.github/workflows/build-conda-m1.yml +++ b/.github/workflows/build-conda-m1.yml @@ -4,13 +4,14 @@ on: pull_request: push: branches: - - nightly - main - release/* tags: - # NOTE: Binary build pipelines should only get triggered on release candidate builds + # NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds # Release candidate tags look like: v1.11.0-rc1 + # Nightly builds look like: nightly-2022-06-03 - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + - nightly-.[0-9]+-.[0-9]+-.[0-9]+ workflow_dispatch: jobs: diff --git a/.github/workflows/build-conda-macos.yml b/.github/workflows/build-conda-macos.yml index 39d00534b3a..cbc29a05561 100644 --- a/.github/workflows/build-conda-macos.yml +++ b/.github/workflows/build-conda-macos.yml @@ -4,13 +4,14 @@ on: pull_request: push: branches: - - nightly - main - release/* tags: - # NOTE: Binary build pipelines should only get triggered on release candidate builds + # NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds # Release candidate tags look like: v1.11.0-rc1 + # Nightly builds look like: nightly-2022-06-03 - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + - nightly-.[0-9]+-.[0-9]+-.[0-9]+ workflow_dispatch: jobs: diff --git a/.github/workflows/build-conda-windows.yml b/.github/workflows/build-conda-windows.yml index 954d09d39ec..6953a21a263 100644 --- a/.github/workflows/build-conda-windows.yml +++ b/.github/workflows/build-conda-windows.yml @@ -4,13 +4,14 @@ on: pull_request: push: branches: - - nightly - main - release/* tags: - # NOTE: Binary build pipelines should only get triggered on release candidate builds + # NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds # Release candidate tags look like: v1.11.0-rc1 + # Nightly builds look like: nightly-2022-06-03 - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + - nightly-.[0-9]+-.[0-9]+-.[0-9]+ workflow_dispatch: jobs: diff --git a/.github/workflows/build-wheels-linux.yml b/.github/workflows/build-wheels-linux.yml index e997d648ec2..439b129ccee 100644 --- a/.github/workflows/build-wheels-linux.yml +++ b/.github/workflows/build-wheels-linux.yml @@ -4,13 +4,14 @@ on: pull_request: push: branches: - - nightly - main - release/* tags: - # NOTE: Binary build pipelines should only get triggered on release candidate builds + # NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds # Release candidate tags look like: v1.11.0-rc1 + # Nightly builds look like: nightly-2022-06-03 - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + - nightly-.[0-9]+-.[0-9]+-.[0-9]+ workflow_dispatch: jobs: diff --git a/.github/workflows/build-wheels-m1.yml b/.github/workflows/build-wheels-m1.yml index 66c7687acc9..8b85293c68e 100644 --- a/.github/workflows/build-wheels-m1.yml +++ b/.github/workflows/build-wheels-m1.yml @@ -4,13 +4,14 @@ on: pull_request: push: branches: - - nightly - main - release/* tags: - # NOTE: Binary build pipelines should only get triggered on release candidate builds + # NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds # Release candidate tags look like: v1.11.0-rc1 + # Nightly builds look like: nightly-2022-06-03 - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + - nightly-.[0-9]+-.[0-9]+-.[0-9]+ workflow_dispatch: jobs: diff --git a/.github/workflows/build-wheels-macos.yml b/.github/workflows/build-wheels-macos.yml index 6c5ebc0fc37..310df74dda7 100644 --- a/.github/workflows/build-wheels-macos.yml +++ b/.github/workflows/build-wheels-macos.yml @@ -4,13 +4,14 @@ on: pull_request: push: branches: - - nightly - main - release/* tags: - # NOTE: Binary build pipelines should only get triggered on release candidate builds + # NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds # Release candidate tags look like: v1.11.0-rc1 + # Nightly builds look like: nightly-2022-06-03 - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + - nightly-.[0-9]+-.[0-9]+-.[0-9]+ workflow_dispatch: jobs: diff --git a/.github/workflows/build-wheels-windows.yml b/.github/workflows/build-wheels-windows.yml index 3d818ece538..8a0add5220a 100644 --- a/.github/workflows/build-wheels-windows.yml +++ b/.github/workflows/build-wheels-windows.yml @@ -4,13 +4,14 @@ on: pull_request: push: branches: - - nightly - main - release/* tags: - # NOTE: Binary build pipelines should only get triggered on release candidate builds + # NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds # Release candidate tags look like: v1.11.0-rc1 + # Nightly builds look like: nightly-2022-06-03 - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + - nightly-.[0-9]+-.[0-9]+-.[0-9]+ workflow_dispatch: jobs: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f4cc76db05e..b5fe3f02180 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -4,12 +4,12 @@ on: pull_request: push: branches: - - nightly - main - release/* tags: - v[0-9]+.[0-9]+.[0-9] - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + - nightly-.[0-9]+-.[0-9]+-.[0-9]+ workflow_dispatch: jobs: @@ -25,7 +25,7 @@ jobs: export GPU_ARCH_TYPE=cpu export GPU_ARCH_VERSION='' ./.github/scripts/setup-env.sh - + # Prepare conda CONDA_PATH=$(which conda) eval "$(${CONDA_PATH} shell.bash hook)" @@ -36,13 +36,13 @@ jobs: # 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? export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}" - + cd docs - + echo '::group::Install doc requirements' pip install --progress-bar=off -r requirements.txt echo '::endgroup::' - + if [[ ${{ github.event_name }} == push && (${{ github.ref_type }} == tag || (${{ github.ref_type }} == branch && ${{ github.ref_name }} == release/*)) ]]; then echo '::group::Enable version string sanitization' # This environment variable just has to exist and must not be empty. The actual value is arbitrary. @@ -55,9 +55,9 @@ jobs: # cores (`-j auto`). Thus, we limit to a single process (`-j 1`) here. sed -i -e 's/-j auto/-j 1/' Makefile make html - + cp -r build/html "${RUNNER_ARTIFACT_DIR}" - + # On PRs we also want to upload the docs into our S3 bucket for preview. if [[ ${{ github.event_name == 'pull_request' }} ]]; then cp -r build/html/* "${RUNNER_DOCS_DIR}" @@ -65,7 +65,7 @@ jobs: upload: needs: build - if: github.repository == 'pytorch/vision' && github.event_name == 'push' && + if: github.repository == 'pytorch/vision' && github.event_name == 'push' && ((github.ref_type == 'branch' && github.ref_name == 'main') || github.ref_type == 'tag') permissions: contents: write @@ -76,7 +76,7 @@ jobs: ref: gh-pages script: | set -euo pipefail - + REF_TYPE=${{ github.ref_type }} REF_NAME=${{ github.ref_name }} @@ -101,14 +101,14 @@ jobs: rm -rf "${TARGET_FOLDER}"/* mv "${RUNNER_ARTIFACT_DIR}"/html/* "${TARGET_FOLDER}" git add "${TARGET_FOLDER}" || true - + if [[ "${TARGET_FOLDER}" == main ]]; then mkdir -p _static rm -rf _static/* cp -r "${TARGET_FOLDER}"/_static/* _static git add _static || true fi - + git config user.name 'pytorchbot' git config user.email 'soumith+bot@pytorch.org' git commit -m "auto-generating sphinx docs" || true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 22e1a4ac18d..cf6aee41bf6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,6 +7,8 @@ on: - nightly - main - release/* + tags: + - nightly-.[0-9]+-.[0-9]+-.[0-9]+ workflow_dispatch: jobs: @@ -41,7 +43,7 @@ jobs: export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} ./.github/scripts/unittest.sh - + unittests-macos: strategy: matrix: @@ -102,7 +104,7 @@ jobs: export VSDEVCMD_ARGS="" export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} - + ./.github/scripts/unittest.sh onnx: @@ -117,20 +119,20 @@ jobs: export GPU_ARCH_VERSION='' ./.github/scripts/setup-env.sh - + # Prepare conda CONDA_PATH=$(which conda) eval "$(${CONDA_PATH} shell.bash hook)" conda activate ci - + echo '::group::Install ONNX' pip install --progress-bar=off onnx onnxruntime echo '::endgroup::' - + echo '::group::Install testing utilities' pip install --progress-bar=off pytest echo '::endgroup::' - + echo '::group::Run ONNX tests' pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_onnx.py echo '::endgroup::' @@ -147,21 +149,21 @@ jobs: export GPU_ARCH_VERSION='' ./.github/scripts/setup-env.sh - + # Prepare conda CONDA_PATH=$(which conda) eval "$(${CONDA_PATH} shell.bash hook)" conda activate ci - + echo '::group::Pre-download model weights' pip install --progress-bar=off aiohttp aiofiles tqdm python scripts/download_model_urls.py echo '::endgroup::' - + echo '::group::Install testing utilities' pip install --progress-bar=off pytest echo '::endgroup::' - + echo '::group::Run extended unittests' export PYTORCH_TEST_WITH_EXTENDED=1 pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_extended_*.py diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index 78832c4ac78..05f8e124e3f 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -12,11 +12,14 @@ jobs: name: Tag nightly from main runs-on: ubuntu-latest steps: + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - uses: actions/checkout@v2 with: ref: main token: ${{ secrets.GH_PYTORCHBOT_TOKEN }} - name: Tag nightly from main run: | - git tag -f nightly - git push origin -f nightly + git tag -f nightly-${{ steps.date.outputs.date }} + git push origin -f nightly-${{ steps.date.outputs.date }}