Skip to content

feat build: prefere static libs when possible #4657

feat build: prefere static libs when possible

feat build: prefere static libs when possible #4657

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-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 [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