-
Notifications
You must be signed in to change notification settings - Fork 7
65 lines (52 loc) · 2.06 KB
/
ubuntu-monitoring.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
name: Monitoring
on:
push:
branches:
- main
pull_request:
jobs:
ubuntu-monitoring-build:
name: Build on Ubuntu with monitoring support
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [g++-11]
buildmode: [Debug]
build-prometheus-from-source: [0, 1]
steps:
- name: Checkout repository code
uses: actions/checkout@v2
- name: Prerequisites
run: |
sudo apt update && sudo apt install libcurl4-gnutls-dev ninja-build
- name: Install prometheus-cpp
run: |
git clone https://github.com/jupp0r/prometheus-cpp.git
cd prometheus-cpp
git submodule init
git submodule update
mkdir _build
cd _build
cmake .. -DBUILD_SHARED_LIBS=ON -DENABLE_PULL=OFF -DENABLE_PUSH=ON -DENABLE_COMPRESSION=OFF -DCMAKE_BUILD_TYPE=${{matrix.buildmode}} -DCMAKE_CXX_COMPILER=${{matrix.compiler}} -GNinja
ninja
ctest
sudo cmake --install .
if: matrix.build-prometheus-from-source == 0
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.buildmode}} -DCMAKE_CXX_COMPILER=${{matrix.compiler}} -DCCT_BUILD_PROMETHEUS_FROM_SRC=${{matrix.build-prometheus-from-source}} -GNinja
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: ninja
- name: Local Tests
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -j 2 -C ${{matrix.buildmode}} --output-on-failure --exclude-regex api_test
- name: Public API Tests # Tries several times to avoid random timeout errors not coming from coincenter
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -j 2 -C ${{matrix.buildmode}} --output-on-failure --tests-regex api_test --repeat until-pass:10