lightning/.github/workflows/events-nightly.yml

206 lines
6.9 KiB
YAML

name: Nightly
# https://jasonet.co/posts/scheduled-actions/
# https://github.community/t/distinct-job-for-each-schedule/17811/2
on:
schedule:
# At the end of every day
- cron: "0 0 * * *"
env:
PUSH_TO_HUB: true
# based on https://github.com/pypa/gh-action-pypi-publish
jobs:
pypi-release:
if: ${{ github.repository_owner == 'PyTorchLightning' }}
runs-on: ubuntu-20.04
steps:
# does nightly releases from feature branch
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: >-
python -m pip install --user --upgrade setuptools wheel
- name: Build packages
run: |
pip install -q fire
python .actions/assistant.py prepare-nightly-version
python setup.py sdist bdist_wheel
ls -lh dist/
- name: Delay releasing
uses: juliangruber/sleep-action@v1
with:
time: 5m
# We do this, since failures on test.pypi aren't that bad
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
verbose: true
docker-XLA:
if: ${{ github.repository_owner == 'PyTorchLightning' }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
# the config used in '.circleci/config.yml`'
python_version: ["3.7"]
xla_version: ["1.8"]
steps:
- name: Checkout
uses: actions/checkout@v2
# https://github.com/docker/setup-buildx-action
# Set up Docker Buildx - to use cache-from and cache-to argument of buildx command
- uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish XLA to Docker Hub
# publish master/release
uses: docker/build-push-action@v2
with:
build-args: |
PYTHON_VERSION=${{ matrix.python_version }}
XLA_VERSION=${{ matrix.xla_version }}
file: dockers/base-xla/Dockerfile
push: ${{ env.PUSH_TO_HUB }}
tags: pytorchlightning/pytorch_lightning:base-xla-py${{ matrix.python_version }}-torch${{ matrix.xla_version }}
timeout-minutes: 55
docker-CUDA:
if: ${{ github.repository_owner == 'PyTorchLightning' }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
# the config used in '.azure-pipelines/gpu-tests.yml'
- {python_version: "3.7", pytorch_version: "1.8"}
# latest (not used)
- {python_version: "3.9", pytorch_version: "1.11"}
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish CUDA to Docker Hub
# publish master/release
uses: docker/build-push-action@v2
with:
build-args: |
PYTHON_VERSION=${{ matrix.python_version }}
PYTORCH_VERSION=${{ matrix.pytorch_version }}
file: dockers/base-cuda/Dockerfile
push: ${{ env.PUSH_TO_HUB }}
tags: pytorchlightning/pytorch_lightning:base-cuda-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}
timeout-minutes: 85
docker-Conda:
if: ${{ github.repository_owner == 'PyTorchLightning' }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
# see: https://pytorch.org/get-started/previous-versions/
- {python_version: "3.8", pytorch_version: "1.8", cuda_version: "11.1"}
- {python_version: "3.8", pytorch_version: "1.9", cuda_version: "11.1"}
- {python_version: "3.8", pytorch_version: "1.10", cuda_version: "11.1"}
- {python_version: "3.9", pytorch_version: "1.11", cuda_version: "11.3.1"}
# nightly: add when there's a release candidate
# - {python_version: "3.9", pytorch_version: "1.12"}
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish Conda to Docker Hub
# publish master/release
uses: docker/build-push-action@v2
with:
build-args: |
PYTHON_VERSION=${{ matrix.python_version }}
PYTORCH_VERSION=${{ matrix.pytorch_version }}
CUDA_VERSION=${{ matrix.cuda_version }}
file: dockers/base-conda/Dockerfile
push: ${{ env.PUSH_TO_HUB }}
tags: pytorchlightning/pytorch_lightning:base-conda-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}
timeout-minutes: 85
docker-IPU:
if: ${{ github.repository_owner == 'PyTorchLightning' }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
# the config used in 'dockers/ipu-ci-runner/Dockerfile'
include:
- {python_version: "3.9", pytorch_version: "1.9"}
steps:
- name: Checkout
uses: actions/checkout@v2
# https://github.com/docker/setup-buildx-action
# Set up Docker Buildx - to use cache-from and cache-to argument of buildx command
- uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish IPU base to Docker Hub
# publish master/release
uses: docker/build-push-action@v2
with:
build-args: |
PYTHON_VERSION=${{ matrix.python_version }}
PYTORCH_VERSION=${{ matrix.pytorch_version }}
file: dockers/base-ipu/Dockerfile
push: ${{ env.PUSH_TO_HUB }}
tags: pytorchlightning/pytorch_lightning:base-ipu-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}
timeout-minutes: 55
- name: Publish IPU CI runner to Docker Hub
# publish master/release
uses: docker/build-push-action@v2
with:
build-args: |
PYTHON_VERSION=${{ matrix.python_version }}
PYTORCH_VERSION=${{ matrix.pytorch_version }}
file: dockers/ipu-ci-runner/Dockerfile
push: ${{ env.PUSH_TO_HUB }}
tags: pytorchlightning/pytorch_lightning:ipu-ci-runner-py${{ matrix.python_version }}
timeout-minutes: 55