Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
300 commits
Select commit Hold shift + click to select a range
cd4728b
add include
michenicholas Aug 26, 2019
a0d7c52
Merge pull request #300 from michenicholas/readme-fix
gjasny Aug 27, 2019
1bf46d4
core: hide builder, family, and registry implementation
gjasny Aug 31, 2019
538ed3a
Add (shared) library versioning
gjasny Aug 31, 2019
b6a1b4c
Implement symbol visibility build system agnostic
gjasny Aug 31, 2019
20475b3
cmake: Put DLLs and binaries into same directory
gjasny Aug 31, 2019
5f443f1
Use github actions
gjasny Sep 22, 2019
3667f3e
core: Do not run locale test on Windows
gjasny Sep 26, 2019
26ce7bc
Strip down Travis CI file
gjasny Sep 26, 2019
05f5b89
Merge pull request #247 from jupp0r/symbol-visibility
gjasny Oct 17, 2019
815bfb9
chore(bazel): Use local_defines instead of copts
gjasny Oct 17, 2019
203f7f6
chore(bazel): Use True / False in boolean context
gjasny Oct 17, 2019
c216ae7
chore(clang-format): Format everything
gjasny Oct 17, 2019
c54cb06
chore(buildifier): Format everything
gjasny Oct 17, 2019
6ea1e11
Merge pull request #306 from jupp0r/use-bazel-local-defines
gjasny Oct 18, 2019
70a1cfd
Merge pull request #305 from jupp0r/code-format
gjasny Oct 18, 2019
b68155a
chore: Simplify external templates
gjasny Oct 18, 2019
1d844b6
Merge pull request #307 from jupp0r/simplify-external-templates
gjasny Oct 18, 2019
5a3ee66
fix(symbols): Fix Windows and Bazel symbol visibility
gjasny Oct 18, 2019
ae5f98d
Use civetweb snapshot
gjasny Oct 18, 2019
51c7110
Merge pull request #308 from jupp0r/cmake-visibilities
gjasny Oct 19, 2019
444a7a9
Merge pull request #302 from gjasny/use-github-actions
jupp0r Oct 22, 2019
c57ae57
fix(core): Make registry insert behavior configurable
gjasny Oct 25, 2019
7ad4101
chore(doc): Add GitHub CI badge
gjasny Oct 25, 2019
8b5b03c
Merge pull request #286 from jupp0r/merge-same-families
gjasny Oct 25, 2019
ca1f346
Merge pull request #310 from jupp0r/update-badges
gjasny Oct 25, 2019
6452860
chore(bazel): Use maybe function from bazel_tools
gjasny Oct 29, 2019
01d635e
chore(bazel): curl must not expect stropts.h header on Linux
gjasny Oct 29, 2019
b9225b3
chore(curl): Use curl 7.66.0
gjasny Oct 29, 2019
1533c14
chore(bazel): Move repositories.bzl to bazel subdir
gjasny Oct 29, 2019
5898636
Merge pull request #311 from jupp0r/modernize-bazel
gjasny Oct 29, 2019
bfeb345
feat(coverage): Use GitHub Actions for code coverage
gjasny Nov 1, 2019
d8db181
fix(ci): Also build with Bazel on Windows
gjasny Nov 1, 2019
85dd692
Merge pull request #312 from jupp0r/github-ci-coverage
gjasny Nov 1, 2019
3467fb4
Merge pull request #313 from jupp0r/bazel-windows
gjasny Nov 1, 2019
ca0b1e5
feat(core): Improve family.cc coverage
gjasny Nov 1, 2019
f2a296e
feat(core): Improve text_serializer.cc coverage
gjasny Nov 1, 2019
0152d14
Merge pull request #314 from jupp0r/improve-code-coverage
gjasny Nov 3, 2019
2be75c5
fix(core): Properly serialize newlines in label values
gjasny Nov 3, 2019
b551b54
fix(coverage): Use Ubuntu 16.04 for coverage
gjasny Nov 3, 2019
72bdc9e
Merge pull request #317 from jupp0r/use-ubuntu-16.04-for-coverage
gjasny Nov 3, 2019
9d23683
Merge pull request #315 from jupp0r/fix-value-escape
gjasny Nov 3, 2019
582dbb0
feat(core): Improve text_serializer.cc coverage
gjasny Nov 3, 2019
11c452a
Merge pull request #316 from jupp0r/improve-coverage-some-more
gjasny Nov 3, 2019
a9cb9e7
chore(dependencies): Update Google Benchmark and Test to latest release
gjasny Nov 3, 2019
5310aad
Merge pull request #318 from jupp0r/bump-dependency-versions
gjasny Nov 4, 2019
9ba908d
fix(github): Use macos-latest
gjasny Nov 7, 2019
60eaa4e
Merge pull request #319 from jupp0r/actions-macos-latest
gjasny Nov 7, 2019
9bb4e20
Fix submodule checkout
gjasny Dec 19, 2019
b0d69c1
Merge pull request #324 from jupp0r/fix-submodule-checkout
gjasny Dec 19, 2019
36e08fa
Fix coverage
jupp0r Dec 19, 2019
d5df27d
Merge pull request #325 from jupp0r/feature/fix-coveralls-on-branch
jupp0r Dec 19, 2019
7b63978
Make Collect methods const (#323)
BenjaminW3 Dec 20, 2019
3ec526a
Update Bazel build instructions (#326)
gjasny Dec 26, 2019
7a4b529
Avoid copying the histogram metric buckets. (#331)
dgavedissian Jan 30, 2020
023c93e
Include missing <ostream>
Cheney-W Feb 11, 2020
6825470
chore: Use libcurl 7.68.0
gjasny Feb 12, 2020
fbf3244
Merge pull request #335 from jupp0r/use-curl-7.68.0
gjasny Feb 12, 2020
3018a51
feat(pull): Add getter for listening ports
gjasny Feb 12, 2020
c81eca3
Merge pull request #336 from jupp0r/exposer-listening-ports
gjasny Feb 14, 2020
8697b34
CMake: Add support for Debian and RPM package generation
sbates130272 Feb 28, 2020
a80e534
Add cpack configuration and readme
gjasny Feb 29, 2020
62d673f
feat(core): Expect working German locale
gjasny Feb 29, 2020
ceb2271
Merge pull request #341 from jupp0r/expect-working-locale
gjasny Feb 29, 2020
fca9c7e
Merge pull request #340 from jupp0r/cmake-cpack
gjasny Feb 29, 2020
9463d7b
fix(cmake): Explicitly initialize package version for older cmake
gjasny Mar 1, 2020
9effb90
Merge pull request #343 from jupp0r/package-version
gjasny Mar 2, 2020
5c771de
core: Skip serialization test if locale is not available
gjasny Mar 13, 2020
3bb04e5
Merge pull request #347 from jupp0r/skip-serialization-test
gjasny Mar 13, 2020
d217a88
chore(push): Update curl to 7.69.1
gjasny Mar 15, 2020
2c24584
Merge pull request #348 from jupp0r/update-curl-to-7.69.1
gjasny Mar 16, 2020
09d36a5
ci: use vcpkg for external dependencies
gjasny Mar 16, 2020
4fccb21
Merge pull request #351 from jupp0r/use-vcpkg
gjasny Mar 17, 2020
c06e0ef
pull: Add support for https and client certificates
gjasny Mar 16, 2020
8a88b14
Merge pull request #349 from jupp0r/client-certs
gjasny Mar 18, 2020
23d67fd
chore: Use civetweb 1.12
gjasny Mar 18, 2020
89f1a52
Merge pull request #352 from jupp0r/use-civetweb-1.12
gjasny Mar 18, 2020
eef4b55
fix: Properly export civetweb object library
gjasny Mar 20, 2020
ad7438b
feat: Add project to test CMake export
gjasny Mar 20, 2020
1f63d0c
Merge pull request #353 from jupp0r/export-3rdparty-civetweb
gjasny Mar 20, 2020
fa6299d
chore: use imported CMake curl target
gjasny Mar 20, 2020
30326eb
Merge pull request #354 from jupp0r/use-curl-imported-target
gjasny Mar 20, 2020
05ad999
CMake: Fix directory permissions on installation
sbates130272 Apr 23, 2020
f13e809
Merge pull request #362 from sbates130272/stephen/fix-install-dir
gjasny Apr 25, 2020
82a0982
Add reason for setting CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
gjasny Apr 25, 2020
06b1fe0
doc: Add brief instructions how to consume
gjasny Apr 25, 2020
22a8f08
ci: Fix documentation generation
gjasny Apr 25, 2020
6dd2c7c
doc: Use README.md as mainpage
gjasny Apr 25, 2020
4ee54a1
chore(pull): refactor collection code into metrics_collector
gjasny Apr 25, 2020
dcd6c0a
Merge pull request #363 from jupp0r/metrics-collector
gjasny Apr 27, 2020
538e9d6
ci: Use preinstalled Bazel
gjasny May 13, 2020
82ecd18
Merge pull request #366 from jupp0r/use-preinstalled-bazel
gjasny May 13, 2020
cc282f9
Add support for serving multiple paths
jameseh96 Apr 30, 2020
8b45141
Extend existing exposer interface
gjasny May 25, 2020
6f62ed4
Merge pull request #369 from jupp0r/jameseh96-multiple_endpoints
gjasny May 28, 2020
5e1cfe7
Add base64 encoding/decoding dependency
jameseh96 Jun 3, 2020
498c3c9
Add support for HTTP Basic Auth on scraping endpoints
jameseh96 Jun 4, 2020
4fc553e
Use header-only cppcodec lib and fix build
gjasny Jun 7, 2020
3a8ed55
Merge pull request #374 from jupp0r/jameseh96-authv2
gjasny Jun 7, 2020
d1f0eb1
chore(bazel): Use Google Benchmark 1.5.1
gjasny Jun 23, 2020
de66b57
Merge pull request #381 from jupp0r/google-benchmark-1.5.1
gjasny Jun 23, 2020
2501c04
Avoid race when registering a collectable
mlsna Sep 10, 2020
cfe7f64
Reuse curl handle
Sep 18, 2020
acb9003
Use indirection to avoid curl include
Sep 19, 2020
0866297
Fix coverage from forks (#391)
jupp0r Sep 23, 2020
7175a1b
Use mutex to protect http operation
Sep 25, 2020
33344cd
ci: require fixed bazel version
gjasny Sep 27, 2020
9bff8eb
Merge pull request #395 from jupp0r/work-around-bazelisk-rate-limiting
gjasny Sep 27, 2020
d0e1056
core: Explicitly link against libatomic when needed
gjasny Sep 27, 2020
0696e52
Merge pull request #397 from jupp0r/check-for-libatomic
gjasny Sep 27, 2020
2470fa8
Merge pull request #393 from technicianted/better_curl
gjasny Sep 27, 2020
823b406
formatting
gjasny Sep 27, 2020
9012fab
push: slightly refactor gateway
gjasny Sep 27, 2020
07adeeb
Merge pull request #398 from jupp0r/technicianted-better_curl
gjasny Sep 28, 2020
bf7b755
chore: Use google-benchmark 1.5.2
gjasny Oct 1, 2020
0a912f7
chore: Use curl 1.72.0
gjasny Oct 1, 2020
6e336ec
chore: Use civetweb 1.13
gjasny Oct 1, 2020
d68ddc2
Merge pull request #390 from mlsna/fix-collectables-race
gjasny Oct 1, 2020
3ecb461
Merge pull request #399 from jupp0r/update-thirdparty-deps
gjasny Oct 1, 2020
fc7870b
chore: Use Bazel 3.5.1
gjasny Oct 1, 2020
62897f9
chore: Raise version to v0.10.0 due to changed public interface
gjasny Oct 1, 2020
bf9d2e1
fix(cmake): Fix warning in CheckAtomic
gjasny Oct 2, 2020
4fd01d5
Merge pull request #402 from jupp0r/fix-warning-in-atomics-check
gjasny Oct 2, 2020
9aae240
ci: use latest bazel
gjasny Oct 17, 2020
cd0ba08
push: use curl 7.73.0
gjasny Oct 17, 2020
f42e9b9
packaging: Add shlib generation.
davidlenfesty Oct 21, 2020
511cd20
Merge pull request #405 from davidlenfesty/gen-shlibs
gjasny Oct 22, 2020
6a5b373
Merge pull request #404 from jupp0r/upgrade-used-software
gjasny Oct 22, 2020
054b49b
core: allow logically negative gauge increments and decrements
gjasny Nov 1, 2020
efce85d
Use a gauge for the histogram sum
Neverlord Jul 3, 2020
6d86e2d
core: Add test for negative observed histogram value
gjasny Nov 1, 2020
250deb5
Merge pull request #406 from jupp0r/histogram-negative-sum
gjasny Nov 1, 2020
01c11d5
Fix insufficiently precise value rendering
jupp0r Nov 6, 2020
ce07a38
feat: allow selection of MSVC runtime library
gjasny Nov 11, 2020
8051348
chore: use max_digits10 instead of magic number
gjasny Nov 15, 2020
82088c9
Merge pull request #411 from jupp0r/msvc-runtime-library
gjasny Nov 15, 2020
1669f8c
Merge pull request #408 from jupp0r/bugfix/increase-floating-point-te…
gjasny Nov 15, 2020
f407889
build: Bump library interface due to changes Histogram class
gjasny Nov 15, 2020
72b4d19
pull: work-around missing winsock lib in civetweb
gjasny Nov 15, 2020
a816b16
Merge pull request #412 from jupp0r/add-imported-winsock
gjasny Nov 15, 2020
27c3d67
Merge pull request #413 from jupp0r/bump-version
gjasny Nov 15, 2020
bb017ec
pull: Use internal base64 decoding function to avoid dependency (#417)
gjasny Nov 23, 2020
d841f00
core: enforce proper metric and label names
gjasny Dec 13, 2020
1101626
pull: do not export BasicAuthHandler
gjasny Dec 13, 2020
4cc099e
Merge pull request #426 from jupp0r/family-names
gjasny Dec 14, 2020
fbe225c
Merge pull request #427 from jupp0r/do-not-export-BasicAuthHandler
gjasny Dec 14, 2020
acab56c
chore: re-format with clang-format 11
gjasny Dec 14, 2020
b15f388
chore: re-format with buildifier 3.5.0
gjasny Dec 14, 2020
813a444
chore: remove extra block
gjasny Dec 14, 2020
fa49acc
pull: Remove expired weak pointers to avoid leak
gjasny Dec 14, 2020
c71ae77
push: Remove expired weak pointers to avoid leak
gjasny Dec 14, 2020
0b92ab7
Merge pull request #428 from jupp0r/format-with-clang-format-11
gjasny Dec 14, 2020
6b4ec6e
Merge pull request #429 from jupp0r/fix-leaking-weak-pointers
gjasny Dec 14, 2020
9638191
pull: Add integration test for exposer
gjasny Dec 14, 2020
87f93a1
pull: Work-around assertion and race-condition in auth handler
gjasny Dec 16, 2020
4061c10
Merge pull request #430 from jupp0r/exposer-integration-test
gjasny Dec 16, 2020
bd887da
pull: Add RemoveCollectable
Nov 17, 2020
b128da6
chore: Raise version to v0.12.0 due to changed public interface
gjasny Dec 17, 2020
12c5783
Merge pull request #432 from jupp0r/remove-collectable
gjasny Dec 17, 2020
eb06094
ci: Run bazel from separate workflow
gjasny Dec 23, 2020
75bfdb1
Merge pull request #433 from jupp0r/separate-bazel-ci
gjasny Dec 23, 2020
caaf890
ci: Make CMake workflow more fine-grained
gjasny Dec 23, 2020
17ef02a
Merge pull request #434 from jupp0r/separate-cmake-ci-retry
gjasny Dec 24, 2020
fda05ed
pull: Add better example
gjasny Dec 26, 2020
8e02f8f
ci: Make Coverage workflow more fine-grained
gjasny Dec 26, 2020
928a347
Merge pull request #436 from jupp0r/modernize-coverage
gjasny Dec 26, 2020
eae8087
pull: test authentication and compression
gjasny Dec 26, 2020
114f756
pull: don't set auth handler to nullptr to avoid civetweb bug
gjasny Dec 26, 2020
b8db5e4
pull: don't trigger failing authentication due to civetweb/civetweb#954
gjasny Dec 26, 2020
85e4aff
Merge pull request #437 from jupp0r/improve-code-coverage-for-pull
gjasny Dec 27, 2020
58dbe78
ci: use lcov for coverage
gjasny Dec 27, 2020
2169948
Merge pull request #438 from jupp0r/use-lcov-for-coverage
gjasny Dec 27, 2020
b57ad1d
ci: Use GitHub Actions to deploy documentation
gjasny Dec 27, 2020
07a30cb
Merge pull request #439 from jupp0r/github-actions-for-doxygen
gjasny Dec 27, 2020
3c5d3c5
pull: improve code coverage
gjasny Dec 27, 2020
767e862
Merge pull request #440 from jupp0r/improve-code-coverage-part2
gjasny Dec 27, 2020
e0cc7b5
Added missing include
Jan 4, 2021
8a74501
Merge pull request #442 from LesnyRumcajs/add-missing-include
gjasny Jan 5, 2021
da316fc
ci: Add workflow to create tarball including submodules
gjasny Jan 5, 2021
bf0ddfc
fix: use printf %g or std::to_chars to serialize doubles
gjasny Jan 9, 2021
a8bbb7f
Merge pull request #444 from jupp0r/use-printf-g-format
gjasny Jan 31, 2021
7cfaf09
Merge pull request #443 from jupp0r/release-submodules
gjasny Jan 31, 2021
af84494
Merge pull request #435 from jupp0r/improve-example
gjasny Jan 31, 2021
6929e34
chore: start prometheus-cpp 0.12.1 development cycle
gjasny Feb 5, 2021
5814187
core: Fix usage of std::to_chars
gjasny Feb 5, 2021
38130ae
Merge pull request #453 from jupp0r/fix-std-tochars
gjasny Feb 5, 2021
a099430
Add conan reference to readme
Fefer-Ivan Feb 10, 2021
b54cd07
Merge pull request #454 from Fefer-Ivan/add-conan-to-readme
gjasny Feb 11, 2021
f448b2c
feat(iwyu): Organize includes with include-what-you-use
gjasny Mar 3, 2021
fe4f437
Merge pull request #458 from jupp0r/iwyu
gjasny Mar 3, 2021
5699348
feat(cmake): Generate pkg-config files
gjasny Feb 4, 2021
77a5b01
Merge pull request #460 from jupp0r/pkgconfig
gjasny Mar 5, 2021
d095854
ci: Add clang-format linting (#464)
gjasny Mar 8, 2021
77b06a8
core: reject duplicate label names (#463)
gjasny Mar 8, 2021
1d36d42
core: Replace name check regex (#462)
gjasny Mar 8, 2021
fdb1a74
chore: prepare prometheus-cpp 0.12.2
gjasny Mar 9, 2021
5b465a4
pull: Announce utf-8 content encoding
gjasny Mar 9, 2021
2412990
core: avoid collecting empty metric families
gjasny Mar 9, 2021
a1c9b1d
push: Always use POST (regardless of body presence)
gjasny Mar 21, 2021
d3875d2
chore: use curl 7.76.0
gjasny Apr 6, 2021
76a3ebf
chore: use civetweb 1.14
gjasny Apr 6, 2021
8416888
Add CivetCallbacks to Exposer ctor
kuvaldini May 1, 2021
1e00fd6
core: add method to query family if metric exists (#482)
wose May 3, 2021
736f734
CMakeLists: Change cmake min version to 3.14
amaier17 May 7, 2021
8e74a80
pull: Prevent ABI break due to #479
gjasny May 9, 2021
839379b
chore: use curl 7.76.1
gjasny May 9, 2021
37d7a5c
chore: use google benchmark 1.5.3
gjasny May 9, 2021
3d24cf1
pull: Install header files for embedded civetweb
gjasny May 9, 2021
8438882
Prepare v0.12.3 release
gjasny May 9, 2021
7ebc0d2
fix make_unique
pavel-pimenov May 1, 2021
91c4d5a
Update handler.cc
pavel-pimenov May 8, 2021
722d8d0
Update handler.cc
pavel-pimenov May 9, 2021
5522e6f
Make summary quantiles non-const (#493)
jupp0r May 14, 2021
2ef7d1f
Add const/reserve (#495)
pavel-pimenov May 15, 2021
baa6904
chore: update googletest and curl
gjasny Jun 14, 2021
8400b64
chore: add missing include for iwyu
gjasny Jun 14, 2021
7b616c0
ci: select proper test configuration
gjasny Jul 21, 2021
aa17f5e
chore: update curl and Google Benchmark
gjasny Jul 21, 2021
952c6bc
ci: Run iwyu 8.16 from Debian Experimental
gjasny Jul 21, 2021
9e264c4
feat(pull): Use civetweb 1.15
gjasny Sep 2, 2021
8b67e5f
docs: update Readme
gjasny Sep 9, 2021
70a930f
chore: Use Google Benchmark 1.6.0
gjasny Sep 9, 2021
f9597c7
chore(pull): Use civetweb 1.15
gjasny Sep 9, 2021
03f30b6
ci: iwyu entered Debian Sid
gjasny Sep 9, 2021
95ea1a3
chore: prepare 0.13.0 release
gjasny Sep 9, 2021
342de5e
fix(core): Locale-independent floating-point serialization
ashish-250 Sep 9, 2021
1a66113
fix(readme): update the link to the cmake example
ylz-at Sep 21, 2021
722fbcf
fix: there is a race condition when pushing and collecting histogram …
twynantst Oct 14, 2021
ddf7083
Rule of Five applied on Gateway, avoid unnecessary copies of std::string
sjanel Nov 7, 2021
755f842
fix(clang-tidy): Fix errors detected by clang-tidy
gjasny Nov 11, 2021
f35499b
chore(clang-tidy): Fix modernize-use-override
gjasny Nov 11, 2021
a3e4d42
chore(clang-tidy): Fix cppcoreguidelines-special-member-functions
gjasny Nov 11, 2021
1d4e464
docs(core): Document atomic increment
gjasny Nov 12, 2021
e5598fb
chore(push): Use curl 7.80.0
gjasny Nov 12, 2021
556d4ed
docs: Prepare for 1.0.0 release
gjasny Nov 12, 2021
b6615c7
fix(pull): Properly lock Exposer functions
gjasny Nov 12, 2021
882fec9
chore(push): Refactored curl_wrapper
gjasny Nov 12, 2021
7aaecba
fix(push): Lock access to collectables_
gjasny Nov 12, 2021
1b01f36
fix(core): gracefully handle label hash collisions
gjasny Nov 12, 2021
3202b37
feat(core)!: remove nonstandard append mode
gjasny Nov 14, 2021
91dd416
chore(core): Introduce Labels type
gjasny Nov 14, 2021
d8b3aa9
feat(core): Allow to remove a Family from their Registry
gjasny Nov 13, 2021
207139d
fix(push): remove unused variable
gjasny Nov 15, 2021
4ea303f
feat(push): Add method to delete metrics for instance
gjasny Nov 16, 2021
8f874d4
fix(push): Allow POST empty data
anatoly-p Feb 7, 2022
7817761
chore(push): Use curl 7.82.0
gjasny Mar 5, 2022
d2c9d38
chore: Use Google Benchmark 1.6.1
gjasny Mar 5, 2022
2ad3490
Merge branch 'master' of https://github.com/jupp0r/prometheus-cpp int…
ljbade Mar 23, 2022
d3847e5
Fix unused errors
ljbade Mar 24, 2022
4605b03
Run IWYU
ljbade Mar 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/bazel-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Bazel CI
on: [push, pull_request]

jobs:
build:
name: Bazel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-20.04, windows-2019]
steps:
- name: Checkout source
uses: actions/checkout@v2

- 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
run: bazel build //...

- name: Test
run: bazel test --test_output=all //core/... //pull/...

- name: Scraping Test
if: runner.os != 'Windows'
run: bazel test --test_output=all //pull/tests/integration:scrape-test

- name: Benchmark
run: bazel run -c opt //core/benchmarks
133 changes: 133 additions & 0 deletions .github/workflows/cmake-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: CMake CI
on: [push, pull_request]

jobs:
build:
name: CMake on ${{ matrix.os }} with ${{ matrix.dependencies }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-18.04, windows-2016]
dependencies: [submodule, vcpkg]
steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Checkout submodules
if: matrix.dependencies == 'submodule'
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1

- name: Mount vcpkg cache
if: matrix.dependencies == 'vcpkg'
uses: actions/cache@v2
with:
path: "~/.cache/vcpkg/archives"
key: vcpkg-${{ matrix.os }}

- name: Install vcpkg dependencies
if: matrix.dependencies == 'vcpkg'
run: vcpkg install benchmark civetweb curl[core] gtest zlib

- 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 ninja on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt-get install -y ninja-build

- name: Install ninja on macOS
if: runner.os == 'macOS'
run: brew install ninja

- name: "Configure for Unix with internal dependencies"
if: matrix.dependencies == 'submodule' && runner.os != 'Windows'
run: cmake -DUSE_THIRDPARTY_LIBRARIES=ON -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/_install -DENABLE_WARNINGS_AS_ERRORS=ON -DENABLE_COMPRESSION=OFF -DENABLE_PUSH=OFF -DCMAKE_DEBUG_POSTFIX=_d -DCMAKE_CONFIGURATION_TYPES='Release;Debug' -G"Ninja Multi-Config" -S ${{ github.workspace }} -B ${{ github.workspace }}/_build

- name: "Configure for Windows with internal dependencies"
if: matrix.dependencies == 'submodule' && runner.os == 'Windows'
run: cmake -DUSE_THIRDPARTY_LIBRARIES=ON -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/_install -DENABLE_WARNINGS_AS_ERRORS=ON -DENABLE_COMPRESSION=OFF -DENABLE_PUSH=OFF -DCMAKE_DEBUG_POSTFIX=_d -S ${{ github.workspace }} -B ${{ github.workspace }}/_build

- name: "Configure for Unix with vcpkg dependencies"
if: matrix.dependencies == 'vcpkg' && runner.os != 'Windows'
run: cmake -DUSE_THIRDPARTY_LIBRARIES=OFF -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/_install "-DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" -DCMAKE_DEBUG_POSTFIX=_d -DCMAKE_CONFIGURATION_TYPES='Release;Debug' -G"Ninja Multi-Config" -S ${{ github.workspace }} -B ${{ github.workspace }}/_build

- name: "Configure for Windows with vcpkg dependencies"
if: matrix.dependencies == 'vcpkg' && runner.os == 'Windows'
run: cmake -DUSE_THIRDPARTY_LIBRARIES=OFF -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/_install "-DCMAKE_TOOLCHAIN_FILE=${Env:VCPKG_INSTALLATION_ROOT}\scripts\buildsystems\vcpkg.cmake" -DCMAKE_DEBUG_POSTFIX=_d -S ${{ github.workspace }} -B ${{ github.workspace }}/_build

- name: "Build Debug"
run: cmake --build ${{ github.workspace }}/_build --config Debug

- name: "Build Release"
run: cmake --build ${{ github.workspace }}/_build --config Release

- name: "Test Debug"
run: ctest -C Debug -V -LE Benchmark
working-directory: "${{ github.workspace }}/_build"

- name: "Test Release"
run: ctest -C Release -V -LE Benchmark
working-directory: "${{ github.workspace }}/_build"

- name: "Run Benchmark"
run: ctest -C Release -V -L Benchmark
working-directory: "${{ github.workspace }}/_build"

- name: "Install Debug"
run: cmake --install ${{ github.workspace }}/_build --config Debug

- name: "Install Release"
run: cmake --install ${{ github.workspace }}/_build --config Release

- name: "Configure CMake import for Unix with internal dependencies"
if: matrix.dependencies == 'submodule' && runner.os != 'Windows'
run: cmake -Dprometheus-cpp_DIR=${{ github.workspace }}/_install/lib/cmake/prometheus-cpp -DCMAKE_CONFIGURATION_TYPES='Release;Debug' -G"Ninja Multi-Config" -S ${{ github.workspace }}/cmake/project-import-cmake -B ${{ github.workspace }}/_import_cmake

- name: "Configure CMake import for Windows with internal dependencies"
if: matrix.dependencies == 'submodule' && runner.os == 'Windows'
run: cmake -Dprometheus-cpp_DIR=${{ github.workspace }}/_install/lib/cmake/prometheus-cpp -S ${{ github.workspace }}/cmake/project-import-cmake -B ${{ github.workspace }}/_import_cmake

- name: "Configure CMake import for Unix with vcpkg dependencies"
if: matrix.dependencies == 'vcpkg' && runner.os != 'Windows'
run: cmake -Dprometheus-cpp_DIR=${{ github.workspace }}/_install/lib/cmake/prometheus-cpp "-DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" -DCMAKE_CONFIGURATION_TYPES='Release;Debug' -G"Ninja Multi-Config" -S ${{ github.workspace }}/cmake/project-import-cmake -B ${{ github.workspace }}/_import_cmake

- name: "Configure CMake import for Windows with vcpkg dependencies"
if: matrix.dependencies == 'vcpkg' && runner.os == 'Windows'
run: cmake -Dprometheus-cpp_DIR=${{ github.workspace }}/_install/lib/cmake/prometheus-cpp "-DCMAKE_TOOLCHAIN_FILE=${Env:VCPKG_INSTALLATION_ROOT}\scripts\buildsystems\vcpkg.cmake" -S ${{ github.workspace }}/cmake/project-import-cmake -B ${{ github.workspace }}/_import_cmake

- name: "Build CMake import Debug"
run: cmake --build ${{ github.workspace }}/_import_cmake --config Debug

- name: "Build CMake import Release"
run: cmake --build ${{ github.workspace }}/_import_cmake --config Release

- name: "Configure for Unix Shared Libs with internal dependencies"
if: matrix.dependencies == 'submodule' && runner.os != 'Windows'
run: cmake -DUSE_THIRDPARTY_LIBRARIES=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/_install_shared -DENABLE_WARNINGS_AS_ERRORS=ON -DENABLE_COMPRESSION=OFF -DENABLE_PUSH=OFF -DCMAKE_DEBUG_POSTFIX=_d -GNinja -S ${{ github.workspace }} -B ${{ github.workspace }}/_build_shared

- name: "Build for Unix Shared Libs"
if: matrix.dependencies == 'submodule' && runner.os != 'Windows'
run: cmake --build ${{ github.workspace }}/_build_shared

- name: "Install for Unix Shared Libs"
if: matrix.dependencies == 'submodule' && runner.os != 'Windows'
run: cmake --install ${{ github.workspace }}/_build_shared

- name: "Configure pkg-config import for Unix"
if: matrix.dependencies == 'submodule' && runner.os != 'Windows'
run: cmake -DCMAKE_PREFIX_PATH=${{ github.workspace }}/_install_shared -GNinja -S ${{ github.workspace }}/cmake/project-import-pkgconfig -B ${{ github.workspace }}/_import_pkgconfig

- name: "Build pkg-config import for Unix"
if: matrix.dependencies == 'submodule' && runner.os != 'Windows'
run: cmake --build ${{ github.workspace }}/_import_pkgconfig
60 changes: 60 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Coverage
on: [push, pull_request]

jobs:
build:
name: Code Coverage
runs-on: ubuntu-20.04
steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Mount vcpkg cache
uses: actions/cache@v2
with:
path: "~/.cache/vcpkg/archives"
key: vcpkg-${{ runner.os }}

- name: Install vcpkg dependencies
run: vcpkg install benchmark civetweb curl[core] gtest zlib

- 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 ninja on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt-get install -y ninja-build

- name: Install lcov
if: runner.os == 'Linux'
run: |
sudo apt-get install -y lcov

- name: "CMake Configure for Unix with vcpkg dependencies"
env:
CFLAGS: "--coverage"
CXXFLAGS: "--coverage"
LDFLAGS: "--coverage"
run: cmake -DUSE_THIRDPARTY_LIBRARIES=OFF "-DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" -GNinja -S ${{ github.workspace }} -B ${{ github.workspace }}/_build

- name: Build
run: cmake --build ${{ github.workspace }}/_build

- name: Test
run: ctest -V -LE Benchmark
working-directory: "${{ github.workspace }}/_build"

- name: Run lcov
run: lcov --capture --directory "${{ github.workspace }}/_build" --output-file coverage.info --no-external --directory "${{ github.workspace }}" --exclude '*/tests/*'

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.info
30 changes: 30 additions & 0 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Doxygen
on:
push:
branches:
- master

jobs:
build:
name: Code Coverage
runs-on: ubuntu-20.04
steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Install doxygen
run: |
sudo apt-get remove -y --purge man-db # avoid time-consuming trigger
sudo apt-get update
sudo apt-get install -y doxygen graphviz

- name: Generate doxygen
run: doxygen
working-directory: "${{ github.workspace }}/doc"

- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true
publish_dir: ./doc/html
58 changes: 58 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Linting
on: [push, pull_request]

jobs:
iwyu:
name: Include What You Use
runs-on: ubuntu-latest
container:
image: debian:sid-slim
steps:
- name: Install dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends ca-certificates clang-12 cmake git iwyu libbenchmark-dev libcurl4-openssl-dev ninja-build zlib1g-dev

- name: Checkout source
uses: actions/checkout@v2

- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1

- name: "CMake Configure"
run: cmake -GNinja -DRUN_IWYU=ON -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -S ${GITHUB_WORKSPACE} -B ${GITHUB_WORKSPACE}/_build

- name: Build
run: cmake --build ${GITHUB_WORKSPACE}/_build 2>&1 | tee ${GITHUB_WORKSPACE}/output.txt

- name: Check build output
run: if egrep -q 'should (add|remove) these lines' ${GITHUB_WORKSPACE}/output.txt; then exit 1; fi

#- name: "CMake Configure"
# run: cmake -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -S ${GITHUB_WORKSPACE} -B ${GITHUB_WORKSPACE}/_build

#- name: "Run IWYU"
# run: iwyu_tool -p ${GITHUB_WORKSPACE}/_build core push pull -- -Xiwyu --mapping_file=${GITHUB_WORKSPACE}/cmake/googletest.imp -Xiwyu --no_fwd_decls 2>&1 | tee ${{ github.workspace }}/output.txt

format:
name: Clang Format
runs-on: ubuntu-20.04
steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get remove -y --purge man-db # avoid time-consuming trigger
sudo apt-get update
sudo apt-get install -y clang-format-11

- name: Run clang-format
run: find . -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.cxx' -o -name '*.o' -o -name '*.h' -o -name '*.hpp' -o -name '*.hxx' \) -exec clang-format-11 -style=file -i {} \;

- name: Check for changes
run: git diff --exit-code
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on:
release:
types: [created]

name: Handle Release

jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1

- name: Create tarball including submodules
shell: bash
env:
PREFIX: prometheus-cpp-with-submodules
run: |
git archive --prefix "${PREFIX}/" -o "${PREFIX}.tar" HEAD
git submodule foreach --recursive "git archive --prefix=${PREFIX}/\$path/ --output=\$sha1.tar HEAD && tar --concatenate --file=$(pwd)/${PREFIX}.tar \$sha1.tar && rm \$sha1.tar"
gzip "${PREFIX}.tar"

# using the official actions/upload-release-asset action would be preferred but is blocked by
# https://github.com/actions/upload-release-asset/pull/41
- name: Upload the artifacts
uses: skx/github-action-publish-binaries@75ce5546020fc1848da842f40240f9fa03e7a3a8 # release-0.14
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: prometheus-cpp-with-submodules.tar.gz
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bazel-*
/bazel-*
cmake-build-*/
_*/
.idea/
Expand Down
Loading