Skip to content

Commit 6760fa2

Browse files
authored
Fix ci for windows and Intel ifx (#7)
Changes: * Windows: GCC 13 * Ubuntu-latest: Intel LLVM (instead of Classic) * Relax test in test_rawmoment due to change from Intel Classic to Intel LLVM
1 parent b8fbb3c commit 6760fa2

File tree

4 files changed

+93
-27
lines changed

4 files changed

+93
-27
lines changed

.github/workflows/CI.yml

+82-16
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,88 @@ jobs:
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@v2
112+
113+
- name: Set up Python 3.x
114+
uses: actions/setup-python@v1
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: Install Intel oneAPI compiler (OSX)
132+
if: contains(matrix.os, 'macos') && steps.cache-install.outputs.cache-hit != 'true'
133+
run: |
134+
curl --output webimage.dmg --url "$URL" --retry 5 --retry-delay 5
135+
hdiutil attach webimage.dmg
136+
if [ -z "$COMPONENTS" ]; then
137+
sudo /Volumes/"$(basename "$URL" .dmg)"/bootstrapper.app/Contents/MacOS/bootstrapper -s --action install --eula=accept --continue-with-optional-error=yes --log-dir=.
138+
installer_exit_code=$?
139+
else
140+
sudo /Volumes/"$(basename "$URL" .dmg)"/bootstrapper.app/Contents/MacOS/bootstrapper -s --action install --components="$COMPONENTS" --eula=accept --continue-with-optional-error=yes --log-dir=.
141+
installer_exit_code=$?
142+
fi
143+
hdiutil detach /Volumes/"$(basename "$URL" .dmg)" -quiet
144+
exit $installer_exit_code
145+
146+
- name: Setup Intel oneAPI environment
147+
run: |
148+
source /opt/intel/oneapi/setvars.sh
149+
printenv >> $GITHUB_ENV
150+
151+
- name: Install fypp
152+
run: pip install --upgrade fypp
153+
154+
- name: Configure with CMake
155+
run: >-
156+
cmake -Wdev
157+
-DCMAKE_BUILD_TYPE=Release
158+
-DCMAKE_MAXIMUM_RANK:String=4
159+
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
160+
-S . -B build
161+
162+
- name: Build and compile
163+
run: cmake --build build
164+
165+
- name: catch build fail
166+
run: cmake --build build --verbose --parallel 1
167+
if: failure()
168+
169+
- name: test
170+
run: ctest --parallel --output-on-failure --no-tests=error
171+
working-directory: build
172+
173+
- name: Install project
174+
run: cmake --install build
175+
176+
intel-build-osx:
177+
runs-on: ${{ matrix.os }}
178+
strategy:
179+
fail-fast: false
180+
matrix:
181+
os: [macos-latest]
101182
fc: [ifort]
102183
cc: [icc]
103184
cxx: [icpc]
@@ -132,21 +213,6 @@ jobs:
132213
path: /opt/intel/oneapi
133214
key: install-${{ env.MACOS_HPCKIT_URL }}-${{ env.MACOS_FORTRAN_COMPONENTS }}
134215

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-
150216
- name: Install Intel oneAPI compiler (OSX)
151217
if: contains(matrix.os, 'macos') && steps.cache-install.outputs.cache-hit != 'true'
152218
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)