forked from ComputationalRadiationPhysics/redGrapes
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.55 KB
/
ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: 🐧 Ubuntu
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-ubuntu
cancel-in-progress: true
jobs:
build_gcc:
name: GCC
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
env:
CXXFLAGS: "-Wall -Wextra -Wshadow"
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
.github/workflows/dependencies/gcc.sh
- name: CCache Cache
uses: actions/cache@v2
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-openmp-cxxminimal-${{ hashFiles('.github/workflows/ubuntu.yml') }}-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
ccache-openmp-cxxminimal-${{ hashFiles('.github/workflows/ubuntu.yml') }}-
ccache-openmp-cxxminimal-
- name: build RedGrapes
run: |
cmake \
-S . \
-B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DBUILD_TESTING=ON \
-DredGrapes_BUILD_EXAMPLES=ON
cmake --build build -j 2
- name: test RedGrapes
run: |
ctest --test-dir build/test --output-on-failure