Skip to content

Commit 9ef16dc

Browse files
committed
ci: Intel icx/icpx via oneAPI
Add testing for Intel icx/icpx via the oneAPI images. This is Intel's next-gen compiler and new C++ support, e.g. C++17 bug fixes, first land here. Update .github/workflows/ci.yml Co-authored-by: Yannick Jadoul <[email protected]> CMake: Fix ICPX Detection in Python tests More IntelClang Detection Upsi, keep ICC rebased out by accident Prettify Compiler Workaround: Just in Configure ci: rely on newer CMake
1 parent 2cd32e5 commit 9ef16dc

File tree

1 file changed

+101
-0
lines changed

1 file changed

+101
-0
lines changed

.github/workflows/ci.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,107 @@ jobs:
592592
cmake --build build-14 --target test_cmake_build
593593
594594
595+
# Testing on ICX/ICPX, Intel's next-gen C/C++ compiler using the oneAPI apt repo
596+
icx:
597+
runs-on: ubuntu-20.04
598+
strategy:
599+
fail-fast: false
600+
601+
name: "🐍 3 • ICPX latest • x64"
602+
603+
steps:
604+
- uses: actions/checkout@v2
605+
606+
- name: Add apt repo
607+
run: |
608+
sudo apt-get update
609+
sudo apt-get install -y wget build-essential pkg-config cmake ca-certificates gnupg
610+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
611+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
612+
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
613+
614+
- name: Add ICPC & Python 3
615+
run: sudo apt-get update; sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp cmake python3-dev python3-numpy python3-pytest python3-pip
616+
617+
- name: Update pip
618+
run: |
619+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
620+
python3 -m pip install --upgrade pip
621+
622+
- name: Install dependencies
623+
run: |
624+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
625+
python3 -m pip install -r tests/requirements.txt --prefer-binary
626+
627+
- name: Configure C++11
628+
run: |
629+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
630+
cmake -S . -B build-11 \
631+
-DPYBIND11_WERROR=ON \
632+
-DDOWNLOAD_CATCH=ON \
633+
-DDOWNLOAD_EIGEN=OFF \
634+
-DCMAKE_VERBOSE_MAKEFILE=ON \
635+
-DCMAKE_CXX_COMPILER=$(which icpx) \
636+
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
637+
638+
- name: Build
639+
shell: bash
640+
run: |
641+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
642+
cmake --build build-11 -j 2
643+
644+
- name: Python tests
645+
shell: bash
646+
run: |
647+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
648+
sudo service apport stop
649+
cmake --build build --target check
650+
651+
- name: C++ tests
652+
shell: bash
653+
run: |
654+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
655+
cmake --build build --target cpptest
656+
657+
- name: Interface test
658+
shell: bash
659+
run: |
660+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
661+
cmake --build build-11 --target test_cmake_build
662+
663+
- name: Configure C++17
664+
run: |
665+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
666+
cmake -S . -B build-17 \
667+
-DPYBIND11_WERROR=ON \
668+
-DDOWNLOAD_CATCH=ON \
669+
-DDOWNLOAD_EIGEN=OFF \
670+
-DCMAKE_CXX_STANDARD=17 \
671+
-DCMAKE_CXX_COMPILER=$(which icpx) \
672+
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
673+
674+
- name: Build C++17
675+
run: |
676+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
677+
cmake --build build-17 -j 2 -v
678+
679+
- name: Python tests C++17
680+
run: |
681+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
682+
sudo service apport stop
683+
cmake --build build-17 --target check
684+
685+
- name: C++ tests C++17
686+
run: |
687+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
688+
cmake --build build-17 --target cpptest
689+
690+
- name: Interface test C++17
691+
run: |
692+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
693+
cmake --build build-17 --target test_cmake_build
694+
695+
595696
# Testing on CentOS (manylinux uses a centos base, and this is an easy way
596697
# to get GCC 4.8, which is the manylinux1 compiler).
597698
centos:

0 commit comments

Comments
 (0)