1+ name : Intel ICX Build
2+
3+ permissions :
4+ contents : read
5+
6+ on :
7+ push :
8+ branches : [ main ]
9+ pull_request :
10+
11+ concurrency :
12+ group : icx-${{ github.ref }}
13+ cancel-in-progress : true
14+
15+ jobs :
16+ icx-build :
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+
23+ # ------------------------
24+ # Cache APT packages
25+ # ------------------------
26+ - name : Cache APT packages
27+ uses : actions/cache@v4
28+ with :
29+ path : /var/cache/apt
30+ key : apt-cache-${{ runner.os }}-${{ hashFiles('**/CMakeLists.txt') }}
31+ restore-keys : |
32+ apt-cache-${{ runner.os }}-
33+
34+ # ------------------------
35+ # Install Intel oneAPI (ICX/ICPX)
36+ # ------------------------
37+ - name : Install Intel oneAPI (ICX)
38+ run : |
39+ wget https://apt.repos.intel.com/intel-gpg-keys/Intel-GPG-KEY-public.asc
40+ sudo apt-key add Intel-GPG-KEY-public.asc
41+ sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
42+ sudo apt-get update
43+ sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp intel-oneapi-compiler-classic
44+
45+ # ------------------------
46+ # Install OpenMP + HDF5
47+ # ------------------------
48+ - name : Install OpenMP + HDF5
49+ run : |
50+ sudo apt-get install -y libomp-dev libhdf5-dev
51+
52+ # ------------------------
53+ # Cache CMake build directory
54+ # ------------------------
55+ - name : Cache CMake build
56+ uses : actions/cache@v4
57+ with :
58+ path : build
59+ key : cmake-icx-${{ runner.os }}-${{ hashFiles('**/*.cpp', '**/*.h', '**/CMakeLists.txt') }}
60+ restore-keys : |
61+ cmake-icx-${{ runner.os }}-
62+
63+ # ------------------------
64+ # Configure CMake with ICX
65+ # ------------------------
66+ - name : Configure project (ICX)
67+ run : |
68+ source /opt/intel/oneapi/setvars.sh
69+ cmake -S . -B build \
70+ -DCMAKE_C_COMPILER=icx \
71+ -DCMAKE_CXX_COMPILER=icpx \
72+ -DCMAKE_BUILD_TYPE=Release \
73+ -DNEXT_FP64=ON
74+
75+ # ------------------------
76+ # Build project
77+ # ------------------------
78+ - name : Build project
79+ run : |
80+ source /opt/intel/oneapi/setvars.sh
81+ cmake --build build -- -j$(nproc)
82+
83+ # ------------------------
84+ # Test project
85+ # ------------------------
86+ - name : Run tests
87+ working-directory : build
88+ run : |
89+ source /opt/intel/oneapi/setvars.sh
90+ ctest --output-on-failure
0 commit comments