Skip to content

Commit

Permalink
add system environment builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Apr 3, 2024
1 parent d4897ea commit 58b4cbb
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/cmake-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,34 +24,39 @@ 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
if: matrix.lib == 'static'
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'
Expand Down

0 comments on commit 58b4cbb

Please # to comment.