liba/.github/workflows/conan.yml

131 lines
3.6 KiB
YAML

name: conan
on:
workflow_dispatch:
jobs:
MSVC:
strategy:
fail-fast: false
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- name: Run setup
run: |
Set-PSDebug -Trace 1
python -m venv example/_
example/_/Scripts/Activate.ps1
python -m pip install -U conan
conan profile detect --force
conan export .
- name: Run conan static
working-directory: example
run: |
_/Scripts/Activate.ps1
Set-PSDebug -Trace 1
conan install . -of build -b missing -o liba/*:shared=0
cmake --preset conan-default
cmake --build --preset conan-release -v -- -nologo
- name: Run conan shared
working-directory: example
run: |
_/Scripts/Activate.ps1
Set-PSDebug -Trace 1
conan install . -of build -b missing -o liba/*:shared=1
cmake --preset conan-default
cmake --build --preset conan-release -v -- -nologo
MacOS:
strategy:
fail-fast: false
matrix:
include: [
{ cc: clang, cxx: clang++ },
]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- name: Run setup
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: |
set -x
python -m venv example/_
. example/_/bin/activate
python -m pip install -U conan
conan profile detect --force
conan export .
- name: Run conan static
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
working-directory: example
run: |
. _/bin/activate
set -x
conan install . -of build -b missing -o liba/*:shared=0
cmake --preset conan-release
cmake --build --preset conan-release -v
- name: Run conan shared
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
working-directory: example
run: |
. _/bin/activate
set -x
conan install . -of build -b missing -o liba/*:shared=1
cmake --preset conan-release
cmake --build --preset conan-release -v
Linux:
strategy:
fail-fast: false
matrix:
include: [
{ cc: gcc, cxx: g++ },
{ cc: clang, cxx: clang++ },
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- name: Run setup
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: |
set -x
python -m venv example/_
. example/_/bin/activate
python -m pip install -U conan
conan profile detect --force
conan export .
- name: Run conan static
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
working-directory: example
run: |
. _/bin/activate
set -x
conan install . -of build -b missing -o liba/*:shared=0
cmake --preset conan-release
cmake --build --preset conan-release -v
- name: Run conan shared
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
working-directory: example
run: |
. _/bin/activate
set -x
conan install . -of build -b missing -o liba/*:shared=1
cmake --preset conan-release
cmake --build --preset conan-release -v