Skip to content

Commit 590f611

Browse files
author
Friedrich Meckel
committed
WIP: Add CI-job.
1 parent 2fb011a commit 590f611

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed

.gitlab-ci.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ os-matcher-app-build:
3333
- pip3 install conan
3434
- conan remote add -f ambrosys https://gl.ambrosys.de/api/v4/projects/356/packages/conan
3535
- conan user --remote ambrosys ci_user -p $CI_JOB_TOKEN
36+
- conan install . -s build_type=Release --install-folder=build -s compiler.libcxx=libstdc++11 -s compiler.cppstd=17 --build=missing
3637
script:
37-
- cmake -Bbuild -H. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DBUILD_LIBRARY=ON -DBUILD_DOCS=OFF
38+
- cmake -Bbuild -H. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DBUILD_LIBRARY=ON -DBUILD_EXAMPLES=ON -DBUILD_DOCS=OFF
3839
- ninja -C build test-if-git-HEAD-has-changed
3940
- ninja -C build install
4041
- build/install/bin/AmbRouter -h
@@ -64,6 +65,43 @@ unit-test:
6465
- merge_requests
6566
- external_pull_requests
6667

68+
.conan_deploy:
69+
stage: deploy
70+
needs: ["unit-test"]
71+
before_script:
72+
- |
73+
apt update \
74+
&& apt install -y cmake ninja-build python3-pip pv \
75+
&& rm -rf /var/lib/apt/lists/*
76+
- pip3 install conan
77+
- conan remote add -f ambrosys https://gl.ambrosys.de/api/v4/projects/356/packages/conan
78+
- conan user --remote ambrosys ci_user -p $CI_JOB_TOKEN
79+
script:
80+
- pkg_name=os-matcher
81+
- conan remove --force "$pkg_name/*" --src --builds --packages
82+
- conan remove --force "$pkg_name/*" --system-reqs
83+
- conan install . -s build_type=Release --install-folder=build -s compiler.libcxx=libstdc++11 -s compiler.cppstd=17 --build=missing
84+
- conan create . amb/stable --build $pkg_name --build outdated --test-folder .conan/test_package
85+
- if [[ $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH ]]; then conan upload "$pkg_name/*" --confirm --all --remote ambrosys; fi
86+
only:
87+
refs:
88+
- master
89+
- merge_requests
90+
- external_pull_requests
91+
92+
conan deploy gcc7:
93+
extends: .conan_deploy
94+
image: conanio/gcc7
95+
96+
conan deploy gcc10:
97+
extends: .conan_deploy
98+
image: conanio/gcc10
99+
100+
conan deploy clang11:
101+
extends: .conan_deploy
102+
image: conanio/clang11
103+
104+
67105
build doc:
68106
image: bibermann/os-matcher:gcc-sphinx
69107
stage: build
@@ -136,3 +174,5 @@ pages:
136174

137175

138176

177+
178+

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ endif()
2828
enable_cpp17()
2929
add_compile_options( -Wall -Wextra )
3030

31+
set ( CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install")
32+
3133
if ( ${BUILD_LIBRARY} )
3234

3335
list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})

examples/AmbRouter/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ target_link_libraries( AmbRouter
1010
PUBLIC os-matcher
1111
PUBLIC Core::AppComponents
1212
PUBLIC CONAN_PKG::amb-log
13+
PUBLIC CONAN_PKG::libpqxx
1314
PUBLIC CONAN_PKG::amb-thread
1415
PUBLIC CONAN_PKG::cli-app
1516
PUBLIC Progress
17+
PUBLIC pq
1618
)
1719

1820
if( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )

0 commit comments

Comments
 (0)