10
10
BUILD_TYPE : Release
11
11
12
12
jobs :
13
- build :
13
+ test :
14
14
runs-on : ${{ matrix.os }}
15
15
strategy :
16
16
fail-fast : false
17
17
matrix :
18
- fortran_compiler : [gfortran, ifort]
19
- os : [ubuntu-latest, macos-latest] # issue with windows-latest & CMake with CMake not recognizing defined compilers
18
+ os : [ubuntu-latest, macos-latest]
19
+ toolchain :
20
+ - {compiler: gcc, version: 11}
21
+ - {compiler: intel-classic, version: '2021.9'}
22
+ include :
23
+ - os : ubuntu-latest
24
+ toolchain : {compiler: intel, version: '2023.2'}
20
25
21
26
steps :
22
-
23
- - name : Setup IFORT
24
- if : contains( matrix.fortran_compiler, 'ifort' )
25
- uses : modflowpy/install-intelfortran-action@v1
26
-
27
- - name : Setup GFORTRAN
28
- if : contains( matrix.fortran_compiler, 'gfortran')
29
- uses : awvwgk/setup-fortran@main
30
- id : setup-fortran
31
- with :
32
- compiler : gcc
33
- version : 12
34
-
35
- env :
36
- FC : ${{ steps.setup-fortran.outputs.fc }}
37
- CC : ${{ steps.setup-fortran.outputs.cc }}
38
-
39
- - uses : actions/checkout@v3
40
-
41
- - name : Configure CMake
42
- run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=${{ env.CC }} -DCMAKE_Fortran_COMPILER=${{ env.FC }} -DBUILD_TESTING=TRUE
27
+ - uses : awvwgk/setup-fortran@v1
28
+ id : setup-fortran
29
+ with :
30
+ compiler : ${{ matrix.toolchain.compiler }}
31
+ version : ${{ matrix.toolchain.version }}
32
+
33
+ - run : ${{ env.FC }} --version
34
+ env :
35
+ FC : ${{ steps.setup-fortran.outputs.fc }}
36
+ CC : ${{ steps.setup-fortran.outputs.cc }}
37
+
38
+ - uses : actions/checkout@v3
43
39
44
- - name : Build with CMake
45
- run : cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
40
+ - name : Configure CMake
41
+ run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_Fortran_COMPILER=${{ env.FC }} -DBUILD_TESTING=TRUE
42
+
43
+ - name : Build with CMake
44
+ run : cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
46
45
47
- - name : Test with CMake
48
- working-directory : ${{github.workspace}}/build
49
- run : ctest -C ${{env.BUILD_TYPE}}
46
+ - name : Test with CMake
47
+ working-directory : ${{github.workspace}}/build
48
+ run : ctest -C ${{env.BUILD_TYPE}}
0 commit comments