Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ci for windows and Intel ifx (#7) #752

Merged
merged 6 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 72 additions & 21 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

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

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

intel-build:
intel-build-llvm:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest]
fc: [ifx]
cc: [icx]
cxx: [icpx]
env:
FC: ${{ matrix.fc }}
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: 3.x

- name: Add Intel repository (Linux)
if: contains(matrix.os, 'ubuntu')
run: |
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
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
sudo apt-get update

- name: Install Intel oneAPI compiler (Linux)
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get install intel-oneapi-compiler-fortran
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp

- name: Setup Intel oneAPI environment
run: |
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV

- name: Install fypp
run: pip install --upgrade fypp

- name: Configure with CMake
run: >-
cmake -Wdev
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_MAXIMUM_RANK:String=4
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
-S . -B build

- name: Build and compile
run: cmake --build build

- name: catch build fail
run: cmake --build build --verbose --parallel 1
if: failure()

- name: test
run: ctest --parallel --output-on-failure --no-tests=error
working-directory: build

- name: Install project
run: cmake --install build

intel-build-classic:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
fc: [ifort]
cc: [icc]
cxx: [icpc]
Expand All @@ -111,10 +177,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python 3.x
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.x

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

- name: Add Intel repository (Linux)
if: contains(matrix.os, 'ubuntu')
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update

- name: Install Intel oneAPI compiler (Linux)
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get install intel-oneapi-compiler-fortran
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic

- name: Install Intel oneAPI compiler (OSX)
if: contains(matrix.os, 'macos') && steps.cache-install.outputs.cache-hit != 'true'
run: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
update: false
install: >-
git
gcc
gcc-fortran
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gcc-fortran
python
python-pip
cmake
Expand All @@ -58,7 +58,7 @@ jobs:
run: pip install fypp

- run: >-
cmake
PATH=$PATH:/mingw64/bin/ cmake
-Wdev
-B build
-DCMAKE_BUILD_TYPE=Debug
Expand All @@ -71,14 +71,14 @@ jobs:
CXX: g++

- name: CMake build
run: cmake --build build --parallel
run: PATH=$PATH:/mingw64/bin/ cmake --build build --parallel

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

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

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

- name: Install project
run: cmake --install build
run: PATH=$PATH:/mingw64/bin/ cmake --install build
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ Name | Version | Platform | Architecture
--- | --- | --- | ---
GCC Fortran | 10, 11, 12, 13 | Ubuntu 22.04.2 LTS | x86_64
GCC Fortran | 10, 11, 12, 13 | macOS 12.6.3 (21G419) | x86_64
GCC Fortran (MSYS) | 10 | Windows Server 2022 (10.0.20348 Build 1547) | x86_64
GCC Fortran (MinGW) | 10 | Windows Server 2022 (10.0.20348 Build 1547) | x86_64, i686
Intel oneAPI classic | 2021.1 | Ubuntu 22.04.2 LTS | x86_64
GCC Fortran (MSYS) | 13 | Windows Server 2022 (10.0.20348 Build 1547) | x86_64
GCC Fortran (MinGW) | 13 | Windows Server 2022 (10.0.20348 Build 1547) | x86_64, i686
Intel oneAPI LLVM | 2024.0 | Ubuntu 22.04.2 LTS | x86_64
Intel oneAPI classic | 2021.1 | macOS 12.6.3 (21G419) | x86_64

The following combinations are known to work, but they are not tested in the CI:
Expand Down
2 changes: 1 addition & 1 deletion test/stats/test_rawmoment.f90
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ subroutine test_sp(error)
call check(error, all( abs( moment(x3, order, dim = 1, center = zero3_1) -&
mean(x3**2, 1)) < sptol))
call check(error, all( abs( moment(x3, order, dim = 2, center = zero3_2) -&
mean(x3**2, 2)) < sptol))
mean(x3**2, 2)) < 1.5_sp*sptol))
call check(error, all( abs( moment(x3, order, dim = 3, center = zero3_3) -&
mean(x3**2, 3)) < sptol))

Expand Down
Loading