From 58b4cbbe39cb142f5483c2568490ed17ae0af401 Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Wed, 3 Apr 2024 17:37:51 +0200 Subject: [PATCH] add system environment builds --- .github/workflows/cmake-build.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake-build.yml b/.github/workflows/cmake-build.yml index 988f1a54ef8..866112c0268 100644 --- a/.github/workflows/cmake-build.yml +++ b/.github/workflows/cmake-build.yml @@ -7,13 +7,15 @@ on: - cmake2 jobs: - native: + conan-native: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] lib: ['shared', 'static'] + type: ['conan', 'system'] steps: - name: Checkout @@ -22,20 +24,24 @@ jobs: - name: Get Conan id : conan uses: turtlebrowser/get-conan@main + if: ${{ matrix.type }} == 'conan' - name: Cache conan artifacts id: conan-artifacts uses: actions/cache@v4 with: path: ~/.conan2 - key: ${{ runner.os }}-conan + key: conan-${{ runner.os }}-${{ matrix.lib }} + if: ${{ matrix.type }} == 'conan' - name: Create default profile run: conan profile detect || echo ok shell: bash + if: ${{ matrix.type }} == 'conan' - name: Install all delegates - run: conan install . -of build --build=missing + run: conan install . -of build --build=missing -D${{ matrix.lib }} + if: ${{ matrix.type }} == 'conan' - name: Generate CMake options shell: bash @@ -43,13 +49,14 @@ jobs: run: echo "LIB=-DMAGICK_BUILD_STATIC=ON" >> $GITHUB_ENV - name: Generate CMake build (POSIX) - run: cd build && cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release ${{ env.LIB }} + run: | + cd build + cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release ${{ env.LIB }} if: runner.os != 'Windows' - name: Generate CMake build (Windows) run: | cd build - conanbuild.bat cmake .. -G "Visual Studio 15 2017" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" ${{ env.LIB }} shell: cmd if: runner.os == 'Windows'