Skip to content

GitHub Actions: clang-format #21

GitHub Actions: clang-format

GitHub Actions: clang-format #21

Workflow file for this run

name: build-ubuntu
on:
pull_request:
push:
workflow_dispatch:
jobs:
clang-format:
strategy:
matrix:
os: [ubuntu-22.04]
runs-on: ${{matrix.os}}
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: install
working-directory: ${{runner.workspace}}/asgard
run: sudo apt install -y clang-format-12
- name: check
working-directory: ${{runner.workspace}}/asgard
run: ./testing/automated/clang-format-check.sh
build:
strategy:
matrix:
compiler: [clang++-14, g++-11]
os: [ubuntu-22.04]
runs-on: ${{matrix.os}}
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Makedir
working-directory: ${{runner.workspace}}/asgard
run: cmake -E make_directory build
- name: Configure
working-directory: ${{runner.workspace}}/asgard/build
run: cmake -DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_COMPILER=${{matrix.compiler}}
-DCMAKE_CXX_FLAGS="-Werror"
-DASGARD_RECOMMENDED_DEFAULTS=ON
../
- name: Build
working-directory: ${{runner.workspace}}/asgard/build
run: make -j VERBOSE=1
- name: Test
working-directory: ${{runner.workspace}}/asgard/build
run: make test
- name: Show Log
if: failure()
working-directory: ${{runner.workspace}}/asgard/build/Testing/Temporary
run: cat LastTest.log
build-mpi:
strategy:
matrix:
os: [ubuntu-22.04]
runs-on: ${{matrix.os}}
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: install
working-directory: ${{runner.workspace}}/asgard
run: sudo apt install -y libopenmpi-dev
- name: Makedir
working-directory: ${{runner.workspace}}/asgard
run: cmake -E make_directory build
- name: Configure
working-directory: ${{runner.workspace}}/asgard/build
run: cmake -DCMAKE_BUILD_TYPE=Release
-DASGARD_USE_MPI=ON
-DASGARD_RECOMMENDED_DEFAULTS=ON
../
- name: Build
working-directory: ${{runner.workspace}}/asgard/build
run: make -j VERBOSE=1
- name: Test
working-directory: ${{runner.workspace}}/asgard/build
run: make test
- name: Show Log
if: failure()
working-directory: ${{runner.workspace}}/asgard/build/Testing/Temporary
run: cat LastTest.log