-
Notifications
You must be signed in to change notification settings - Fork 117
70 lines (68 loc) · 2.71 KB
/
full-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Full tests
on:
schedule:
- cron: '00 19 * * *'
jobs:
unit-test:
name: Full tests for ${{ matrix.os }}, PyTorch ${{ matrix.vers.pt_ver }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
vers: [ {pt_ver: "1.6.0", tv_ver: "0.7.0"}, {pt_ver: "1.7.0", tv_ver: "0.8.1"}, {pt_ver: "1.8.0", tv_ver: "0.9.0"}, {pt_ver: "1.9.0", tv_ver: "0.10.0"}, {pt_ver: "1.10.0", tv_ver: "0.11.1"}, {pt_ver: "1.11.0", tv_ver: "0.12.0"}, {pt_ver: "1.12.0", tv_ver: "0.13.0"} ]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Configure pagefile
if: runner.os == 'Windows'
uses: al-cheb/[email protected]
with:
minimum-size: 8GB
- name: Set up swap space
if: runner.os == 'Linux'
uses: pierotofy/[email protected]
with:
swap-size-gb: 8
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.8
- name: Install PyTorch
env:
PYTORCH_VER: ${{ matrix.vers.pt_ver }}
TORCHVISION_VER: ${{ matrix.vers.tv_ver }}
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
if [[ "$TORCHVISION_VER" == "latest" && "$PYTORCH_VER" == "latest" ]]; then
conda install pytorch torchvision -c pytorch
elif [[ "$TORCHVISION_VER" == "0.9."* || "$TORCHVISION_VER" == "0.10."* ]]; then
conda install pytorch=$PYTORCH_VER torchvision=$TORCHVISION_VER pillow=6 -c pytorch
else
conda install pytorch=$PYTORCH_VER torchvision=$TORCHVISION_VER -c pytorch
fi
elif [ "$RUNNER_OS" == "Windows" ]; then
if [[ "$TORCHVISION_VER" == "latest" && "$PYTORCH_VER" == "latest" ]]; then
conda install pytorch torchvision cpuonly pillow=6 -c pytorch
else
conda install pytorch=$PYTORCH_VER torchvision=$TORCHVISION_VER cpuonly pillow=6 -c pytorch
fi
else
if [[ "$TORCHVISION_VER" == "latest" && "$PYTORCH_VER" == "latest" ]]; then
conda install pytorch torchvision cpuonly -c pytorch
else
conda install pytorch=$PYTORCH_VER torchvision=$TORCHVISION_VER cpuonly -c pytorch
fi
fi
- name: Install TinyNeuralNetwork
run: python setup.py install
- name: Install test dependencies
run: pip install ruff tensorflow pytest interval scipy
- name: Lint checks
run: python -m ruff .
- name: Run tests
run: |
source activate.sh
pytest tests -v