Skip to content

ran clang-format

ran clang-format #119

Workflow file for this run

name: Clang Tests
on: [push]
jobs:
tests:
runs-on: ubuntu-22.04
strategy:
matrix:
# see available versions here: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#preinstalled-software
clang-version: [13, 14, 15]
dim: [2, 3]
mpi: ['FALSE', 'TRUE']
opt: ['FALSE', 'TRUE']
exclude:
# No point running 2D test without MPI as the only test is the
# Apparent Horizon one which needs MPI
- dim: 2
mpi: 'FALSE'
include:
- debug: 'TRUE'
opt: 'FALSE'
- debug: 'FALSE'
opt: 'TRUE'
name: Clang ${{ matrix.clang-version }}, DIM = ${{ matrix.dim }}, MPI = ${{ matrix.mpi }}, OPT = ${{ matrix.opt }}
env:
CHOMBO_HOME: ${{ github.workspace }}/Chombo/lib
OMP_NUM_THREADS: 1
OMPI_CXX: clang++
BUILD_ARGS: DIM=${{ matrix.dim }} MPI=${{ matrix.mpi}} OPT=${{ matrix.opt }} DEBUG=${{ matrix.debug }}
steps:
- name: Checkout Chombo
uses: actions/checkout@v4
with:
repository: GRChombo/Chombo
path: Chombo
- name: Checkout GRChombo
uses: actions/checkout@v4
with:
path: GRChombo
- name: Update package manager database
id: update-database
continue-on-error: true
run: sudo apt-get update
# This is quite slow so only do this if the previous command fails
- name: Update package repository mirrors if necessary
if: steps.update-database.outcome == 'failure'
run: |
sudo gem install apt-spy2
sudo apt-spy2 fix --commit --launchpad --country=US
sudo apt-get update
- name: Install common dependencies
run: sudo apt-get -y --no-install-recommends install csh libhdf5-dev libblas-dev liblapack-dev libgetopt-complete-perl
- name: Install MPI dependencies
if: matrix.mpi == 'TRUE'
run: sudo apt-get -y --no-install-recommends install libhdf5-openmpi-dev petsc-dev openmpi-bin
- name: Set compiler
run: |
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{ matrix.clang-version }} 200
clang++ --version
- name: Build Chombo
run: |
if [[ "${{ matrix.mpi }}" == "TRUE" ]]; then
MAKE_DEFS_FILE=$GITHUB_WORKSPACE/GRChombo/InstallNotes/MakeDefsLocalExamples/ubuntu-clang.Make.defs.local
else
MAKE_DEFS_FILE=$GITHUB_WORKSPACE/GRChombo/InstallNotes/MakeDefsLocalExamples/ubuntu-clang-nompi.Make.defs.local
fi
cp $MAKE_DEFS_FILE $CHOMBO_HOME/mk/Make.defs.local
make -j 4 AMRTimeDependent AMRTools BaseTools BoxTools $BUILD_ARGS
working-directory: ${{ env.CHOMBO_HOME }}
- name: Build GRChombo Tests (3D)
if: matrix.DIM == 3
# We don't want to run the 2D apparent horizon finder test here
run: |
rm -rf Tests/ApparentHorizonFinderTest2D
make test -j 4 $BUILD_ARGS
working-directory: ${{ github.workspace }}/GRChombo
- name: Run GRChombo Tests (3D)
if: matrix.DIM == 3
run: make run -j 2 $BUILD_ARGS
working-directory: ${{ github.workspace }}/GRChombo
- name: Build GRChombo Tests (2D)
if: matrix.DIM == 2
run: make test -j 4 $BUILD_ARGS
# Only 2D test is apparent horizon finder test
working-directory: ${{ github.workspace }}/GRChombo/Tests/ApparentHorizonFinderTest2D
- name: Run GRChombo Tests (2D)
if: matrix.DIM == 2
run: make run -j 2 $BUILD_ARGS
# Only 2D test is apparent horizon finder test
working-directory: ${{ github.workspace }}/GRChombo/Tests/ApparentHorizonFinderTest2D