-
Notifications
You must be signed in to change notification settings - Fork 108
61 lines (50 loc) · 1.37 KB
/
python-ci.yaml
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
name: Python tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
DEX_CI: 1
concurrency:
group: python-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
include:
- os: ubuntu-20.04
install_deps: sudo apt-get install llvm-12-tools llvm-12-dev pkg-config wget gzip
path_extension: /usr/lib/llvm-12/bin
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install system dependencies
run: |
pip install pytest jax jaxlib
${{ matrix.install_deps }}
echo "${{ matrix.path_extension }}" >> $GITHUB_PATH
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.stack
~/.cache/pip
$GITHUB_WORKSPACE/.stack-work
key: ${{ runner.os }}-v2-python-${{ hashFiles('**/*.cabal', 'stack*.yaml') }}
restore-keys: |
${{ runner.os }}-v2-python-
${{ runner.os }}-v2-
- name: Build
run: make build-ffis
- name: Install Python bindings
run: pip install -e $GITHUB_WORKSPACE/python
- name: Run tests
run: pytest python/tests