forked from pybind/pybind11
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add macos_brew_install_llvm to ci.yml
Added block transferred from PR pybind#4324
- Loading branch information
Ralf W. Grosse-Kunstleve
committed
Nov 10, 2022
1 parent
7075e00
commit b84a163
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1037,3 +1037,68 @@ jobs: | |
|
||
- name: Clean directory | ||
run: git clean -fdx | ||
|
||
macos_brew_install_llvm: | ||
name: "macos-latest • brew install llvm" | ||
runs-on: macos-latest | ||
|
||
env: | ||
# https://apple.stackexchange.com/questions/227026/how-to-install-recent-clang-with-homebrew | ||
LDFLAGS: '-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib' | ||
|
||
steps: | ||
- name: Update PATH | ||
run: echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH | ||
|
||
- name: Show env | ||
run: env | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Show Clang++ version before brew install llvm | ||
run: clang++ --version | ||
|
||
- name: brew install llvm | ||
run: brew install llvm | ||
|
||
- name: Show Clang++ version after brew install llvm | ||
run: clang++ --version | ||
|
||
- name: Update CMake | ||
uses: jwlawson/[email protected] | ||
|
||
- name: Run pip installs | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install -r tests/requirements.txt | ||
- name: Show CMake version | ||
run: cmake --version | ||
|
||
- name: CMake Configure | ||
run: > | ||
cmake -S . -B . | ||
-DCMAKE_VERBOSE_MAKEFILE=ON | ||
-DPYBIND11_WERROR=ON | ||
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF | ||
-DDOWNLOAD_CATCH=ON | ||
-DDOWNLOAD_EIGEN=ON | ||
-DCMAKE_CXX_COMPILER=clang++ | ||
-DCMAKE_CXX_STANDARD=17 | ||
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") | ||
- name: Build | ||
run: cmake --build . -j 2 | ||
|
||
- name: Python tests | ||
run: cmake --build . --target pytest -j 2 | ||
|
||
- name: C++ tests | ||
run: cmake --build . --target cpptest -j 2 | ||
|
||
- name: Interface test | ||
run: cmake --build . --target test_cmake_build -j 2 | ||
|
||
- name: Clean directory | ||
run: git clean -fdx |