-
Notifications
You must be signed in to change notification settings - Fork 4
73 lines (59 loc) · 2.09 KB
/
ubuntu-intel.yml
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
name: ubuntu-intel
env:
LINUX_CPP_COMPONENTS: intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic 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
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
jobs:
builds-and-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: cache install oneAPI
id: cache-install
uses: actions/cache@v3
with:
path: |
/opt/intel/oneapi
key: install-apt
- name: non-cache install oneAPI
if: steps.cache-install.outputs.cache-hit != 'true'
timeout-minutes: 10
run: |
sh -c .github/workflows/oneapi_setup_apt_repo_linux.sh
sudo apt install ${{ env.LINUX_CPP_COMPONENTS }} ${{ env.LINUX_FORTRAN_COMPONENTS }} ${{ env.LINUX_MKL_COMPONENTS }} ${{ env.LINUX_MPI_COMPONENTS }}
- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Setup Intel oneAPI environment
run: |
LATEST_VERSION=$(ls -1 /opt/intel/oneapi/compiler/ | grep -v latest | sort | tail -1)
source /opt/intel/oneapi/compiler/"$LATEST_VERSION"/env/vars.sh
printenv >> $GITHUB_ENV
- name: print config log
if: ${{ failure() }}
run: cat build/CMakeFiles/CMakeConfigureLog.yaml
- name: CMake build
run: |
export FC=ifort
export CC=icc
export CXX=icpc
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
- name: Run json-parser tests
run: |
ctest --test-dir build/src_json_parser/test/ --output-on-failure
- name: exclude unused files from cache
if: steps.cache-install.outputs.cache-hit != 'true'
run: sh -c .github/workflows/oneapi_cache_exclude_linux.sh