Skip to content

Commit

Permalink
Use the brew package to install VTK on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
sanguinariojoe committed Aug 7, 2024
1 parent 1c708e6 commit 71a0c29
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/python-wheels-emulated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,16 @@ jobs:
# Skip 32-bit windows wheels builds.
CIBW_SKIP: "*-win32*"
CIBW_ARCHS: ${{inputs.arch}}
CIBW_BEFORE_ALL: >
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=${{github.workspace}}/vtk/lib/cmake/vtk-9.2/ -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 &&
CIBW_BEFORE_ALL_LINUX: >
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=${{github.workspace}}/vtk/lib/cmake/vtk-9.2/ -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF &&
cmake --build ${{github.workspace}}/build --config Release &&
cmake --install ${{github.workspace}}/build --config Release
CIBW_BEFORE_ALL_WINDOWS: >
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=${{github.workspace}}/vtk/lib/cmake/vtk-9.2/ -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF &&
cmake --build ${{github.workspace}}/build --config Release &&
cmake --install ${{github.workspace}}/build --config Release
CIBW_BEFORE_ALL_MACOS: >
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 &&
cmake --build ${{github.workspace}}/build --config Release &&
cmake --install ${{github.workspace}}/build --config Release
Expand Down Expand Up @@ -55,20 +63,18 @@ jobs:
target: ${{github.workspace}}/
if: runner.os == 'Linux'

- name: download pre-built VTK static library (MacOS)
uses: suisei-cn/[email protected]
with:
url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-9.2.6-static/vtk-macOS-x86_64.tar.gz
target: ${{github.workspace}}/
if: runner.os == 'MacOS'

- name: download pre-built VTK static library (Windows)
uses: suisei-cn/[email protected]
with:
url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-9.2.6-static/vtk-Windows-x86_64.tar.gz
target: ${{github.workspace}}/
if: runner.os == 'Windows'

- name: Install VTK (MacOS)
run: |
brew install vtk
if: runner.os == 'MacOS'

- name: Create folders
run: |
mkdir -p ${{github.workspace}}/vtk
Expand All @@ -80,11 +86,6 @@ jobs:
tar -xvzf vtk-manylinux2014_${{inputs.arch}}.tar.gz -C vtk/
if: runner.os == 'Linux'

- name: Extract VTK tgz (MacOS)
run: |
tar -xvzf vtk-macOS-x86_64.tar.gz -C vtk/
if: runner.os == 'MacOS'

- name: Extract VTK tgz (Windows)
run: |
tar -xvzf vtk-Windows-x86_64.tar.gz -C vtk/
Expand Down

0 comments on commit 71a0c29

Please sign in to comment.