Skip to content

Commit f966cc9

Browse files
authored
Fix Conan installation in CI pipeline (#70)
This PR is fixing the CI workflow that is installing Conan package manager to grab the Prometheus-cpp dependency. Additionally it adds some step to save the built binary in the artifacts of the CI pipeline
1 parent c027908 commit f966cc9

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

.github/workflows/main.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ jobs:
1818
# install deps
1919
- uses: actions/checkout@v4
2020
- name: install debian-packaged dependencies
21-
run: sudo apt install -y libgtest-dev libbenchmark-dev libfmt-dev tidy git python3 python3-dateutil python3-pip
21+
run: sudo apt install -y libgtest-dev libbenchmark-dev libfmt-dev tidy git python3 python3-dateutil pipx
2222
- name: install pypi-packaged dependencies
23-
run: sudo pip3 install pytest 'black==22.8.0' 'conan==2.9.1'
23+
run: |
24+
sudo pip3 install pytest 'black==22.8.0'
25+
sudo pipx ensurepath
26+
sudo pipx install 'conan==2.14.0'
2427
2528
# NOTE: since we later run "make" using the normal "builder" user, we must use Conan using that same user (so avoid the "sudo"!!)
2629
- name: install Conan-packaged dependencies
2730
run: |
2831
conan profile detect --force
29-
conan remote update conancenter --url https://center2.conan.io
3032
conan install conanfile.txt --build=missing
3133
3234
# build & test
@@ -37,6 +39,14 @@ jobs:
3739
- name: run unit tests
3840
run: make test PROMETHEUS_SUPPORT=1
3941

42+
# save binary
43+
- name: save built binary
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: cmonitor, Linux x86_64, Prometheus Support
47+
path: collector/bin/glibc/cmonitor_collector
48+
if-no-files-found: error
49+
4050

4151
build_test_without_prometheus_support:
4252
runs-on: ubuntu-latest
@@ -55,6 +65,14 @@ jobs:
5565
- name: run unit tests
5666
run: make test PROMETHEUS_SUPPORT=0
5767

68+
# save binary
69+
- name: save built binary
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: cmonitor, Linux x86_64, No Prometheus Support
73+
path: collector/bin/glibc/cmonitor_collector
74+
if-no-files-found: error
75+
5876
# this step is useful to check that the Dockerfile still works fine
5977
alpine_docker_image_creation:
6078
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)