Skip to content

Commit 6ad36e1

Browse files
ci: upgrade CI
1 parent ae757a9 commit 6ad36e1

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

.github/workflows/CI.yml

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,32 @@ 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: false
10+
env:
11+
FC: gfortran
12+
GCC_V: 12
1013

1114
steps:
1215
- name: Checkout code
13-
uses: actions/checkout@v1
16+
uses: actions/checkout@v3
1417

15-
- name: Get Time
16-
id: time
17-
uses: nanzm/[email protected]
18+
- uses: fortran-lang/setup-fpm@v4
1819
with:
19-
format: 'YYYY-MM'
20+
github-token: ${{ secrets.GITHUB_TOKEN }}
2021

21-
- name: Setup cache for opencoarrays
22-
id: cache-opencoarrays
23-
uses: actions/cache@v2
24-
with:
25-
path: "OpenCoarrays-2.9.2/"
26-
key: ${{ steps.time.outputs.time }}
27-
28-
- name: Install GFortran, OpenCoarrays,and fpm
22+
- name: Install Dependencies Ubuntu
23+
if: contains(matrix.os, 'ubuntu')
2924
run: |
30-
sudo apt install -y gfortran-11 graphviz
31-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 \
32-
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-11 \
33-
--slave /usr/bingcov gcov /usr/bin/gcov-11
34-
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
35-
wget https://github.com/fortran-lang/fpm/releases/download/v0.1.3/fpm-0.1.3-linux-x86_64 && sudo cp fpm-0.1.3-linux-x86_64 /usr/local/bin/fpm && sudo chmod a+x /usr/local/bin/fpm
25+
sudo apt-get update
26+
sudo apt install -y gfortran-${GCC_V}
27+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
28+
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
29+
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
3630
3731
- name: Build and test
3832
run: |
39-
source OpenCoarrays-2.9.2/prerequisites/installations/opencoarrays/2.9.2/setup.sh
40-
fpm test --compiler caf --runner "cafrun -n 1"
33+
which gfortran
34+
gfortran --version
35+
fpm test

0 commit comments

Comments
 (0)