Skip to content

Commit e4dc248

Browse files
committed
Add a conanfile and a CI build testing it
1 parent dcec034 commit e4dc248

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ jobs:
2020
compiler: gcc
2121
version: "10"
2222

23+
- name: ubuntu-20.04-gcc-10-conan
24+
os: ubuntu-20.04
25+
compiler: gcc
26+
version: "10"
27+
conan: true
28+
cmake-args: -DCMAKE_PREFIX_PATH=`pwd`/build -DCMAKE_MODULE_PATH=`pwd`/build
29+
2330
steps:
2431
- uses: actions/checkout@v2
2532

@@ -29,14 +36,23 @@ jobs:
2936

3037
- name: Install
3138
run: |
32-
python -m pip install cmake==3.17.3 --upgrade
39+
python -m pip install cmake==3.17.3 conan==1.28.1 --upgrade
3340
sudo apt update
3441
sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib
3542
echo "::set-env name=CC::gcc-${{ matrix.version }}"
3643
echo "::set-env name=CXX::g++-${{ matrix.version }}"
3744
38-
- name: Install dependencies
45+
- name: Install dependencies (system)
3946
run: sudo apt-get install -y libboost-all-dev libmsgpack-dev libwebsocketpp-dev
47+
if: ${{ !matrix.conan }}
48+
49+
- name: Install dependencies (conan)
50+
run: |
51+
conan profile new default --detect --force
52+
conan profile update settings.compiler.libcxx=libstdc++11 default
53+
mkdir -p build && cd build
54+
conan install .. --build=missing
55+
if: ${{ matrix.conan }}
4056

4157
- name: Build
4258
run: |

conanfile.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[requires]
2+
boost/1.73.0
3+
msgpack/3.2.1
4+
websocketpp/0.8.2
5+
6+
[generators]
7+
cmake_find_package

0 commit comments

Comments
 (0)