t8code CMake testsuite #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: t8code CMake testsuite | |
# This file is part of t8code. | |
# t8code is a C library to manage a collection (a forest) of multiple | |
# connected adaptive space-trees of general element types in parallel. | |
# | |
# Copyright (C) 2024 the developers | |
# | |
# t8code is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# t8code is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# | |
# You should have received a copy of the GNU General Public License | |
# along with t8code; if not, write to the Free Software Foundation, Inc., | |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
# | |
# This github CI script installs t8code and runs its tests for various configurations. | |
# We compile sc and p4est as thirdparty libraries and use caching to only trigger a | |
# new installation of them when their versions have changed in t8code. | |
# | |
# Note: To manually enforce sc and p4est installation, either increase the counter | |
# in the "CACHE_COUNTER:" entries of the sc and p4est steps or set the variables | |
# IGNORE_CACHE to true in the respective steps. | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
- feature-*CI* # for testing this script, all feature branches with "CI" in their name | |
pull_request: | |
branches: | |
- main | |
- develop | |
workflow_dispatch: # Be able to trigger this manually on github.com | |
# Run every night at 1:10 | |
schedule: | |
- cron: '10 1 * * *' | |
jobs: | |
# Preparation step for tests. Repo is cloned and sc + p4est are compiled with and without MPI. | |
preparation: | |
if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule') | |
uses: ./.github/workflows/tests_cmake_preparation.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
MPI: [OFF, ON] | |
include: | |
- MAKEFLAGS: -j4 | |
with: | |
MAKEFLAGS: ${{ matrix.MAKEFLAGS }} | |
IGNORE_CACHE: false # Use this to force a new installation of sc and p4est for this specific workflow run | |
CACHE_COUNTER: 0 # Increase this number to force a new installation of sc and p4est and to update the cache once | |
MPI: ${{ matrix.MPI }} | |
# Run parallel tests for sc and p4est with and without MPI | |
sc_p4est_tests: | |
if: ((github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule')) | |
needs: preparation | |
uses: ./.github/workflows/tests_cmake_sc_p4est.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
MPI: [OFF, ON] | |
include: | |
- MAKEFLAGS: -j4 | |
with: | |
MAKEFLAGS: ${{ matrix.MAKEFLAGS }} | |
MPI: ${{ matrix.MPI }} | |
# Run t8code tests with and without MPI and in serial and debug mode | |
t8code_tests: | |
if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule') | |
uses: ./.github/workflows/tests_cmake_t8code.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
MPI: [OFF, ON] | |
BUILD_TYPE: [Debug, Release] | |
include: | |
- MAKEFLAGS: -j4 | |
needs: preparation | |
with: | |
MAKEFLAGS: ${{ matrix.MAKEFLAGS }} | |
MPI: ${{ matrix.MPI }} | |
BUILD_TYPE: ${{ matrix.BUILD_TYPE }} | |
LESS_TESTS: ${{ github.event_name == 'pull_request' }} | |
# Run t8code linkage tests with and without MPI and in serial and debug mode | |
t8code_linkage_tests: | |
if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule') | |
uses: ./.github/workflows/tests_cmake_t8code_linkage.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
MPI: [OFF, ON] | |
BUILD_TYPE: [Debug, Release] | |
include: | |
- MAKEFLAGS: -j4 | |
needs: preparation | |
with: | |
MAKEFLAGS: ${{ matrix.MAKEFLAGS }} | |
MPI: ${{ matrix.MPI }} | |
BUILD_TYPE: ${{ matrix.BUILD_TYPE }} | |
LESS_TESTS: ${{ github.event_name == 'pull_request' }} | |
# Run t8code linkage tests with and without MPI and in serial and debug mode | |
t8code_api_tests: | |
if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule') | |
uses: ./.github/workflows/tests_cmake_t8code_api.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
MPI: [ON] # For now the fortran API only supports building with MPI | |
BUILD_TYPE: [Debug, Release] | |
include: | |
- MAKEFLAGS: -j4 | |
needs: preparation | |
with: | |
MAKEFLAGS: ${{ matrix.MAKEFLAGS }} | |
MPI: ${{ matrix.MPI }} | |
BUILD_TYPE: ${{ matrix.BUILD_TYPE }} | |
LESS_TESTS: ${{ github.event_name == 'pull_request' }} | |
# Run t8code tests with shipped submodules. This test is only for the build system, so only one config is tested. | |
t8code_w_shipped_submodules_tests: | |
if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule') | |
uses: ./.github/workflows/tests_cmake_t8code_w_shipped_submodules.yml | |
with: | |
MAKEFLAGS: -j4 | |
MPI: ON | |
BUILD_TYPE: Debug | |
LESS_TESTS: ${{ github.event_name == 'pull_request' }} |