forked from Exawind/amr-wind
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (71 loc) · 2.31 KB
/
dpcpp-ci.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: AMR-Wind Intel OneAPI CI
on:
push:
branches:
- main
paths:
- 'cmake/**'
- 'amr-wind/**'
- 'submods/**'
- 'unit_tests/**'
- 'CMakeLists.txt'
- '.github/workflows/dpcpp-ci.yml'
pull_request:
branches:
- main
paths:
- 'cmake/**'
- 'amr-wind/**'
- 'submods/**'
- 'unit_tests/**'
- 'CMakeLists.txt'
- '.github/workflows/dpcpp-ci.yml'
jobs:
dpcpp:
runs-on: ubuntu-latest
name: Intel OneAPI ${{matrix.intel_type}}
strategy:
matrix:
intel_type: [DPCPP]
include:
# - intel_type: ICC
# oneapi_packages: intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
# cexe: icc
# cppexe: icpc
# enable_dpcpp: OFF
- intel_type: DPCPP
oneapi_packages: intel-oneapi-dpcpp-cpp-compiler intel-oneapi-mkl-devel
cexe: clang
cppexe: dpcpp
enable_dpcpp: ON
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{github.token}}
- uses: actions/checkout@v2
with:
submodules: true
- name: Prepare DPC++ environment
run: |
export DEBIAN_FRONTEND=noninteractive
sudo 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
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libopenmpi-dev ${{matrix.oneapi_packages}}
- name: Configure and build
run: |
set +e
source /opt/intel/oneapi/setvars.sh
set -e
cmake -Bbuild-${{matrix.intel_type}} \
-DCMAKE_CXX_COMPILER_ID="Clang" \
-DCMAKE_CXX_COMPILER_VERSION=12.0 \
-DCMAKE_CXX_STANDARD_COMPUTED_DEFAULT=17 \
-DCMAKE_CXX_COMPILER=$(which ${{matrix.cppexe}}) \
-DCMAKE_C_COMPILER=$(which ${{matrix.cexe}}) \
-DAMR_WIND_ENABLE_MPI=OFF \
-DAMR_WIND_ENABLE_DPCPP=${{matrix.enable_dpcpp}} .
cmake --build build-${{matrix.intel_type}} -- -j $(nproc)