-
Notifications
You must be signed in to change notification settings - Fork 12
73 lines (71 loc) · 2.18 KB
/
build.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build and test
on: [pull_request]
jobs:
ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install boost, curl and lcov
run: |
sudo apt-get update
sudo apt-get install -yq libcurl4-openssl-dev libboost-system1.74-dev libboost-test1.74-dev libboost-program-options1.74-dev lcov
- name: Run CMake
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug
- name: Build project
run: cd build && make -j
- name: Test
run: cd build && ctest --output-on-failure
- name: Generate codecov report
run: |
cd build
set -x
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info '/opt/*' '/usr/*' --output-file coverage.info
lcov --list coverage.info
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: build/coverage.info
fail_ci_if_error: true
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install boost
run: brew install boost
- name: Run CMake
run: mkdir build && cd build && cmake ..
- name: Build project
run: cd build && make -j
- name: Test
run: cd build && ctest --output-on-failure
alma9:
runs-on: [self-hosted, alma9]
steps:
- uses: actions/checkout@v2
- name: CMake
run: mkdir build && cd build && source /opt/rh/gcc-toolset-12/enable && cmake ..
- name: Build
run: cd build && make -j 2
- name: Test
run: cd build && ctest --output-on-failure
cs8:
runs-on: [self-hosted, cs8]
steps:
- uses: actions/checkout@v2
- name: CMake
run: mkdir build && cd build && source /opt/rh/gcc-toolset-12/enable && cmake ..
- name: Build
run: cd build && make -j 2
- name: Test
run: cd build && ctest --output-on-failure
cc7:
runs-on: [self-hosted, cc7]
steps:
- uses: actions/checkout@v2
- name: CMake
run: mkdir build && cd build && source /opt/rh/devtoolset-9/enable && cmake3 ..
- name: Build
run: cd build && make -j 2
- name: Test
run: cd build && ctest3 --output-on-failure