fix the define #7
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: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
lib: ['shared', 'static'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Conan | |
id : conan | |
uses: turtlebrowser/get-conan@main | |
- name: Cache conan artifacts | |
id: conan-artifacts | |
uses: actions/cache@v4 | |
with: | |
path: ~/.conan2 | |
key: ${{ runner.os }}-conan | |
- name: Create default profile | |
run: conan profile detect || echo ok | |
shell: bash | |
- name: Install all delegates | |
run: conan install . -of build --build=missing | |
- name: Generate CMake options | |
shell: bash | |
if: matrix.lib == 'static' | |
run: echo "LIB=-DMAGICK_BUILD_STATIC=1" >> $GITHUB_ENV | |
- name: Generate CMake build (POSIX) | |
run: cd build && cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release ${{ matrix.lib }} ${{ 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" ${{ matrix.lib }} ${{ env.LIB }} | |
shell: cmd | |
if: runner.os == 'Windows' | |
- name: Build | |
run: cmake --build build |