-
Notifications
You must be signed in to change notification settings - Fork 22
53 lines (43 loc) · 1.63 KB
/
testing.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
name: Testing
on: [push, pull_request]
jobs:
pytest:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
torch-version: [2.0.0, 2.1.0]
steps:
- name: Checkout with submodules
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Free up disk space
if: ${{ runner.os == 'Linux' }}
run: |
sudo rm -rf /usr/share/dotnet
- name: Setup venv
run: |
python -m venv flk-env
source flk-env/bin/activate
- name: Install setup dependencies (PyTorch ${{ matrix.torch-version }}+cpu)
run: |
source flk-env/bin/activate
echo "Python is located at $(which python)"
pip install --upgrade pip setuptools wheel ninja
pip install numpy
pip install torch==${{ matrix.torch-version }} --extra-index-url https://download.pytorch.org/whl/cpu
python -c "import torch; print('PyTorch:', torch.__version__)"
python -c "import torch; print('CUDA:', torch.version.cuda)"
python -c "import torch; print('CUDA Available:', torch.cuda.is_available())"
- name: Install main package
run: |
source flk-env/bin/activate
pip install --no-build-isolation --editable .[test]
- name: Run test-suite
run: |
source flk-env/bin/activate
pytest --cov-report=term-missing --cov-report=xml:coverage.xml --cov=falkon --cov-config pyproject.toml