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