@@ -17,18 +17,56 @@ jobs:
17
17
# This workflow contains a single job called "test-suite"
18
18
test-suite :
19
19
# The type of runner that the job will run on
20
- runs-on : ubuntu-latest
20
+ runs-on : ${{ matrix.os }}
21
21
strategy :
22
22
fail-fast : false
23
23
matrix :
24
+ os :
25
+ - ubuntu-latest
26
+ # - macos-latest
27
+ # - windows-latest
28
+ toolchain :
29
+ - {compiler: gcc, version: 13}
30
+ - {compiler: gcc, version: 12}
31
+ - {compiler: gcc, version: 11}
32
+ - {compiler: gcc, version: 10}
33
+ - {compiler: gcc, version: 9}
34
+ - {compiler: intel, version: '2024.1'}
35
+ - {compiler: intel-classic, version: '2021.10'}
36
+ # - {compiler: nvidia-hpc, version: '23.11'}
24
37
std : ["f2008", "f2018"]
38
+ include :
39
+ # Run 2018 Fortran standards on latest gcc only
40
+ - toolchain : {compiler: gcc, version: 13}
41
+ std : " f2018"
42
+ # Oldest possible gcc and standard on macos
43
+ - os : macos-latest
44
+ toolchain : {compiler: gcc, version: 11}
45
+ std : " f2008"
46
+ # Newest possible intel-classic and standard on macos
47
+ - os : macos-latest
48
+ toolchain : {compiler: intel-classic, version: '2021.10'}
49
+ std : " f2018"
50
+ # exclude:
51
+ # - os: windows-latest
52
+ # toolchain: {compiler: nvidia-hpc, version: '23.11'}
25
53
26
54
# Steps represent a sequence of tasks that will be executed as part of the job
27
55
steps :
28
56
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29
57
- name : Checkout code
30
58
uses : actions/checkout@v4
31
59
60
+ - name : setup-fortran
61
+ uses : fortran-lang/setup-fortran@v1
62
+ with :
63
+ compiler : ${{ matrix.toolchain.compiler }}
64
+ version : ${{ matrix.toolchain.version }}
65
+
66
+ - name : check-compilers-env
67
+ run : |
68
+ ${{ steps.setup-fortran.outputs.fc }}
69
+
32
70
- name : Install Python
33
71
uses : actions/setup-python@v5
34
72
with :
49
87
export BUILD_DIR=$(pwd)/src/build
50
88
mkdir ${BUILD_DIR}
51
89
cd ${BUILD_DIR}
52
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${BUILD_DIR} -DCMAKE_BUILD_TESTS=TRUE -DCMAKE_Fortran_FLAGS="-std=${{ matrix.std }}"
90
+ cmake .. -DCMAKE_BUILD_TYPE=Release \
91
+ -DCMAKE_Fortran_COMPILER=${{ env.FC }} \
92
+ -DCMAKE_C_COMPILER=${{ env.CC }} \
93
+ -DCMAKE_CXX_COMPILER=${{ env.CXX }} \
94
+ -DCMAKE_INSTALL_PREFIX=${BUILD_DIR}\
95
+ -DCMAKE_BUILD_TESTS=TRUE \
96
+ -DCMAKE_Fortran_FLAGS="-std=${{ matrix.std }}"
53
97
cmake --build .
54
98
cmake --install .
55
99
0 commit comments