Skip to content

Commit d4df0b7

Browse files
committed
fix(CI): copy CI script from matcha repo
1 parent 2434a05 commit d4df0b7

File tree

1 file changed

+13
-21
lines changed

1 file changed

+13
-21
lines changed

.github/workflows/CI.yml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,44 @@ on: [push, pull_request]
44

55
jobs:
66
Build:
7-
runs-on: ubuntu-22.04
8-
strategy:
9-
fail-fast: true
7+
runs-on: [ubuntu-22.04]
108

119
env:
1210
FC: gfortran
1311
GCC_V: 12
1412

13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
1517
- name: Install fpm
1618
uses: fortran-lang/setup-fpm@v4
1719
with:
1820
github-token: ${{ secrets.GITHUB_TOKEN }}
1921

2022
- name: Get Time
2123
id: time
22-
uses: nanzm/get-time-action@v1.0
24+
uses: nanzm/get-time-action@v1.1
2325
with:
2426
format: 'YYYY-MM'
2527

2628
- name: Setup cache for opencoarrays
2729
id: cache-opencoarrays
28-
uses: actions/cache@v2
30+
uses: actions/cache@v3
2931
with:
3032
path: "OpenCoarrays-2.10.0/"
3133
key: ${{ steps.time.outputs.time }}
3234

3335
- name: Install GFortran, OpenCoarrays
3436
run: |
35-
sudo apt install -y gfortran-${GCC_V} graphviz
37+
sudo apt update
38+
sudo apt install -y build-essential gfortran-${GCC_V} g++-${GCC_V} pkg-config make
3639
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
37-
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
38-
--slave /usr/bingcov gcov /usr/bin/gcov-${GCC_V}
40+
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
41+
--slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_V}
3942
if [ ! -d OpenCoarrays-2.10.0 ] ; then wget -P . https://github.com/sourceryinstitute/OpenCoarrays/releases/download/2.10.0/OpenCoarrays-2.10.0.tar.gz && tar -xf OpenCoarrays-2.10.0.tar.gz && cd OpenCoarrays-2.10.0 && TERM=xterm ./install.sh -y; fi
4043
41-
steps:
42-
- name: Checkout code
43-
uses: actions/checkout@v3
44-
45-
- name: Build and Test
44+
- name: Build, run, and test
4645
run: |
47-
export PATH="${HOME}/.local/bin:$PATH"
4846
source OpenCoarrays-2.10.0/prerequisites/installations/opencoarrays/2.10.0/setup.sh
49-
fpm test \
50-
--compiler caf \
51-
--runner "cafrun -n 4" \
52-
--flag "-DCOMPILER_LACKS_COLLECTIVE_SUBROUTINES" \
53-
--flag "-DCOMPILER_LACKS_FINDLOC" \
54-
--flag "-Wall" \
55-
--flag "-std=f2018"
47+
fpm test --compiler caf --runner "cafrun -n 2"

0 commit comments

Comments
 (0)