-
Notifications
You must be signed in to change notification settings - Fork 18
59 lines (47 loc) · 1.52 KB
/
build-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
name: Test
on: [push, pull_request, workflow_dispatch]
jobs:
build:
name: ${{ matrix.name }}-py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: [ubuntu, macos]
python-version: ["3.8", "3.9", "3.10"]
include:
- name: ubuntu
os: ubuntu-22.04
- name: macos
os: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install GCC (MacOS)
if: matrix.name == 'macos'
run: |
brew install gcc@12
echo "CC=gcc-12" >> $GITHUB_ENV
echo "FC=gfortran-12" >> $GITHUB_ENV
- name: Install
run: |
python -m pip install --upgrade pip wheel
TARGET=HASWELL python -m pip install -v .[docs,tests]
python -m pip list
- name: Lint with flake8
if: matrix.name == 'ubuntu' && matrix.python-version == '3.9'
continue-on-error: true
run: |
python -m pip install flake8
flake8 . --statistics || echo "::error::Check flake8 output for errors"
- name: Test
run: |
python -m pip install pytest
python -m pytest --pyargs konrad
- name: Build docs
continue-on-error: true
run: |
cd docs && make html || echo "::error::Documentation build errored."