-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (38 loc) · 1.43 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
name: CI
on: [push, pull_request]
jobs:
Build:
runs-on: [ubuntu-22.04]
env:
FC: gfortran
GCC_V: 13
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install fpm
uses: fortran-lang/setup-fpm@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Get Time
id: time
uses: nanzm/[email protected]
with:
format: 'YYYY-MM'
- name: Setup cache for opencoarrays
id: cache-opencoarrays
uses: actions/cache@v3
with:
path: "OpenCoarrays-2.10.1/"
key: ${{ steps.time.outputs.time }}
- name: Install GFortran, OpenCoarrays
run: |
sudo apt update
sudo apt install -y build-essential gfortran-${GCC_V} g++-${GCC_V} pkg-config make
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
--slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_V}
if [ ! -d OpenCoarrays-2.10.1 ] ; then wget -P . https://github.com/sourceryinstitute/OpenCoarrays/releases/download/2.10.1/OpenCoarrays-2.10.1.tar.gz && tar -xf OpenCoarrays-2.10.1.tar.gz && cd OpenCoarrays-2.10.1 && TERM=xterm ./install.sh -y; fi
- name: Build, run, and test
run: |
source OpenCoarrays-2.10.1/prerequisites/installations/opencoarrays/2.10.1/setup.sh
fpm test --compiler caf --runner "cafrun -n 2"