-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (53 loc) · 2.09 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI
on: [push, pull_request]
jobs:
Build:
runs-on: ubuntu-latest
env:
FC: gfortran
GCC_V: 10
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Checkout git submodules
run: |
git submodule update --init
- name: Get Time
id: time
uses: nanzm/[email protected]
with:
format: 'YYYY-MM'
- name: Setup cache for opencoarrays
id: cache
uses: actions/cache@v2
with:
path: "OpenCoarrays-2.9.2/"
key: ${{ steps.time.outputs.time }}
- name: Install gfortran, OpenCoarrays, and fpm
run: |
sudo apt install -y gfortran-${GCC_V} wget python-dev python build-essential graphviz
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} 100
if [ ! -d OpenCoarrays-2.9.2 ] ; then wget -P . https://github.com/sourceryinstitute/OpenCoarrays/releases/download/2.9.2/OpenCoarrays-2.9.2.tar.gz && tar -xf OpenCoarrays-2.9.2.tar.gz && cd OpenCoarrays-2.9.2 && TERM=xterm ./install.sh -y; fi
wget -P . "https://bootstrap.pypa.io/get-pip.py" && sudo python get-pip.py && rm get-pip.py
sudo pip install ford
wget https://github.com/fortran-lang/fpm/releases/download/v0.2.0/fpm-0.2.0-linux-x86_64 && sudo cp fpm-0.2.0-linux-x86_64 /usr/local/bin/fpm && sudo chmod a+x /usr/local/bin/fpm
- name: Build
run: |
source OpenCoarrays-2.9.2/prerequisites/installations/opencoarrays/2.9.2/setup.sh
fpm build --compiler caf
- name: Run tests
run: |
source OpenCoarrays-2.9.2/prerequisites/installations/opencoarrays/2.9.2/setup.sh
fpm test --compiler caf --runner "cafrun -n 2" --target "*"
- name: miniFAVOR Documenation
run: |
cd doc
ford miniFAVOR-FORD-file.md
- name: Deploy documentation to gh-pages branch
if: ${{ github.ref == 'refs/heads/main' }}
uses: JamesIves/[email protected]
with:
BRANCH: gh-pages
FOLDER: doc/html
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLEAN: true