guard against empty TARGET_INCLUDES #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake portable build | |
on: | |
push: | |
branches: | |
- cmake | |
- cmake2 | |
jobs: | |
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 | |
uses: actions/checkout@v4 | |
- name: Get Conan | |
id : conan | |
uses: turtlebrowser/get-conan@main | |
if: matrix.type == 'conan' | |
- name: Setup Visual Studio (Windows) | |
uses: ilammy/msvc-dev-cmd@v1 | |
if: runner.os == 'Windows' | |
- name: Cache conan artifacts | |
id: conan-artifacts | |
uses: actions/cache@v4 | |
with: | |
path: ~/.conan2 | |
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 -o libtype=${{ matrix.lib }} | |
if: matrix.type == 'conan' | |
- name: Generate CMake options | |
shell: bash | |
if: matrix.lib == 'static' | |
run: echo "LIB=-DMAGICK_BUILD_STATIC=ON" >> $GITHUB_ENV | |
- name: Generate CMake build (native) (POSIX) | |
run: | | |
mkdir -p build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release ${{ env.LIB }} | |
if: runner.os != 'Windows' && matrix.type == 'system' | |
- name: Generate CMake build (native) (Windows) | |
run: | | |
mkdir -p build | |
cd build | |
cmake .. ${{ env.LIB }} | |
shell: cmd | |
if: runner.os == 'Windows' && matrix.type == 'system' | |
- name: Generate CMake build (conan) (POSIX) | |
run: | | |
cd build | |
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release ${{ env.LIB }} | |
if: runner.os != 'Windows' && matrix.type == 'conan' | |
- name: Generate CMake build (conan) (Windows) | |
run: | | |
cd build | |
call conanbuild.bat | |
cmake .. -G "Visual Studio 15 2017" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" ${{ env.LIB }} | |
shell: cmd | |
if: runner.os == 'Windows' && matrix.type == 'conan' | |
- name: Build | |
run: cmake --build build |