forked from drwells/fiddle
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (91 loc) · 3.41 KB
/
Copy pathpush-pull.yml
File metadata and controls
91 lines (91 loc) · 3.41 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Pull/push
on:
# Trigger the workflow on push or pull request,
# but only when targeting the main branch
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_archlinux:
runs-on: ubuntu-latest
name: ci-archlinux
container:
image: 'docker://wellsd2/ibamr:ibamr-0.13.0-dealii-9.5.1'
env:
CCACHE_MAXSIZE: 100M
steps:
- name: Checkout Source
uses: actions/checkout@v3
with:
fetch-depth: 4
- name: Verify that clang-format was run
id: format
run: |
# This might be a GitHub bug, or something wrong with how I set up the
# docker container: git doesn't like how this directory is set up so
# override its security settings
git config --global --add safe.directory '*'
./scripts/download-clang-format
./scripts/check-indentation
- name: Create keys
id: keys
run: |
echo "key1=$(( ${{ github.run_number }} - 1))" >> $GITHUB_ENV
echo "key2=$(( ${{ github.run_number }} - 2))" >> $GITHUB_ENV
echo "key3=$(( ${{ github.run_number }} - 3))" >> $GITHUB_ENV
echo "key4=$(( ${{ github.run_number }} - 4))" >> $GITHUB_ENV
echo "key5=$(( ${{ github.run_number }} - 5))" >> $GITHUB_ENV
- name: Populate ccache
uses: actions/cache@v3
env:
cache-name: ccache
id: cache
with:
# this is the new default location (specified by XDG_CACHE_HOME)
path: ~/.cache/ccache
key: build-archlinux-${{ github.run_number }}
restore-keys: |
build-archlinux-${{ env.key1 }}
build-archlinux-${{ env.key2 }}
build-archlinux-${{ env.key3 }}
build-archlinux-${{ env.key4 }}
build-archlinux-${{ env.key5 }}
build-archlinux-
- name: Configure
id: configure
run: |
mkdir build
cd build
# The docker image sets -DDEBUG as a compile flag when compiling deal.II. Compilation
# flags aren't exported, just definitions set by deal.II itself. Hence we need to add
# it again here. Also assume full manual control over the flags set by deal.II in
# fiddle to ensure NDEBUG is not set.
cmake -DCMAKE_BUILD_TYPE=Release \
-DDEAL_II_ROOT=/deal.II/ \
-DFDL_IGNORE_DEPENDENCY_FLAGS=ON \
-DCMAKE_CXX_COMPILER_LAUNCHER=/usr/bin/ccache \
-DIBAMR_ROOT=/ibamr/ \
-DCMAKE_CXX_FLAGS="-O1 -DDEBUG -Wall -Wextra -Wpedantic -Werror -fopenmp -fuse-ld=mold" \
../
ccache --show-stats
- name: Compile library
id: compile-library
run: |
cd build
make VERBOSE=1 -j4
ccache --show-stats
- name: Compile tests
id: compile-tests
run: |
cd build
make -j4 tests
ccache --show-stats
- name: Run tests
id: run-tests
run: |
cd build
runuser -u build -- ./attest -j2 --verbose
ccache --show-stats