Skip to content

Commit 5382488

Browse files
authored
Merge pull request ERGO-Code#2294 from ERGO-Code/intel-ci-linux
Intel ci linux
2 parents ea5c78c + e6f7e3b commit 5382488

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/build-intel.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: build-intel
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
11+
- name: Add oneAPI to apt
12+
shell: bash
13+
run: |
14+
cd /tmp
15+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
16+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
17+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
18+
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
19+
20+
- name: Install oneAPI basekit
21+
shell: bash
22+
run: |
23+
sudo apt update
24+
sudo apt install intel-basekit
25+
26+
- name: Check compiler
27+
run: |
28+
source /opt/intel/oneapi/setvars.sh
29+
icpx --version
30+
icx --version
31+
32+
- name: Configure
33+
shell: bash
34+
run: |
35+
source /opt/intel/oneapi/setvars.sh
36+
cmake -S . -B build \
37+
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
38+
-DCMAKE_INSTALL_PREFIX=install \
39+
-DCMAKE_CXX_COMPILER=icpx \
40+
-DCMAKE_C_COMPILER=icx \
41+
-DALL_TESTS=ON \
42+
-DIntelDPCPP_DIR="/opt/intel/oneapi/compiler/latest/linux/cmake/SYCL" \
43+
44+
- name: Build
45+
shell: bash
46+
run: |
47+
source /opt/intel/oneapi/setvars.sh
48+
cmake --build build --parallel
49+
50+
- name: Test
51+
shell: bash
52+
run: |
53+
source /opt/intel/oneapi/setvars.sh
54+
export SYCL_DEVICE_FILTER=opencl.cpu
55+
ctest --test-dir build --output-on-failure --timeout 300

0 commit comments

Comments
 (0)