@@ -566,6 +566,108 @@ 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+ -DCMAKE_CXX_COMPILER=$(which icpx) \
611+ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
612+
613+ - name : Build
614+ shell : bash
615+ run : |
616+ set +e; source /opt/intel/oneapi/setvars.sh; set -e
617+ cmake --build build-11 -j 2
618+
619+ - name : Python tests
620+ shell : bash
621+ run : |
622+ set +e; source /opt/intel/oneapi/setvars.sh; set -e
623+ sudo service apport stop
624+ cmake --build build --target check
625+
626+ - name : C++ tests
627+ shell : bash
628+ run : |
629+ set +e; source /opt/intel/oneapi/setvars.sh; set -e
630+ cmake --build build --target cpptest
631+
632+ - name : Interface test
633+ shell : bash
634+ run : |
635+ set +e; source /opt/intel/oneapi/setvars.sh; set -e
636+ cmake --build build-11 --target test_cmake_build
637+
638+ - name : Configure C++17
639+ run : |
640+ set +e; source /opt/intel/oneapi/setvars.sh; set -e
641+ cmake -S . -B build-17 \
642+ -DPYBIND11_WERROR=ON \
643+ -DDOWNLOAD_CATCH=ON \
644+ -DDOWNLOAD_EIGEN=OFF \
645+ -DCMAKE_CXX_STANDARD=17 \
646+ -DCMAKE_CXX_COMPILER=$(which icpx) \
647+ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
648+
649+ - name : Build C++17
650+ run : |
651+ set +e; source /opt/intel/oneapi/setvars.sh; set -e
652+ cmake --build build-17 -j 2 -v
653+
654+ - name : Python tests C++17
655+ run : |
656+ set +e; source /opt/intel/oneapi/setvars.sh; set -e
657+ sudo service apport stop
658+ cmake --build build-17 --target check
659+
660+ - name : C++ tests C++17
661+ run : |
662+ set +e; source /opt/intel/oneapi/setvars.sh; set -e
663+ cmake --build build-17 --target cpptest
664+
665+ - name : Interface test C++17
666+ run : |
667+ set +e; source /opt/intel/oneapi/setvars.sh; set -e
668+ cmake --build build-17 --target test_cmake_build
669+
670+
569671 # Testing on CentOS (manylinux uses a centos base, and this is an easy way
570672 # to get GCC 4.8, which is the manylinux1 compiler).
571673 centos :
0 commit comments