From 71a0c2909f3a883e487662764ea71cd95cd1869f Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos-Pita Date: Wed, 7 Aug 2024 11:56:55 +0200 Subject: [PATCH] Use the brew package to install VTK on MacOS --- .github/workflows/python-wheels-emulated.yml | 29 ++++++++++---------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index a61f914f..303aec7e 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -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 @@ -55,13 +63,6 @@ jobs: target: ${{github.workspace}}/ if: runner.os == 'Linux' - - name: download pre-built VTK static library (MacOS) - uses: suisei-cn/actions-download-file@v1.6.0 - 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/actions-download-file@v1.6.0 with: @@ -69,6 +70,11 @@ jobs: 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 @@ -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/