#175: Make layout parameters optional and let vt-tv make best guess in their absence #493
This file contains hidden or 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 (macos) | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| host: [ | |
| { | |
| base: macos-13, | |
| compiler: { cc: clang, cxx: clang++ }, | |
| python: ['3.8', '3.9', '3.10', '3.11', '3.12'], | |
| vtk: '9.3.1' | |
| }, | |
| { | |
| base: macos-14, | |
| compiler: { cc: clang, cxx: clang++ }, | |
| python: ['3.8', '3.9', '3.10', '3.11', '3.12'], | |
| vtk: '9.3.1' | |
| } | |
| ] | |
| runs-on: ${{ matrix.host.base }} | |
| name: vt-tv build and test (${{ matrix.host.base }}, ${{ matrix.host.compiler.cc }}, vtk-${{ matrix.host.vtk }}, py[${{ join(matrix.host.python, ', ') }}]) | |
| env: | |
| VTK_SRC_DIR: /opt/src/vtk | |
| VTK_BUILD_DIR: /opt/build/vtk | |
| VTK_DIR: /opt/build/vtk | |
| CACHE_KEY: ${{ matrix.host.base }}-${{ matrix.host.compiler.cc }}-vtk-${{ matrix.host.vtk }} | |
| VT_TV_BUILD_DIR: /opt/build | |
| VT_TV_OUTPUT_DIR: ${{ github.workspace }}/output | |
| VT_TV_TESTS_OUTPUT_DIR: ${{ github.workspace }}/output/tests | |
| VT_TV_ARTIFACTS_DIR: /tmp/artifacts | |
| CONDA_PATH: /opt/conda | |
| CC: ${{ matrix.host.compiler.cc }} | |
| CXX: ${{ matrix.host.compiler.cxx }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set folder permissions | |
| run: | | |
| sudo chown -R $(whoami) /opt | |
| mkdir -p ${{ env.VTK_SRC_DIR }} ${{ env.VT_TV_BUILD_DIR }} | |
| - name: Install dependencies | |
| run: | | |
| brew update && brew install coreutils lcov xquartz | |
| - name: Load cache (VTK, Miniconda3) | |
| id: base-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ env.VTK_SRC_DIR }} | |
| ${{ env.VTK_BUILD_DIR }} | |
| ${{ env.CONDA_PATH }} | |
| ~/.zshrc | |
| ~/.bash_profile | |
| key: ${{ env.CACHE_KEY }} | |
| - name: Setup Conda | |
| if: ${{steps.base-cache.outputs.cache-hit != 'true'}} | |
| env: | |
| CONDA_ROOT: ${{ env.CONDA_PATH }} | |
| run: | | |
| sudo bash ./ci/setup_conda.sh ${{ join(matrix.host.python) }} | |
| - name: Setup VTK ${{ matrix.host.vtk }} | |
| if: ${{steps.base-cache.outputs.cache-hit != 'true'}} | |
| run: | | |
| bash ./ci/setup_vtk.sh | |
| - name: Build | |
| run: | | |
| bash ./ci/build_cpp.sh ${{ github.workspace }} ${{ env.VT_TV_BUILD_DIR }} | |
| - name: Test | |
| run: | | |
| bash ./ci/test_cpp.sh ${{ github.workspace }} ${{ env.VT_TV_BUILD_DIR }} | |
| - name: Build Python package (${{ join(matrix.host.python, ', ') }}) | |
| run: | | |
| bash ./ci/python_build.sh | |
| - name: Test Python bindings (${{ join(matrix.host.python) }}) | |
| run: | | |
| bash ./ci/python_test.sh | |
| - name: Collect artifacts | |
| run: | | |
| mkdir -p ${{ env.VT_TV_ARTIFACTS_DIR }} | |
| # > go to output directory | |
| pushd ${{ env.VT_TV_OUTPUT_DIR }} | |
| echo "> add junit test report artifact" | |
| cp "junit-report.xml" ${{ env.VT_TV_ARTIFACTS_DIR }}/ || true | |
| popd | |
| echo "> add tests output mesh files and png artifacts" | |
| if [ -d "${{ env.VT_TV_TESTS_OUTPUT_DIR }}" ]; then | |
| cp "${{ env.VT_TV_TESTS_OUTPUT_DIR }}/"*".vtp" ${{ env.VT_TV_ARTIFACTS_DIR }}/ || true | |
| cp "${{ env.VT_TV_TESTS_OUTPUT_DIR }}/"*".png" ${{ env.VT_TV_ARTIFACTS_DIR }}/ || true | |
| fi | |
| echo "> list of collected artifacts:" | |
| pushd ${{ env.VT_TV_ARTIFACTS_DIR }} | |
| find ${{ env.VT_TV_ARTIFACTS_DIR }} | while read line; do echo "- $line"; done | |
| popd | |
| - name: Unit tests | |
| uses: phoenix-actions/test-reporting@v15 | |
| with: | |
| name: Tests report | |
| path: ${{ env.VT_TV_ARTIFACTS_DIR }}/junit-report.xml | |
| reporter: java-junit | |
| output-to: step-summary | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: vt-tv-artifacts-${{ env.CACHE_KEY }} | |
| path: ${{ env.VT_TV_ARTIFACTS_DIR }} |