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