-
Notifications
You must be signed in to change notification settings - Fork 14
49 lines (43 loc) · 1.32 KB
/
ci.yaml
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: Pandora CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- name: Install dependencies
run: |
sudo apt update && sudo apt install cmake
- name: Check out code for the build
uses: actions/checkout@v2
with:
submodules: recursive
# TODO: add format step back (last PR before release)
# - name: "Format"
# run: |
# find src/ include/ test/ -type f \( -iname \*.h -o -iname \*.cpp \) | xargs -I _ clang-format -style=file -output-replacements-xml _ | grep -c "<replacement " >/dev/null
# if [ $? -ne 1 ]; then echo "Not all source and header files are formatted with clang-format"; exit 1; fi
- name: Build and test release build
run: |
mkdir build_release && cd build_release
cmake -DCMAKE_BUILD_TYPE=Release -DHUNTER_JOBS_NUMBER=2 ..
make -j2
# ctest -V
./pandora --help
cd ..
- name: Build and test debug build
run: |
mkdir build_debug && cd build_debug
cmake -DCMAKE_BUILD_TYPE=Debug -DHUNTER_JOBS_NUMBER=2 ..
make -j2
# ctest -V
./pandora --help
cd ..