Skip to content

Commit

Permalink
CI: Test linking against the installed library
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Oct 27, 2023
1 parent 4ee5091 commit 760d209
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,10 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main

- name: Create default profile
run: conan profile detect

- name: Set compiler.cppstd to 17
- 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"
Expand Down Expand Up @@ -157,3 +155,19 @@ jobs:

- name: Inspect
run: tree install/

- name: Test installed library
shell: bash
run: |
# Set up Conan profile
conan profile detect --force
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"
# Install dependencies
rm CMakeUserPresets.json
conan install . -pr default --output-folder=build/test_install --build=missing -s build_type=Release
cp CMakeUserPresets.json test_package/
# Build
if [[ "$RUNNER_OS" == "Windows" ]]; then preset="conan-default"; else preset="conan-release"; fi
cmake -S test_package/ --preset $preset -DEDIE_ROOT=$(pwd)/install/lib/cmake/EDIE/ -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
cmake --build --preset conan-release --config Release

0 comments on commit 760d209

Please sign in to comment.