Skip to content

Commit 329ffac

Browse files
committed
ci:windows enable
1 parent 1c3c23b commit 329ffac

File tree

4 files changed

+140
-84
lines changed

4 files changed

+140
-84
lines changed

.github/workflows/cmake.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ on:
1313
jobs:
1414

1515
linux:
16+
name: CMake build on Linux
17+
timeout-minutes: 15
1618
runs-on: ubuntu-latest
1719

1820
strategy:
@@ -24,11 +26,39 @@ jobs:
2426

2527
- name: install prereqs (linux)
2628
if: runner.os == 'Linux'
27-
run: sudo apt -yq install --no-install-recommends lib${{ matrix.mpi }}-dev ninja-build
29+
run: sudo apt -yq install --no-install-recommends lib${{ matrix.mpi }}-dev
2830

2931
- name: install prereqs (mac)
3032
if: runner.os == 'macOS'
31-
run: brew install ${{ matrix.mpi }} ninja
33+
run: brew install ${{ matrix.mpi }}
34+
35+
- run: cmake --workflow --preset debug
36+
37+
- run: cmake --workflow --preset release
38+
39+
40+
windows:
41+
runs-on: windows-2025
42+
name: CMake build on Windows
43+
timeout-minutes: 15
44+
45+
steps:
46+
- uses: msys2/setup-msys2@v2
47+
id: msys2
48+
with:
49+
update: true
50+
install: >-
51+
mingw-w64-ucrt-x86_64-gcc
52+
mingw-w64-ucrt-x86_64-gcc-fortran
53+
mingw-w64-ucrt-x86_64-msmpi
54+
55+
- name: Put MSYS2_MinGW64 on PATH
56+
run: echo "${{ steps.msys2.outputs.msys2-location }}/ucrt64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
57+
58+
- name: install MS-MPI (SDK is from MSYS2)
59+
run: dotnet add package MSMPISDK
60+
61+
- uses: actions/checkout@v4
3262

3363
- run: cmake --workflow --preset debug
3464

.github/workflows/oneapi-linux.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: oneapi-linux
2+
3+
env:
4+
CC: icx
5+
CXX: icpx
6+
FC: ifx
7+
LINUX_CPP_COMPONENTS: intel-oneapi-compiler-dpcpp-cpp
8+
LINUX_FORTRAN_COMPONENTS: intel-oneapi-compiler-fortran
9+
LINUX_MKL_COMPONENTS: intel-oneapi-mkl intel-oneapi-mkl-devel
10+
LINUX_MPI_COMPONENTS: intel-oneapi-mpi intel-oneapi-mpi-devel
11+
# https://github.com/oneapi-src/oneapi-ci/blob/master/.github/workflows/build_all.yml
12+
CTEST_NO_TESTS_ACTION: error
13+
CMAKE_BUILD_PARALLEL_LEVEL: 4
14+
CMAKE_BUILD_TYPE: Release
15+
CTEST_PARALLEL_LEVEL: 0
16+
# oneAPI Debug triggers asan errors on Linux in general on any project
17+
CMAKE_INSTALL_PREFIX: ~/libs
18+
CMAKE_PREFIX_PATH: ~/libs
19+
20+
on:
21+
push:
22+
paths:
23+
- "**.c"
24+
- "**.cpp"
25+
- "**.f90"
26+
- "**.F90"
27+
- "**.cmake"
28+
- "cmake/libraries.json"
29+
- "CMakePresets.json"
30+
- "**/CMakeLists.txt"
31+
- "!cmake/gnu.cmake"
32+
- ".github/workflows/oneapi-linux.yml"
33+
# paths ignore starting with "!"
34+
- "!docs/**"
35+
- "!**/cray.cmake"
36+
workflow_dispatch:
37+
38+
# avoid wasted runs
39+
concurrency:
40+
group: ${{ github.workflow }}-${{ github.ref }}
41+
cancel-in-progress: true
42+
43+
44+
jobs:
45+
46+
linux:
47+
runs-on: ubuntu-latest
48+
timeout-minutes: 15
49+
50+
steps:
51+
52+
- uses: actions/checkout@v4
53+
# this must be before oneAPI script commands else the scripts do not exist on the image
54+
55+
- name: cache install oneAPI
56+
id: cache-install
57+
uses: actions/cache@v4
58+
with:
59+
path: |
60+
/opt/intel/oneapi
61+
key: oneapi-apt
62+
63+
- name: non-cache install oneAPI
64+
if: steps.cache-install.outputs.cache-hit != 'true'
65+
timeout-minutes: 8
66+
# 5 minutes times out sometimes
67+
run: |
68+
sh -c .github/workflows/oneapi_setup_apt_repo_linux.sh
69+
sudo apt install --no-install-recommends ${{ env.LINUX_FORTRAN_COMPONENTS }} ${{ env.LINUX_CPP_COMPONENTS }} ${{ env.LINUX_MPI_COMPONENTS }}
70+
71+
- name: Setup Intel oneAPI environment
72+
run: |
73+
source /opt/intel/oneapi/setvars.sh
74+
printenv >> $GITHUB_ENV
75+
76+
- name: CMake Configure
77+
run: cmake --preset default -G Ninja
78+
79+
- name: print config log
80+
if: ${{ failure() }}
81+
run: cat build/CMakeFiles/CMakeConfigureLog.yaml
82+
83+
- name: build
84+
run: cmake --build --preset default
85+
86+
- name: build failed
87+
if: ${{ failure() }}
88+
run: cmake --build --preset default -j1 -v
89+
90+
- name: unit test
91+
run: ctest --preset default -L unit
92+
93+
# - name: RELEASE build
94+
# run: cmake --build --preset release
95+
# - name: RELEASE unit test
96+
# run: ctest --preset release -L unit
97+
# - name: RELEASE test core
98+
# run: ctest --preset release -LE unit -E 3d
99+
100+
- name: exclude unused files from cache
101+
if: steps.cache-install.outputs.cache-hit != 'true'
102+
run: .github/workflows/oneapi_cache_exclude_linux.sh

.github/workflows/oneapi-linux.yml.bak

Lines changed: 0 additions & 76 deletions
This file was deleted.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
2+
# This script sets up the Intel oneAPI apt repository on a Linux system.
3+
# https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2025-1/base-apt.html#BASE-APT
24

3-
# SPDX-FileCopyrightText: 2020 Intel Corporation
4-
#
5-
# SPDX-License-Identifier: MIT
5+
curl -sS -L https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
6+
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
7+
8+
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
69

7-
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
8-
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
9-
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
1010
sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/oneAPI.list" -o APT::Get::List-Cleanup="0"

0 commit comments

Comments
 (0)