Skip to content

Commit f3cd41a

Browse files
Updating CMake CI (#41)
1 parent 0e634c6 commit f3cd41a

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

.github/workflows/cmake.yml

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,39 @@ env:
1010
BUILD_TYPE: Release
1111

1212
jobs:
13-
build:
13+
test:
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
fail-fast: false
1717
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'}
2025

2126
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
4339

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}}
4645

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}}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ A package of Fortran subprograms for the fast Fourier transform of periodic and
66

77
[![Actions Status](https://github.com/fortran-lang/fftpack/workflows/fpm/badge.svg)](https://github.com/fortran-lang/fftpack/actions)
88
[![Actions Status](https://github.com/fortran-lang/fftpack/workflows/doc-deployment/badge.svg)](https://github.com/fortran-lang/fftpack/actions)
9+
[![CMake](https://github.com/fortran-lang/fftpack/actions/workflows/cmake.yml/badge.svg?branch=main)](https://github.com/fortran-lang/fftpack/actions/workflows/cmake.yml)
910

1011
## Getting started
1112
### Get the code

0 commit comments

Comments
 (0)