@@ -994,3 +994,142 @@ jobs:
994
994
995
995
- name : Interface test C++17
996
996
run : PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target test_cmake_build
997
+
998
+ windows_clang :
999
+
1000
+ strategy :
1001
+ matrix :
1002
+ os : [windows-latest]
1003
+ python : ['3.10']
1004
+
1005
+ runs-on : " ${{ matrix.os }}"
1006
+
1007
+ name : " 🐍 ${{ matrix.python }} • ${{ matrix.os }} • clang-latest"
1008
+
1009
+ steps :
1010
+ - name : Show env
1011
+ run : env
1012
+
1013
+ - name : Checkout
1014
+ uses : actions/checkout@v3
1015
+
1016
+ - name : Set up Clang
1017
+ uses : egor-tensin/setup-clang@v1
1018
+
1019
+ - name : Setup Python ${{ matrix.python }}
1020
+ uses : actions/setup-python@v4
1021
+ with :
1022
+ python-version : ${{ matrix.python }}
1023
+
1024
+ - name : Update CMake
1025
+
1026
+
1027
+ - name : Install ninja-build tool
1028
+ uses : seanmiddleditch/gha-setup-ninja@v3
1029
+
1030
+ - name : Run pip installs
1031
+ run : |
1032
+ python -m pip install --upgrade pip
1033
+ python -m pip install -r tests/requirements.txt
1034
+
1035
+ - name : Show Clang++ version
1036
+ run : clang++ --version
1037
+
1038
+ - name : Show CMake version
1039
+ run : cmake --version
1040
+
1041
+ # TODO: WERROR=ON
1042
+ - name : Configure Clang
1043
+ run : >
1044
+ cmake -G Ninja -S . -B .
1045
+ -DCMAKE_VERBOSE_MAKEFILE=ON
1046
+ -DPYBIND11_WERROR=OFF
1047
+ -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
1048
+ -DDOWNLOAD_CATCH=ON
1049
+ -DDOWNLOAD_EIGEN=ON
1050
+ -DCMAKE_CXX_COMPILER=clang++
1051
+ -DCMAKE_CXX_STANDARD=17
1052
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
1053
+
1054
+ - name : Build
1055
+ run : cmake --build . -j 2
1056
+
1057
+ - name : Python tests
1058
+ run : cmake --build . --target pytest -j 2
1059
+
1060
+ - name : C++ tests
1061
+ run : cmake --build . --target cpptest -j 2
1062
+
1063
+ - name : Interface test
1064
+ run : cmake --build . --target test_cmake_build -j 2
1065
+
1066
+ - name : Clean directory
1067
+ run : git clean -fdx
1068
+
1069
+ macos_brew_install_llvm :
1070
+ name : " macos-latest • brew install llvm"
1071
+ runs-on : macos-latest
1072
+
1073
+ env :
1074
+ # https://apple.stackexchange.com/questions/227026/how-to-install-recent-clang-with-homebrew
1075
+ LDFLAGS : ' -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib'
1076
+
1077
+ steps :
1078
+ - name : Update PATH
1079
+ run : echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
1080
+
1081
+ - name : Show env
1082
+ run : env
1083
+
1084
+ - name : Checkout
1085
+ uses : actions/checkout@v3
1086
+
1087
+ - name : Show Clang++ version before brew install llvm
1088
+ run : clang++ --version
1089
+
1090
+ - name : brew install llvm
1091
+ run : brew install llvm
1092
+
1093
+ - name : Show Clang++ version after brew install llvm
1094
+ run : clang++ --version
1095
+
1096
+ - name : Update CMake
1097
+
1098
+
1099
+ - name : Run pip installs
1100
+ run : |
1101
+ python3 -m pip install --upgrade pip
1102
+ python3 -m pip install -r tests/requirements.txt
1103
+ python3 -m pip install numpy
1104
+ python3 -m pip install scipy
1105
+
1106
+ - name : Show CMake version
1107
+ run : cmake --version
1108
+
1109
+ - name : CMake Configure
1110
+ run : >
1111
+ cmake -S . -B .
1112
+ -DCMAKE_VERBOSE_MAKEFILE=ON
1113
+ -DPYBIND11_WERROR=ON
1114
+ -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
1115
+ -DDOWNLOAD_CATCH=ON
1116
+ -DDOWNLOAD_EIGEN=ON
1117
+ -DCMAKE_CXX_COMPILER=clang++
1118
+ -DCMAKE_CXX_STANDARD=17
1119
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
1120
+ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
1121
+
1122
+ - name : Build
1123
+ run : cmake --build . -j 2
1124
+
1125
+ - name : Python tests
1126
+ run : cmake --build . --target pytest -j 2
1127
+
1128
+ - name : C++ tests
1129
+ run : cmake --build . --target cpptest -j 2
1130
+
1131
+ - name : Interface test
1132
+ run : cmake --build . --target test_cmake_build -j 2
1133
+
1134
+ - name : Clean directory
1135
+ run : git clean -fdx
0 commit comments