-
Notifications
You must be signed in to change notification settings - Fork 14
43 lines (37 loc) · 1.25 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
name: Pandora CI
on: [ pull_request ]
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 ..