Skip to content

switch build to conan 1.x #25

switch build to conan 1.x

switch build to conan 1.x #25

Workflow file for this run

name: Build
on:
pull_request:
push:
branches:
- main
jobs:
build:
if: ${{ github.repository == 'Netflix/spectator-cpp' }}
runs-on: ubuntu-latest
env:
BUILD_DIR: "cmake-build"
CC: "gcc-11"
CXX: "g++-11"
LANG: "en_US.UTF-8"
steps:
- uses: actions/checkout@v3
# - name: Conan+Cmake Cache
# uses: actions/cache@v3
# with:
# path: |
# ~/.conan
# ~/work/spectatord/spectatord/cmake-build
# key: ${{ runner.os }}-conan-cmake
- name: Install System Dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update && sudo apt-get install -y binutils-dev g++-11 libiberty-dev
echo "==== cmake ===="
cmake -version
echo "==== python ===="
python3 -V
echo "==== conan ===="
pip install "conan==1.61.0"
conan --version
if [[ ! -f ~/.conan/profiles/default ]]; then conan profile new default --detect; fi
conan profile update settings.compiler.libcxx=libstdc++11 default
- name: Install Project Dependencies
run: |
conan install . --build=missing --install-folder $BUILD_DIR
- name: Build spectator-cpp
run: |
cd $BUILD_DIR
cmake .. -DCMAKE_BUILD_TYPE=Debug
cmake --build .
- name: Test spectator-cpp
run: |
cd $BUILD_DIR
GTEST_COLOR=1 ctest --verbose