Skip to content

Fix conanfile.py install paths on Linux #86

Fix conanfile.py install paths on Linux

Fix conanfile.py install paths on Linux #86

Workflow file for this run

name: Build
on:
push:
paths-ignore:
- '**.md'
- 'LICENSE'
- '.gitignore'
- 'resources/**'
pull_request:
paths-ignore:
- '**.md'
- 'LICENSE'
- '.gitignore'
- 'resources/**'
workflow_dispatch:
jobs:
conan:
name: Conan - ${{ matrix.platform[0] }} - ${{ matrix.platform[2] }}
runs-on: ${{ matrix.platform[1] }}
strategy:
fail-fast: false
matrix:
platform:
- [Linux, ubuntu-latest, gcc]
- [Linux, ubuntu-latest, clang]
- [Windows, windows-latest, msvc]
- [MacOS, macos-latest, apple-clang]
steps:
- uses: actions/checkout@v3
- name: Install Clang
if: matrix.platform[2] == 'clang'
uses: KyleMayes/install-llvm-action@v1
with:
version: "17.0"
- name: Set env vars for Clang
if: matrix.platform[2] == 'clang'
run: echo "CC=clang" >> $GITHUB_ENV && echo "CXX=clang++" >> $GITHUB_ENV
- name: Install Conan
id: conan
uses: turtlebrowser/get-conan@main
- name: Create default Conan profile
shell: bash
run: |
conan profile detect
if [[ "$RUNNER_OS" == "macOS" ]]; then sed_i='sed -i ""'; else sed_i='sed -i'; fi
$sed_i 's/compiler.cppstd=.*/compiler.cppstd=17/' "$(conan config home)/profiles/default"
- name: Build Conan package - static
run: conan create . --build missing
- name: Build Conan package - shared
run: conan create . --build missing -o "*/*:shared=True" -o build_dynamic_libs=True
standalone:
name: CMake - ${{ matrix.platform[0] }} - ${{ matrix.platform[2] }}
runs-on: ${{ matrix.platform[1] }}
strategy:
fail-fast: false
matrix:
platform:
- [Linux, ubuntu-latest, gcc]
- [Linux, ubuntu-latest, clang]
- [Windows, windows-latest, msvc]
- [MacOS, macos-11, apple-clang]
# macos-latest with v12.7 is too new for Conan at the moment
# - [MacOS, macos-latest, apple-clang]
steps:
- uses: actions/checkout@v3
- name: Install Clang
if: matrix.platform[2] == 'clang'
uses: KyleMayes/install-llvm-action@v1
with:
version: "17.0"
- name: Set env vars for Clang
if: matrix.platform[2] == 'clang'
run: echo "CC=clang" >> $GITHUB_ENV && echo "CXX=clang++" >> $GITHUB_ENV
- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.27"
- name: Install Conan
id: conan
uses: turtlebrowser/get-conan@main
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --parallel --config Release
- name: Test
run: ctest --test-dir build --build-config Release
- name: Install
run: cmake --install build --prefix install --config Release
- name: Test installed library
shell: bash
run: |
cmake -S test_package/ -B build/test_install -DEDIE_ROOT=$(pwd)/install/lib/cmake/EDIE/ -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
cmake --build build/test_install --config Release