Skip to content

Commit

Permalink
Make sure nightly builds are triggered
Browse files Browse the repository at this point in the history
  • Loading branch information
atalman committed Jul 3, 2023
1 parent 46c869b commit 0a112c6
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 40 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-conda-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-conda-m1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-conda-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-conda-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-wheels-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-wheels-m1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-wheels-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-wheels-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)"
Expand All @@ -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.
Expand All @@ -55,17 +55,17 @@ 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}"
fi
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
Expand All @@ -76,7 +76,7 @@ jobs:
ref: gh-pages
script: |
set -euo pipefail
REF_TYPE=${{ github.ref_type }}
REF_NAME=${{ github.ref_name }}
Expand All @@ -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
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
- nightly
- main
- release/*
tags:
- nightly-.[0-9]+-.[0-9]+-.[0-9]+
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -41,7 +43,7 @@ jobs:
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
./.github/scripts/unittest.sh
unittests-macos:
strategy:
matrix:
Expand Down Expand Up @@ -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:
Expand All @@ -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::'
Expand All @@ -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
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/trigger-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 0a112c6

Please sign in to comment.