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

201 lines
6.4 KiB
YAML
Raw Normal View History

name: Nightly events
# 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:
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.8
- name: Install dependencies
run: >-
python -m pip install --user --upgrade setuptools wheel
- name: Build packages
run: |
python .github/prepare-nightly_version.py
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:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python_version: ["3.7"]
xla_version: ["1.6", "1.7", "1.8", "1.9"] # todo: , "nightly"
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:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python_version: ["3.6", "3.7", "3.8", "3.9"]
pytorch_version: ["1.6", "1.7", "1.8", "1.9"]
exclude:
- python_version: "3.9"
pytorch_version: "1.6"
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: 55
docker-Conda:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python_version: ["3.6", "3.7", "3.8", "3.9"]
pytorch_version: ["1.6", "1.7", "1.8", "1.9", "1.10"]
exclude:
- python_version: "3.9"
pytorch_version: "1.6"
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 }}
# see: https://pytorch.org/get-started/previous-versions/
- run: |
cuda=$(python -c "from distutils.version import LooseVersion as LVer ; print(11.1 if LVer('${{matrix.pytorch_version}}') > LVer('1.7') else 10.2)" 2>&1)
echo "::set-output name=CUDA::$cuda"
id: extend
- 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=${{ steps.extend.outputs.CUDA }}
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: 55
docker-IPU:
2021-05-07 12:07:29 +00:00
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- python_version: "3.8"
pytorch_version: "1.7"
2021-05-07 12:07:29 +00:00
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 }}
2021-05-07 12:07:29 +00:00
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 }}
2021-05-07 12:07:29 +00:00
tags: pytorchlightning/pytorch_lightning:ipu-ci-runner-py${{ matrix.python_version }}
timeout-minutes: 55