Skip to content

feat conan: do not use CPM in conan, test more services #4770

feat conan: do not use CPM in conan, test more services

feat conan: do not use CPM in conan, test more services #4770

Workflow file for this run

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 update
sudo apt install -y \
gcc g++ cmake wget git clang-format \
python3 python3-pip python3-venv
- name: Install test dependencies
if: matrix.os == 'ubuntu-22.04'
run: |
wget -qO- https://pgp.mongodb.com/server-7.0.asc | sudo gpg --dearmor | sudo tee /usr/share/keyrings/mongodb-server-7.0.gpg >/dev/null
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" \
| sudo tee -a /etc/apt/sources.list.d/mongodb-org-7.0.list
sudo apt update
sudo apt install -y postgresql redis mongodb-org mongodb-mongosh
sudo ./scripts/kafka/ubuntu_install_kafka.sh
./scripts/rabbitmq/ubuntu_install_rabbitmq_server.sh
- name: Install MacOS packages
if: matrix.os == 'macos-latest'
run: |
brew update
brew tap mongodb/brew
brew install clang-format postgresql redis kafka rabbitmq mongodb-community
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 \
otlp_service \
hello_service \
https_service \
postgres_service \
redis_service \
kafka_service \
rabbitmq_service \
mongo_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