Skip to content

upgrade to conan 2, update dependencies #306

upgrade to conan 2, update dependencies

upgrade to conan 2, update dependencies #306

Workflow file for this run

name: Build & test
on:
push:
branches:
- devel
- master
pull_request:
branches:
- master
jobs:
build-test:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
c_compiler: [gcc, clang, cl]
build_type: [Debug, Release]
cxx_standard: ["17", "20"]
include:
- c_compiler: gcc
cxx_compiler: g++
- c_compiler: clang
cxx_compiler: clang++
- c_compiler: cl
cxx_compiler: cl
- os: windows-latest
test_name: .\Bin\UnitTest.exe
- os: ubuntu-latest
test_name: ./Bin/UnitTest
exclude:
- os: windows-latest
c_compiler: gcc
- os: windows-latest
c_compiler: clang
- os: ubuntu-latest
c_compiler: cl
name: ${{ matrix.c_compiler }} - ${{ matrix.build_type }} - ${{ matrix.os }} - c++${{ matrix.cxx_standard }}
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- uses: seanmiddleditch/gha-setup-ninja@v3
- uses: seanmiddleditch/gha-setup-vsdevenv@master
- name: Install conan
shell: bash
env:
CC: "${{ matrix.c_compiler != 'cl' && 'matrix.c_compiler' || '' }}"
CXX: "${{ matrix.cxx_compiler != 'cl' && 'matrix.cxx_compiler' || '' }}"
run: |
pip install conan
conan profile detect --name ci --force
sed -i 's/build_type=.*/build_type=${{ matrix.build_type }}/g' $(conan profile path ci)
sed -i 's/compiler.cppstd=.*/compiler.cppstd=${{ matrix.cxx_standard }}/g' $(conan profile path ci)
echo '[conf]' >> $(conan profile path ci)
echo 'tools.build:compiler_executables={"cpp": "${{ matrix.cxx_compiler }}", "c": "${{ matrix.c_compiler }}"}' >> $(conan profile path ci)
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
env:
CC: ${{matrix.c_compiler}}
CXX: ${{matrix.cxx_compiler}}
run: |
conan install $GITHUB_WORKSPACE --output-folder=. --build=missing -pr ci -pr:b ci -s build_type=${{ matrix.build_type }}
cmake $GITHUB_WORKSPACE -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config ${{matrix.build_type}}
- name: Test
working-directory: ${{runner.workspace}}/build
shell: bash
run: ./Bin/UnitTest