-
Notifications
You must be signed in to change notification settings - Fork 7
46 lines (43 loc) · 1.48 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
main:
name: ${{ matrix.os }} ${{ matrix.build-type }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest']
build-type: ['Debug', 'Release']
steps:
- uses: actions/checkout@v2
- name: Set up repository
# Clone all history leading to the tip of a single branch
# See https://stackoverflow.com/a/44036486.
run: |
git remote set-branches --add origin master
git fetch origin master
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Build and test
run: |
if [ ${{ matrix.os }} = 'macos-latest' ]; then export FC=gfortran-10; fi
python -u tests/test.py --build_type=${{ matrix.build-type}} --case=integration
- name: Build docs
if: matrix.os == 'ubuntu-latest' && matrix.build-type == 'Release'
run: |
python -m pip install graphviz ford
ford docs/api-docs.md
- name: Publish docs
if: matrix.os == 'ubuntu-latest' && matrix.build-type == 'Release' && github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/docs
force_orphan: true