-
Notifications
You must be signed in to change notification settings - Fork 53
48 lines (39 loc) · 1.06 KB
/
pretest-and-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
name: "Pre-review Tests"
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-22.04
strategy:
matrix:
torch: ['1.10.*', '1.11.*', '1.12.*', '1.13.*', '2.0.*']
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- uses: actions/cache@v3
with:
path: |
~/.cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}-${{ matrix.torch }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install
run: |
pip install -U pip wheel
pip install -e .[test] torch==${{ matrix.torch }} --extra-index-url https://download.pytorch.org/whl/cpu
# Test PPE is importable with minimum dependency
python -c 'import pytorch_pfn_extras'
- name: Code Style
run: |
make lint
- name: Code Style (Examples)
run: |
make example_lint
- name: Test CPU only
run: |
make cputest