Skip to content

Commit c23a1c6

Browse files
authored
Merge pull request #260 from awvwgk/intel-ci
Add CI testing with Intel Fortran compiler
2 parents 528dc73 + fd60ef0 commit c23a1c6

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

.github/workflows/CI.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,59 @@ jobs:
8585
make -f Makefile.manual FYPPFLAGS="-DMAXRANK=4"
8686
make -f Makefile.manual test
8787
make -f Makefile.manual clean
88+
89+
intel-build:
90+
runs-on: ${{ matrix.os }}
91+
strategy:
92+
fail-fast: false
93+
matrix:
94+
os: [ubuntu-20.04]
95+
fc: [ifort]
96+
env:
97+
FC: ${{ matrix.fc }}
98+
99+
steps:
100+
- name: Checkout code
101+
uses: actions/checkout@v1
102+
103+
- name: Set up Python 3.x
104+
uses: actions/setup-python@v1
105+
with:
106+
python-version: 3.x
107+
108+
- name: Install CMake Linux
109+
if: contains(matrix.os, 'ubuntu')
110+
run: ci/install_cmake.sh
111+
112+
- name: Add Intel repository
113+
if: contains(matrix.os, 'ubuntu')
114+
run: |
115+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
116+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
117+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
118+
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
119+
sudo apt-get update
120+
121+
- name: Install Intel oneAPI compiler
122+
if: contains(matrix.os, 'ubuntu')
123+
run: |
124+
sudo apt-get install intel-oneapi-ifort
125+
source /opt/intel/oneapi/setvars.sh
126+
printenv >> $GITHUB_ENV
127+
128+
- name: Install fypp
129+
run: pip install --upgrade fypp
130+
131+
- name: Configure with CMake
132+
run: cmake -Wdev -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAXIMUM_RANK=4 -S . -B build
133+
134+
- name: Build and compile
135+
run: cmake --build build
136+
137+
- name: catch build fail
138+
run: cmake --build build --verbose --parallel 1
139+
if: failure()
140+
141+
- name: test
142+
run: ctest --parallel --output-on-failure
143+
working-directory: build

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
2222
endif()
2323
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
2424
add_compile_options(-warn declarations,general,usage,interfaces,unused)
25-
add_compile_options(-standard-semantics)
25+
if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_EQUAL 20.2.1.20200827)
26+
add_compile_options(-standard-semantics)
27+
endif()
2628
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0)
2729
add_compile_options(-stand f15)
2830
else()

0 commit comments

Comments
 (0)