Skip to content

Commit 3cb7533

Browse files
committed
fix(CI): update prereq versions
1 parent ae075f3 commit 3cb7533

File tree

1 file changed

+30
-17
lines changed

1 file changed

+30
-17
lines changed

.github/workflows/CI.yml

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,48 @@ on: [push, pull_request]
44

55
jobs:
66
Build:
7-
runs-on: ubuntu-latest
7+
runs-on: ubuntu-22.04
88
strategy:
99
fail-fast: true
1010

1111
env:
1212
FC: gfortran
13-
GCC_V: 10
13+
GCC_V: 12
1414

15-
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v2
15+
- name: Install fpm
16+
uses: fortran-lang/setup-fpm@v4
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- name: Get Time
21+
id: time
22+
uses: nanzm/[email protected]
23+
with:
24+
format: 'YYYY-MM'
25+
26+
- name: Setup cache for opencoarrays
27+
id: cache-opencoarrays
28+
uses: actions/cache@v2
29+
with:
30+
path: "OpenCoarrays-2.10.0/"
31+
key: ${{ steps.time.outputs.time }}
1832

19-
- name: Install Dependencies
33+
- name: Install GFortran, OpenCoarrays
2034
run: |
21-
sudo apt install -y gfortran-${GCC_V} cmake mpich
22-
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} 100
23-
git clone https://github.com/sourceryinstitute/opencoarrays
24-
mkdir -p opencoarrays/build
25-
cd opencoarrays/build
26-
cmake ..
27-
sudo make -j $(nproc) install
28-
cd -
29-
git clone https://github.com/fortran-lang/fpm
30-
cd fpm
31-
./install.sh
35+
sudo apt install -y gfortran-${GCC_V} graphviz
36+
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}
39+
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
40+
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@v3
3244

3345
- name: Build and Test
3446
run: |
3547
export PATH="${HOME}/.local/bin:$PATH"
48+
source OpenCoarrays-2.10.0/prerequisites/installations/opencoarrays/2.10.0/setup.sh
3649
fpm test \
3750
--compiler caf \
3851
--runner "cafrun -n 4" \

0 commit comments

Comments
 (0)