Unit testing and benchmarking libCEED integration with Catch2 #174
Workflow file for this run
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: Singularity | |
on: | |
push: | |
branches: | |
- main | |
tags: '*' | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CONTAINER_NAME: palace.sif | |
jobs: | |
build-and-test-singularity: | |
runs-on: palace_ubuntu-latest_16-core | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: singularityhub/install-singularity@main | |
- name: Build container | |
run: | | |
sudo singularity build --bind ${{ github.workspace }}:/opt/palace-src:ro \ | |
$CONTAINER_NAME singularity/singularity.def | |
- name: Run tests | |
env: | |
NUM_PROC_TEST_MAX: '8' | |
run: | | |
# Configure environment | |
export NUM_PROC_TEST=$(nproc 2> /dev/null || sysctl -n hw.ncpu) | |
if [[ "$NUM_PROC_TEST" -gt "$NUM_PROC_TEST_MAX" ]]; then | |
NUM_PROC_TEST=$NUM_PROC_TEST_MAX | |
fi | |
export PALACE_TEST="singularity run $(pwd)/$CONTAINER_NAME" | |
# Run tests | |
julia --project=test/examples -e 'using Pkg; Pkg.instantiate()' | |
julia --project=test/examples --color=yes test/examples/runtests.jl | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.CONTAINER_NAME }} | |
path: ${{ env.CONTAINER_NAME }} | |
retention-days: 1 |