From db9c36c32f540620684675f331b5077ff8726cff Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 27 Oct 2023 14:29:22 +0300 Subject: [PATCH] CI: Test linking against the installed library --- .github/workflows/build.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 246476fed..e87dcbe07 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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" @@ -157,3 +155,18 @@ 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 + cmake -S test_package/ --preset conan-release -DEDIE_ROOT=$(pwd)/install/lib/cmake/EDIE/ + cmake --build --preset conan-release --config Release