CI-Release #6761
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: CI-Release | |
on: | |
# Runs on every push on master branch. If a push contains multiple commits, it will be ran on the latest one. | |
push: | |
paths-ignore: | |
- 'doc/**' | |
pull_request_target: | |
paths-ignore: | |
- 'doc/**' | |
env: | |
COMPILE_JOBS: 2 | |
MULTI_CORE_TESTS_REGEX: "mpirun=2" | |
jobs: | |
build: | |
name: Build (deal.ii:${{ matrix.dealii_version }}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
dealii_version: ["master"] | |
# Run steps in container of dealii's master branch | |
container: | |
image: dealii/dealii:${{ matrix.dealii_version }}-focal | |
options: --user root | |
steps: | |
- name: Setup | |
run: | | |
# Since dealii image doesn't include Node.js, we'll install it | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends nodejs | |
echo "Github actions is sane!" | |
echo "Running build with deal.ii version ${{ matrix.dealii_version }} on branch ${GITHUB_REF#refs/heads/}" | |
# Checks-out Lethe with branch of triggering commit | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
# | |
# Release | |
# | |
- name: Compile Lethe (Release-deal.ii:${{ matrix.dealii_version }}) | |
run: | | |
mkdir build-release | |
cd build-release | |
cmake ../ -DCMAKE_BUILD_TYPE=Release | |
make -j${{ env.COMPILE_JOBS }} | |
# These tests require a single core each so we will run them in parallel | |
- name: Run Lethe tests (Release-deal.ii:${{ matrix.dealii_version }}) | |
run: | | |
#Allow OMPI to run as root | |
export OMPI_ALLOW_RUN_AS_ROOT=1 | |
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | |
cd build-release | |
# Print the tests to be executed | |
ctest -N --exclude-regex ${{ env.MULTI_CORE_TESTS_REGEX }} | |
# Run in parallel | |
ctest -V -j${{ env.COMPILE_JOBS }} --exclude-regex ${{ env.MULTI_CORE_TESTS_REGEX }} | |
# These tests require two cores each so we will run them sequencially | |
- name: Run multi-core Lethe tests (Release-deal.ii:${{ matrix.dealii_version }}) | |
run: | | |
#Allow OMPI to run as root | |
export OMPI_ALLOW_RUN_AS_ROOT=1 | |
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | |
cd build-release | |
# Print the tests to be executed | |
ctest -N --tests-regex ${{ env.MULTI_CORE_TESTS_REGEX }} | |
# Run sequencially | |
ctest -V --tests-regex ${{ env.MULTI_CORE_TESTS_REGEX }} |