Skip to content

🧪 Run Tests

🧪 Run Tests #365

Workflow file for this run

name: 🧪 Run Tests
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
config:
- Release
- Debug
os:
- macos-latest
- windows-latest
include:
- os: ubuntu-latest
config: Release
container: ghcr.io/viennatools/vienna-builder:suite
- os: ubuntu-latest
config: Debug
container: ghcr.io/viennatools/vienna-builder:suite
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
env:
CPM_SOURCE_CACHE: ${{ github.workspace }}/.cache
SCCACHE_DIR: ${{ github.workspace }}/.cache
name: "🧪 Test on ${{ matrix.os }} (⚙️: ${{ matrix.config }}, 💿: ${{ matrix.container || matrix.os }})"
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: 🖥️ Setup Environment
uses: ./.github/actions/setup
with:
os: ${{ matrix.os }}
- name: 📋 Install MacOS Dependencies
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install vtk
- name: 🦥 Cache VTK build
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/cache@v4
with:
key: test-${{ matrix.os }}-${{ matrix.config }}
path: ${{ github.workspace }}/.cache
- name: 🏗️ Compile (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
cmake -DVIENNALS_BUILD_TESTS=ON -DCPM_SOURCE_CACHE="${{ env.CPM_SOURCE_CACHE }}" -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache -B build && cmake --build build --config ${{ matrix.config }}
- name: 🏗️ Compile (other)
if: ${{ matrix.os != 'windows-latest' }}
run: |
cmake -DVIENNALS_BUILD_TESTS=ON -B build && cmake --build build --config ${{ matrix.config }}
- name: 🧪 Test
run: ctest --output-on-failure -E "Benchmark|Performance" -C ${{ matrix.config }} --test-dir build