2020-06-30 14:56:05 +00:00
|
|
|
name: PyTorch & Conda
|
|
|
|
|
|
|
|
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
|
2020-09-10 22:38:29 +00:00
|
|
|
on: # Trigger the workflow on push or pull request, but only for the master branch
|
2020-06-30 14:56:05 +00:00
|
|
|
push:
|
2021-02-09 17:25:57 +00:00
|
|
|
branches: [ master, "release/*" ]
|
2020-06-30 14:56:05 +00:00
|
|
|
pull_request:
|
2020-11-04 09:08:37 +00:00
|
|
|
branches: [master, "release/*"]
|
2020-06-30 14:56:05 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
conda:
|
2020-10-26 10:47:09 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
container: pytorchlightning/pytorch_lightning:base-conda-py${{ matrix.python-version }}-torch${{ matrix.pytorch-version }}
|
2020-06-30 14:56:05 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2020-10-26 10:47:09 +00:00
|
|
|
# os: [ubuntu-20.04]
|
2020-06-30 14:56:05 +00:00
|
|
|
python-version: [3.7]
|
2021-05-06 23:06:21 +00:00
|
|
|
pytorch-version: [1.4, 1.5, 1.6, 1.7, 1.8, 1.9]
|
2020-06-30 14:56:05 +00:00
|
|
|
|
|
|
|
# Timeout: https://stackoverflow.com/a/59076067/4521646
|
2020-07-31 11:52:17 +00:00
|
|
|
timeout-minutes: 35
|
2020-06-30 14:56:05 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2020-10-04 17:18:20 +00:00
|
|
|
- name: Update dependencies
|
2020-06-30 14:56:05 +00:00
|
|
|
run: |
|
2020-10-04 17:18:20 +00:00
|
|
|
conda info
|
|
|
|
conda list
|
2021-03-06 13:34:54 +00:00
|
|
|
# adjust versions according installed Torch version
|
|
|
|
python ./requirements/adjust_versions.py requirements/extra.txt
|
|
|
|
python ./requirements/adjust_versions.py requirements/examples.txt
|
2020-10-04 17:18:20 +00:00
|
|
|
pip install --requirement requirements/devel.txt --upgrade-strategy only-if-needed
|
|
|
|
pip list
|
2020-06-30 14:56:05 +00:00
|
|
|
|
2021-01-08 15:36:49 +00:00
|
|
|
- name: Pull checkpoints from S3
|
|
|
|
run: |
|
|
|
|
# enter legacy and update checkpoints from S3
|
|
|
|
cd legacy
|
|
|
|
curl https://pl-public-data.s3.amazonaws.com/legacy/checkpoints.zip --output checkpoints.zip
|
|
|
|
unzip -o checkpoints.zip
|
|
|
|
ls -l checkpoints/
|
|
|
|
|
2020-06-30 14:56:05 +00:00
|
|
|
- name: Tests
|
|
|
|
run: |
|
|
|
|
# NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003
|
2021-03-23 22:05:04 +00:00
|
|
|
coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-torch${{ matrix.pytorch-version }}.xml
|
2020-06-30 14:56:05 +00:00
|
|
|
shell: bash -l {0}
|
|
|
|
|
2021-03-11 15:45:26 +00:00
|
|
|
- name: Upload pytest results
|
2020-11-04 09:08:37 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
2020-06-30 14:56:05 +00:00
|
|
|
with:
|
|
|
|
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}
|
|
|
|
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
|
2020-12-11 23:17:19 +00:00
|
|
|
if: failure()
|
2021-03-11 15:45:26 +00:00
|
|
|
|
|
|
|
- name: Statistics
|
|
|
|
if: success()
|
|
|
|
run: |
|
|
|
|
coverage report
|
|
|
|
coverage xml
|
|
|
|
|
|
|
|
- name: Upload coverage to Codecov
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
if: always()
|
|
|
|
# see: https://github.com/actions/toolkit/issues/399
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
file: coverage.xml
|
|
|
|
flags: cpu,pytest,torch${{ matrix.pytorch-version }}
|
|
|
|
name: CPU-coverage
|
|
|
|
fail_ci_if_error: false
|