Skip to content

Hakostra/fortitude lint #297

Hakostra/fortitude lint

Hakostra/fortitude lint #297

Workflow file for this run

name: mglet-build
on:
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
image: ["intel-impi-image:sha-f052b7b", "gnu-ompi-image:date-20241106", "llvm-mpich-image:date-20241210"]
build: ["release", "debug"]
prec: ["Single", "Double"]
exclude:
- image: "llvm-mpich-image:date-20241210"
build: "debug"
fail-fast: false
container:
image: ghcr.io/kmturbulenz/${{ matrix.image }}
options: "--cap-add=SYS_PTRACE --shm-size=4gb"
steps:
- uses: actions/checkout@v4
- name: Build MGLET
run: |
source /opt/bashrc || true
mkdir build
cd build
IMAGE=${{ matrix.image }}
TOOLCHAIN=${IMAGE%%-*}
cmake -GNinja --preset=${TOOLCHAIN}-${{ matrix.build }} -DMGLET_REAL64="${{ matrix.prec == 'Double' && 'ON' || 'OFF' }}" ..
ninja
- name: Run testcases
run: |
source /opt/bashrc || true
cd build
export OMPI_ALLOW_RUN_AS_ROOT=1
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
export I_MPI_FABRICS=shm
export I_MPI_PLATFORM=ivb
export I_MPI_DEBUG=5
EXITCODE=0
TIC=`date +%s`
ctest --timeout ${{ matrix.build == 'Debug' && '600' || '150' }} --output-on-failure --test-dir tests || EXITCODE=1
TOC=`date +%s`
DURATION=$((TOC-TIC))
echo "" >> $GITHUB_STEP_SUMMARY
echo "Total test time: $DURATION sec" >> $GITHUB_STEP_SUMMARY
CPUNAME=$(lscpu | grep 'Model name' | cut -f 2 -d ":" | awk '{$1=$1}1')
echo "CPU model name: $CPUNAME" >> $GITHUB_STEP_SUMMARY
exit $EXITCODE