-
Notifications
You must be signed in to change notification settings - Fork 57
86 lines (73 loc) · 2.4 KB
/
test_macos.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Tests MacOS
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
python-version: [ '3.6','3.7','3.8' ]
platform: [macOS-10.15]
runs-on: ${{ matrix.platform }}
name: Python ${{ matrix.python-version }} - ${{ matrix.platform }}
steps:
# Caching Linux
- uses: actions/cache@v2
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# Caching MacOS
- uses: actions/cache@v2
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# Caching Windows
- uses: actions/cache@v2
if: startsWith(runner.os, 'Windows')
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# Setup
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: goanpeca/setup-miniconda@v1
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: test
- name: Update conda env dependencies
shell: bash -l {0}
run: |
conda config --set ssl_verify no
conda install pytorch==1.4.0 torchvision==0.5.0 cpuonly -c pytorch
pip install -f https://github.com/Kojoley/atari-py/releases atari_py
conda env update environment.yml
# Install Dependencies
- name: Install Windows dependencies
shell: pwsh
if: startsWith(runner.os, 'Windows')
run: |
./.scripts/windows_cpu_build.ps1
- name: Install Linux Dependencies
shell: bash -l {0}
if: startsWith(runner.os, 'macOS') || startsWith(runner.os, 'Linux')
run: |
./.scripts/unix_cpu_build.sh
- name: Tests
shell: bash -l {0}
run: |
conda activate test
pytest --durations=0