Skip to content

Commit 77c10e1

Browse files
authored
Merge pull request #752 from jvdp1/fix_ci_windows_ifx
Fix ci for windows and Intel ifx (#7)
2 parents b8fbb3c + f180af1 commit 77c10e1

File tree

4 files changed

+83
-32
lines changed

4 files changed

+83
-32
lines changed

.github/workflows/CI.yml

+72-21
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ jobs:
3535

3636
steps:
3737
- name: Checkout code
38-
uses: actions/checkout@v2
38+
uses: actions/checkout@v4
3939

4040
- name: Set up Python 3.x
41-
uses: actions/setup-python@v1 # Use pip to install latest CMake, & FORD/Jin2For, etc.
41+
uses: actions/setup-python@v5 # Use pip to install latest CMake, & FORD/Jin2For, etc.
4242
with:
4343
python-version: 3.x
4444

@@ -92,12 +92,78 @@ jobs:
9292
if: ${{ contains(matrix.build, 'cmake') }}
9393
run: cmake --install ${{ env.BUILD_DIR }}
9494

95-
intel-build:
95+
intel-build-llvm:
9696
runs-on: ${{ matrix.os }}
9797
strategy:
9898
fail-fast: false
9999
matrix:
100-
os: [ubuntu-latest, macos-latest]
100+
os: [ubuntu-latest]
101+
fc: [ifx]
102+
cc: [icx]
103+
cxx: [icpx]
104+
env:
105+
FC: ${{ matrix.fc }}
106+
CC: ${{ matrix.cc }}
107+
CXX: ${{ matrix.cxx }}
108+
109+
steps:
110+
- name: Checkout code
111+
uses: actions/checkout@v4
112+
113+
- name: Set up Python 3.x
114+
uses: actions/setup-python@v5
115+
with:
116+
python-version: 3.x
117+
118+
- name: Add Intel repository (Linux)
119+
if: contains(matrix.os, 'ubuntu')
120+
run: |
121+
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
122+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
123+
sudo apt-get update
124+
125+
- name: Install Intel oneAPI compiler (Linux)
126+
if: contains(matrix.os, 'ubuntu')
127+
run: |
128+
sudo apt-get install intel-oneapi-compiler-fortran
129+
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
130+
131+
- name: Setup Intel oneAPI environment
132+
run: |
133+
source /opt/intel/oneapi/setvars.sh
134+
printenv >> $GITHUB_ENV
135+
136+
- name: Install fypp
137+
run: pip install --upgrade fypp
138+
139+
- name: Configure with CMake
140+
run: >-
141+
cmake -Wdev
142+
-DCMAKE_BUILD_TYPE=Release
143+
-DCMAKE_MAXIMUM_RANK:String=4
144+
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
145+
-S . -B build
146+
147+
- name: Build and compile
148+
run: cmake --build build
149+
150+
- name: catch build fail
151+
run: cmake --build build --verbose --parallel 1
152+
if: failure()
153+
154+
- name: test
155+
run: ctest --parallel --output-on-failure --no-tests=error
156+
working-directory: build
157+
158+
- name: Install project
159+
run: cmake --install build
160+
161+
intel-build-classic:
162+
runs-on: ${{ matrix.os }}
163+
strategy:
164+
fail-fast: false
165+
matrix:
166+
os: [macos-latest]
101167
fc: [ifort]
102168
cc: [icc]
103169
cxx: [icpc]
@@ -111,10 +177,10 @@ jobs:
111177

112178
steps:
113179
- name: Checkout code
114-
uses: actions/checkout@v2
180+
uses: actions/checkout@v4
115181

116182
- name: Set up Python 3.x
117-
uses: actions/setup-python@v1
183+
uses: actions/setup-python@v5
118184
with:
119185
python-version: 3.x
120186

@@ -132,21 +198,6 @@ jobs:
132198
path: /opt/intel/oneapi
133199
key: install-${{ env.MACOS_HPCKIT_URL }}-${{ env.MACOS_FORTRAN_COMPONENTS }}
134200

135-
- name: Add Intel repository (Linux)
136-
if: contains(matrix.os, 'ubuntu')
137-
run: |
138-
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
139-
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
140-
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
141-
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
142-
sudo apt-get update
143-
144-
- name: Install Intel oneAPI compiler (Linux)
145-
if: contains(matrix.os, 'ubuntu')
146-
run: |
147-
sudo apt-get install intel-oneapi-compiler-fortran
148-
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
149-
150201
- name: Install Intel oneAPI compiler (OSX)
151202
if: contains(matrix.os, 'macos') && steps.cache-install.outputs.cache-hit != 'true'
152203
run: |

.github/workflows/ci_windows.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
update: false
4848
install: >-
4949
git
50-
gcc
51-
gcc-fortran
50+
mingw-w64-x86_64-gcc
51+
mingw-w64-x86_64-gcc-fortran
5252
python
5353
python-pip
5454
cmake
@@ -58,7 +58,7 @@ jobs:
5858
run: pip install fypp
5959

6060
- run: >-
61-
cmake
61+
PATH=$PATH:/mingw64/bin/ cmake
6262
-Wdev
6363
-B build
6464
-DCMAKE_BUILD_TYPE=Debug
@@ -71,14 +71,14 @@ jobs:
7171
CXX: g++
7272
7373
- name: CMake build
74-
run: cmake --build build --parallel
74+
run: PATH=$PATH:/mingw64/bin/ cmake --build build --parallel
7575

7676
- name: catch build fail
77-
run: cmake --build build --verbose --parallel 1
77+
run: PATH=$PATH:/mingw64/bin/ cmake --build build --verbose --parallel 1
7878
if: failure()
7979

8080
- name: CTest
81-
run: ctest --test-dir build --output-on-failure --parallel -V -LE quadruple_precision
81+
run: PATH=$PATH:/mingw64/bin/ ctest --test-dir build --output-on-failure --parallel -V -LE quadruple_precision
8282

8383
- uses: actions/upload-artifact@v1
8484
if: failure()
@@ -87,4 +87,4 @@ jobs:
8787
path: build/Testing/Temporary/LastTest.log
8888

8989
- name: Install project
90-
run: cmake --install build
90+
run: PATH=$PATH:/mingw64/bin/ cmake --install build

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ Name | Version | Platform | Architecture
8989
--- | --- | --- | ---
9090
GCC Fortran | 10, 11, 12, 13 | Ubuntu 22.04.2 LTS | x86_64
9191
GCC Fortran | 10, 11, 12, 13 | macOS 12.6.3 (21G419) | x86_64
92-
GCC Fortran (MSYS) | 10 | Windows Server 2022 (10.0.20348 Build 1547) | x86_64
93-
GCC Fortran (MinGW) | 10 | Windows Server 2022 (10.0.20348 Build 1547) | x86_64, i686
94-
Intel oneAPI classic | 2021.1 | Ubuntu 22.04.2 LTS | x86_64
92+
GCC Fortran (MSYS) | 13 | Windows Server 2022 (10.0.20348 Build 1547) | x86_64
93+
GCC Fortran (MinGW) | 13 | Windows Server 2022 (10.0.20348 Build 1547) | x86_64, i686
94+
Intel oneAPI LLVM | 2024.0 | Ubuntu 22.04.2 LTS | x86_64
9595
Intel oneAPI classic | 2021.1 | macOS 12.6.3 (21G419) | x86_64
9696

9797
The following combinations are known to work, but they are not tested in the CI:

test/stats/test_rawmoment.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ subroutine test_sp(error)
232232
call check(error, all( abs( moment(x3, order, dim = 1, center = zero3_1) -&
233233
mean(x3**2, 1)) < sptol))
234234
call check(error, all( abs( moment(x3, order, dim = 2, center = zero3_2) -&
235-
mean(x3**2, 2)) < sptol))
235+
mean(x3**2, 2)) < 1.5_sp*sptol))
236236
call check(error, all( abs( moment(x3, order, dim = 3, center = zero3_3) -&
237237
mean(x3**2, 3)) < sptol))
238238

0 commit comments

Comments
 (0)