Skip to content

Commit 4330516

Browse files
ax3lhenryiii
authored andcommitted
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 774b5ff commit 4330516

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
@@ -566,6 +566,107 @@ jobs:
566566
cmake --build build-17 --target test_cmake_build
567567
568568
569+
# Testing on ICX/ICPX, Intel's next-gen C/C++ compiler using the oneAPI apt repo
570+
icx:
571+
runs-on: ubuntu-20.04
572+
strategy:
573+
fail-fast: false
574+
575+
name: "🐍 3 • ICPX latest • x64"
576+
577+
steps:
578+
- uses: actions/checkout@v2
579+
580+
- name: Add apt repo
581+
run: |
582+
sudo apt-get update
583+
sudo apt-get install -y wget build-essential pkg-config cmake ca-certificates gnupg
584+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
585+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
586+
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
587+
588+
- name: Add ICPC & Python 3
589+
run: sudo apt-get update; sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp cmake python3-dev python3-numpy python3-pytest python3-pip
590+
591+
- name: Update pip
592+
run: |
593+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
594+
python3 -m pip install --upgrade pip
595+
596+
- name: Install dependencies
597+
run: |
598+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
599+
python3 -m pip install -r tests/requirements.txt --prefer-binary
600+
601+
- name: Configure C++11
602+
run: |
603+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
604+
cmake -S . -B build-11 \
605+
-DPYBIND11_WERROR=ON \
606+
-DDOWNLOAD_CATCH=ON \
607+
-DDOWNLOAD_EIGEN=OFF \
608+
-DCMAKE_CXX_STANDARD=14 \
609+
-DCMAKE_VERBOSE_MAKEFILE=ON \
610+
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
611+
612+
- name: Build
613+
shell: bash
614+
run: |
615+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
616+
cmake --build build -j 2
617+
618+
- name: Python tests
619+
shell: bash
620+
run: |
621+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
622+
sudo service apport stop
623+
cmake --build build --target check
624+
625+
- name: C++ tests
626+
shell: bash
627+
run: |
628+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
629+
cmake --build build --target cpptest
630+
631+
- name: Interface test
632+
shell: bash
633+
run: |
634+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
635+
cmake --build build-11 --target test_cmake_build
636+
637+
- name: Configure C++17
638+
run: |
639+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
640+
cmake -S . -B build-17 \
641+
-DPYBIND11_WERROR=ON \
642+
-DDOWNLOAD_CATCH=ON \
643+
-DDOWNLOAD_EIGEN=OFF \
644+
-DCMAKE_CXX_STANDARD=17 \
645+
-DCMAKE_CXX_COMPILER=$(which icpc) \
646+
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
647+
648+
- name: Build C++17
649+
run: |
650+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
651+
cmake --build build-17 -j 2 -v
652+
653+
- name: Python tests C++17
654+
run: |
655+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
656+
sudo service apport stop
657+
cmake --build build-17 --target check
658+
659+
- name: C++ tests C++17
660+
run: |
661+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
662+
cmake --build build-17 --target cpptest
663+
664+
- name: Interface test C++17
665+
run: |
666+
set +e; source /opt/intel/oneapi/setvars.sh; set -e
667+
cmake --build build-17 --target test_cmake_build
668+
669+
569670
# Testing on CentOS (manylinux uses a centos base, and this is an easy way
570671
# to get GCC 4.8, which is the manylinux1 compiler).
571672
centos:

0 commit comments

Comments
 (0)