bundlers/mac: Copy libc++ libs in bundle also when using homebrew #1003
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
name: macos-homebrew-build | |
on: [push, pull_request] | |
jobs: | |
macos: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: Talipot build on macOS 12 (x86_64) | |
os: macos-12 | |
pyver: "3.12" | |
homebrew_path: /usr/local | |
- name: Talipot build on macOS 14 (arm64) | |
os: macos-14 | |
pyver: "3.12" | |
homebrew_path: /opt/homebrew | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout Talipot code | |
uses: actions/checkout@v4 | |
- name: Install Talipot build dependencies | |
run: brew install | |
ccache | |
cmake | |
llvm | |
qhull | |
yajl | |
zstd | |
graphviz | |
libgit2 | |
python@${{ matrix.config.pyver }} | |
cppunit | |
pkg-config | |
glew | |
freetype | |
fribidi | |
fontconfig | |
qt6 | |
quazip || brew link --overwrite python@${{ matrix.config.pyver }} | |
- name: Install SIP | |
run: pip${{ matrix.config.pyver }} install sip --break-system-packages | |
- name: Prepare ccache timestamp | |
id: get-current-date | |
run: | | |
echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Cache files | |
uses: actions/cache@v4 | |
with: | |
path: /Users/runner/Library/Caches/ccache | |
key: ${{ matrix.config.os }}-ccache-${{ steps.get-current-date.outputs.date }} | |
restore-keys: | | |
${{ matrix.config.os }}-ccache- | |
save-always: true | |
- name: Create build directory | |
run: mkdir build | |
- name: Configure Talipot core build with CMake | |
working-directory: ./build | |
run: cmake .. -DCMAKE_BUILD_TYPE=Release | |
-DCMAKE_INSTALL_PREFIX=$PWD/install | |
-DCMAKE_C_COMPILER=${{ matrix.config.homebrew_path }}/opt/llvm/bin/clang | |
-DCMAKE_CXX_COMPILER=${{ matrix.config.homebrew_path }}/opt/llvm/bin/clang++ | |
-DCMAKE_SHARED_LINKER_FLAGS="-L${{ matrix.config.homebrew_path }}/opt/llvm/lib/c++ | |
-Wl,-rpath,${{ matrix.config.homebrew_path }}/opt/llvm/lib/c++" | |
-DCMAKE_EXE_LINKER_FLAGS="-L${{ matrix.config.homebrew_path }}/opt/llvm/lib/c++ | |
-Wl,-rpath,${{ matrix.config.homebrew_path }}/opt/llvm/lib/c++" | |
-DCMAKE_RANLIB=/usr/bin/ranlib | |
-DPython3_EXECUTABLE=${{ matrix.config.homebrew_path }}/bin/python${{ matrix.config.pyver }} | |
-DTALIPOT_BUILD_CORE_ONLY=ON | |
-DTALIPOT_BUILD_TESTS=ON | |
-DTALIPOT_BUILD_DOC=OFF | |
-DTALIPOT_USE_CCACHE=ON | |
- name: Talipot core build | |
working-directory: ./build | |
run: make -j4 | |
- name: Install Talipot core build | |
working-directory: ./build | |
run: make -j4 install | |
- name: Run Talipot core build unit tests | |
working-directory: ./build | |
run: make tests | |
- name: Configure Talipot complete build with CMake | |
working-directory: ./build | |
run: cmake . | |
-DTALIPOT_BUILD_CORE_ONLY=OFF | |
-DCMAKE_PREFIX_PATH=${{ matrix.config.homebrew_path }}/opt/qt6 | |
-DTALIPOT_USE_QT6=ON | |
- name: Talipot complete build | |
working-directory: ./build | |
run: make -j4 | |
- name: Install Talipot complete build | |
working-directory: ./build | |
run: make -j4 install | |
- name: Run Talipot complete build unit tests | |
working-directory: ./build | |
run: make tests | |
- name: Check Talipot application can be executed | |
working-directory: ./build/install/bin | |
run: ./talipot --check-application-starts --debug-plugins-load | |
- name: Generate Talipot dmg bundle | |
if: matrix.config.os == 'macos-12' || matrix.config.os == 'macos-14' | |
working-directory: ./build | |
run: make bundle | |
- name: Upload Talipot bundle to GitHub Actions artifacts | |
if: matrix.config.os == 'macos-12' || matrix.config.os == 'macos-14' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Talipot-macOS-bundles-${{ matrix.config.os }} | |
path: ./build/Talipot*.dmg |