forked from jupp0r/prometheus-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.97 KB
/
bazel-ci.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
name: Bazel CI
on: [push, pull_request]
jobs:
build:
name: Bazel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
include:
- os: macOS-latest
bazel_args: "--cxxopt=-std=c++14"
- os: ubuntu-latest
bazel_args: "--cxxopt=-std=c++14"
- os: windows-latest
bazel_args: "--cxxopt=/std:c++14"
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Generate German locale on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt-get remove -y --purge man-db # avoid time-consuming trigger
sudo apt-get update
sudo apt-get install -y locales
sudo locale-gen de_DE.UTF-8 # used by SerializerTest
- name: Install telegraf on Ubuntu
if: runner.os == 'Linux'
run: |
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/lsb-release
echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
sudo apt-get update
sudo apt-get install -y telegraf
- name: Install telegraf on macOS
if: runner.os == 'macOS'
run: brew install telegraf
- name: Build with SSL
run: bazel build --config=ssl ${{ matrix.bazel_args }} //...
- name: Test with SSL
run: bazel test --config=ssl ${{ matrix.bazel_args }} --test_output=all //...
- name: Build
run: bazel build ${{ matrix.bazel_args }} //...
- name: Test
run: bazel test ${{ matrix.bazel_args }} --test_output=all //...
- name: Scraping Test
if: runner.os != 'Windows'
run: bazel test ${{ matrix.bazel_args }} --test_output=all //pull/tests/integration:scrape-test
- name: Benchmark
run: bazel run ${{ matrix.bazel_args }} -c opt //core/benchmarks