-
Notifications
You must be signed in to change notification settings - Fork 294
76 lines (66 loc) · 2.41 KB
/
ci-conan.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Conan
'on':
pull_request:
push:
branches:
- master
- develop
- feature/**
env:
UBSAN_OPTIONS: print_stacktrace=1
jobs:
build:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
conanflags: ''
- os: macos-latest
conanflags: '-o python_path=python3.11'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ubuntu packages
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get install -y gcc g++ cmake wget git python3 python3-pip python3-venv postgresql redis clang-format
- name: Install MacOS packages
if: matrix.os == 'macos-latest'
run: |
brew update
brew install postgresql redis clang-format
brew install libiconv # https://stackoverflow.com/questions/57734434/libiconv-or-iconv-undefined-symbol-on-mac-osx
brew install [email protected]
- name: Install common packages
run: |
pip install "conan==2.8.0"
pip install numpy
conan profile detect
conan profile show
- name: Run conan
run: |
conan create . --build=missing -s:a compiler.cppstd=17 -pr:b=default ${{matrix.conanflags}}
- name: Test userver conan package
run: |
mv libraries/easy/samples/3_json samples/
mv scripts/tests/conanfile.py samples/
rm -rf userver/cmake/
cd samples/
USERVER_VERSION=$(conan list -c -v quiet userver/* | tail -n 1)
for SAMPLE in \
3_json \
chaotic_service \
embedded_files \
grpc_service \
hello_service \
postgres_service \
redis_service \
s3api \
; do
mv conanfile.py $SAMPLE/
conan test $SAMPLE/ --build=never -s:a compiler.cppstd=17 -pr:b=default ${{matrix.conanflags}} ${USERVER_VERSION}
mv $SAMPLE/conanfile.py ./
done