Skip to content

bump conan from 1.66 to 2.11 #126

bump conan from 1.66 to 2.11

bump conan from 1.66 to 2.11 #126

Workflow file for this run

name: Build And Test
on:
push:
branches:
- '**'
release:
types: [created]
jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04, windows-2022]
BUILD_TYPE: [RelWithDebInfo, Debug]
include:
- CONAN_BUILD_TYPE: Debug
BUILD_TYPE: Debug
- CONAN_BUILD_TYPE: Release
BUILD_TYPE: RelWithDebInfo
# preset names are handled differently by conan as on windows it uses a multi-config generator, on linux a single config generator
# See https://docs.conan.io/2/examples/tools/cmake/cmake_toolchain/build_project_cmake_presets.html#building-the-project-using-cmakepresets
- BUILD_TYPE: RelWithDebInfo
os: ubuntu-22.04
presetName: conan-relwithdebinfo
- BUILD_TYPE: Debug
os: ubuntu-22.04
presetName: conan-debug
- os: windows-2022
presetName: conan-default
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- name: Install Conan
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 2.12.0
- name: Detect Conan Profile
run: conan profile detect
- name: Install Dependencies
# "&:build_type=..." specifies the consumer packages build type, see https://github.com/conan-io/conan/issues/16852
run: conan install . --output-folder ${{github.workspace}}/build -s build_type=${{matrix.CONAN_BUILD_TYPE}} -s "&:build_type=${{matrix.BUILD_TYPE}}" -o "sqlite3/*:shared=True" --build=missing
- name: Configure CMake
# Configure CMake in a 'build' subdirectory.
run: cmake --preset ${{matrix.presetName}} . -DBUILD_SHARED_LIBS=ON
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{matrix.BUILD_TYPE}}
- name: Test (Win)
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: .\conanrun.bat && ctest -C ${{matrix.BUILD_TYPE}} --output-on-failure
shell: cmd
if: runner.os == 'Windows'
- name: Test (Linux)
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: source conanrun.sh && ctest -C ${{matrix.BUILD_TYPE}} --output-on-failure
if: runner.os == 'Linux'
- name: CPack
if: ${{ github.event_name == 'release' }}
working-directory: ${{github.workspace}}/build
run: cpack -C ${{matrix.BUILD_TYPE}}
- name: Stash artifact
# we can't attach the artifact directly to the release because
# skx/github-action-publish-binaries doesn't run on windows runners
# at the time of writing this
if: ${{ github.event_name == 'release' }}
uses: actions/upload-artifact@v4
with:
name: cppsqlite3-${{matrix.BUILD_TYPE}}-${{matrix.os}}-${{github.run_id}}
path: build/CppSQLite3-*.zip
retention-days: 3
deploy:
name: Upload the artifacts
needs: build
if: ${{ github.event_name == 'release' }}
strategy:
matrix:
artifact_os: [ubuntu-22.04, windows-2022]
artifact_build_type: [RelWithDebInfo, Debug]
runs-on: ubuntu-22.04
steps:
- name: Unstash artifact
uses: actions/download-artifact@v4
with:
name: cppsqlite3-${{matrix.artifact_build_type}}-${{matrix.artifact_os}}-${{github.run_id}}
- name: Deploy artifact
uses: skx/[email protected]
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
args: 'CppSQLite3-*.zip'