Skip to content

bump conan from 1.66 to 2.11 #116

bump conan from 1.66 to 2.11

bump conan from 1.66 to 2.11 #116

Workflow file for this run

name: Build And Test
on:
push:
branches:
- '**'
release:
types: [created]
jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04, windows-2019]
BUILD_TYPE: [RelWithDebInfo, Debug]
include:
- CONAN_BUILD_TYPE: Debug
BUILD_TYPE: Debug
- CONAN_BUILD_TYPE: Release
BUILD_TYPE: RelWithDebInfo
- os: ubuntu-22.04
conanruncmd: source conanrun.sh
- os: windows-2019
conanruncmd: .\conanrun.bat
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- name: Install Conan
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 2.11.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 -S . -B ${{github.workspace}}/build -DBUILD_SHARED_LIBS=ON -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DCMAKE_POLICY_DEFAULT_CMP0091=NEW
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{matrix.BUILD_TYPE}}
- name: Test
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: ${{matrix.conanruncmd}} && ctest -C ${{matrix.BUILD_TYPE}} --output-on-failure
- 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-2019]
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'