#97: try vtk build config #15
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: Build and Test | |
# Trigger the workflow on push or pull request | |
on: | |
push: | |
branches: | |
- 97-add-more-environments-to-test-in-ci | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ macos-latest ] | |
vtk_version: [ 9.3.1 ] | |
compiler: [ [gcc-12, g++-12, gcov-12] ] | |
runs-on: ${{ matrix.os }} | |
name: vt-tv build and test | |
env: | |
VTK_DIR: /opt/build/vtk | |
steps: | |
- uses: actions/checkout@v4 | |
- name: CI Variables | |
id: vars | |
run: echo "DOCKER_TAG=$(echo ${{ github.ref }} | cut -d'/' -f3- | sed 's/[^a-z0-9_-]/__/gi')" >> $GITHUB_ENV | |
# - name: Install requirements | |
# run: | | |
# brew update && brew install \ | |
# lzip \ | |
# mesa \ | |
# mesa-glu \ | |
# boost \ | |
# double-conversion \ | |
# eigen \ | |
# gl2ps \ | |
# glew \ | |
# libaec \ | |
# hdf5 \ | |
# jsoncpp \ | |
# libogg \ | |
# netcdf \ | |
# pugixml \ | |
# assimp \ | |
# dbus \ | |
# hunspell \ | |
# jasper \ | |
# libb2 \ | |
# libmng \ | |
# md4c \ | |
# webp \ | |
# qt \ | |
# pyqt \ | |
# libvorbis \ | |
# theora \ | |
# utf8cpp | |
# export CC=${{ matrix.compiler[0] }} | |
# export CXX=${{ matrix.compiler[1] }} | |
# export GCOV=${{ matrix.compiler[2] }} | |
# export VTK_DIR=${{ env.VTK_DIR }} | |
# Once it is ok activate cache | |
# - name: Cache VTK Build | |
# uses: actions/cache@v3 | |
# with: | |
# path: /opt/build/vtk | |
# key: ${{ matrix.os }}-vtk-build-${{ matrix.vtk_version }} | |
- name: Build VTK | |
# TODO only if not cached, setting compiler does not work (AppleClang used) | |
run: | | |
sudo mkdir -p /opt/src/vtk | |
sudo git clone --recursive --branch v${{ matrix.vtk_version }} https://gitlab.kitware.com/vtk/vtk.git /opt/src/vtk | |
sudo mkdir -p ${VTK_DIR} | |
cd ${VTK_DIR} | |
sudo cmake \ | |
-DCMAKE_BUILD_TYPE:STRING=Debug \ | |
-DBUILD_TESTING:BOOL=OFF \ | |
-DVTK_OPENGL_HAS_OSMESA:BOOL=OFF \ | |
-DVTK_DEFAULT_RENDER_WINDOW_OFFSCREEN:BOOL=OFF \ | |
-DVTK_USE_X:BOOL=OFF \ | |
-DVTK_USE_COCOA:BOOL=ON \ | |
-DVTK_USE_SDL2:BOOL=OFF \ | |
-DVTK_Group_Rendering:BOOL=OFF \ | |
-DBUILD_SHARED_LIBS:BOOL=ON \ | |
-S /opt/src/vtk -B ${VTK_DIR} | |
sudo cmake --build ${VTK_DIR} -j$(sysctl -n hw.logicalcpu) |