-
Notifications
You must be signed in to change notification settings - Fork 7
46 lines (41 loc) · 1.3 KB
/
main.yml
File metadata and controls
46 lines (41 loc) · 1.3 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
name: build
on: push
jobs:
ci:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
compiler: [gcc, clang]
steps:
- uses: actions/checkout@master
- name: Install
run: |
if [ "${{ matrix.compiler }}" = "gcc" ]; then
echo "::set-env name=CC::gcc"
echo "::set-env name=CXX::g++"
else
echo "::set-env name=CC::clang"
echo "::set-env name=CXX::clang++"
fi
sudo apt-get install lcov
- name: Unit test
run: |
mkdir -p build && cd build
cmake -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . -- -j2
ctest -j8
if [ "${{ matrix.compiler }}" = "gcc" ]; then
lcov --directory . --capture -o coverage.info
lcov --remove coverage.info -o coverage.info \
'*/tools/*' \
'*/tests/*' \
'*/usr/include/*'
bash <(curl -s https://codecov.io/bash)
fi
- name: Benchmark
run: |
mkdir -p build_benchmark && cd build_benchmark
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . -- -j2
./benchmark/lox_benchmark