Skip to content

Commit b8b0d71

Browse files
committed
Add macos_brew_install_llvm to ci.yml
Added block transferred from PR #4324
1 parent 1f04cc7 commit b8b0d71

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/ci.yml

+65
Original file line numberDiff line numberDiff line change
@@ -1037,3 +1037,68 @@ jobs:
10371037

10381038
- name: Clean directory
10391039
run: git clean -fdx
1040+
1041+
macos_brew_install_llvm:
1042+
name: "macos-latest • brew install llvm"
1043+
runs-on: macos-latest
1044+
1045+
env:
1046+
# https://apple.stackexchange.com/questions/227026/how-to-install-recent-clang-with-homebrew
1047+
LDFLAGS: '-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib'
1048+
1049+
steps:
1050+
- name: Update PATH
1051+
run: echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
1052+
1053+
- name: Show env
1054+
run: env
1055+
1056+
- name: Checkout
1057+
uses: actions/checkout@v3
1058+
1059+
- name: Show Clang++ version before brew install llvm
1060+
run: clang++ --version
1061+
1062+
- name: brew install llvm
1063+
run: brew install llvm
1064+
1065+
- name: Show Clang++ version after brew install llvm
1066+
run: clang++ --version
1067+
1068+
- name: Update CMake
1069+
uses: jwlawson/[email protected]
1070+
1071+
- name: Run pip installs
1072+
run: |
1073+
python3 -m pip install --upgrade pip
1074+
python3 -m pip install -r tests/requirements.txt
1075+
1076+
- name: Show CMake version
1077+
run: cmake --version
1078+
1079+
- name: CMake Configure
1080+
run: >
1081+
cmake -S . -B .
1082+
-DCMAKE_VERBOSE_MAKEFILE=ON
1083+
-DPYBIND11_WERROR=ON
1084+
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
1085+
-DDOWNLOAD_CATCH=ON
1086+
-DDOWNLOAD_EIGEN=ON
1087+
-DCMAKE_CXX_COMPILER=clang++
1088+
-DCMAKE_CXX_STANDARD=17
1089+
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
1090+
1091+
- name: Build
1092+
run: cmake --build . -j 2
1093+
1094+
- name: Python tests
1095+
run: cmake --build . --target pytest -j 2
1096+
1097+
- name: C++ tests
1098+
run: cmake --build . --target cpptest -j 2
1099+
1100+
- name: Interface test
1101+
run: cmake --build . --target test_cmake_build -j 2
1102+
1103+
- name: Clean directory
1104+
run: git clean -fdx

0 commit comments

Comments
 (0)