-
Notifications
You must be signed in to change notification settings - Fork 12
65 lines (55 loc) · 1.8 KB
/
Copy pathbuild-external.yml
File metadata and controls
65 lines (55 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# SPDX-FileCopyrightText: 2025 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: MIT
# Test on macOS with some dependencies provided externally by Homebrew.
# Both to validate the CMake setup for using system dependencies and to have early warning
# about incompatible changes in some fast-moving external libraries.
name: Build against external 3rdparty
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: true
matrix:
platform:
- os: macos-latest
triplet: arm64-osx-release
shared:
- ON
- OFF
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install dependencies
run: |
brew tap KDAB/tap
brew install fmt spdlog KDBindings mosquitto
- name: Set up vcpkg
id: vcpkg
uses: johnwason/vcpkg-action@v6
with:
token: ${{ github.token }}
triplet: ${{ matrix.platform.triplet }}
manifest-dir: ${{ github.workspace }}
- name: Configure project
run: >
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Debug -G Ninja
-DKDUTILS_BUILD_TESTS=ON
-DBUILD_SHARED_LIBS=${{ matrix.shared }}
${{ steps.vcpkg.outputs.vcpkg-cmake-config }}
- name: Check if external dependencies were used
run: |
! grep -q "KDBindings_DIR-NOTFOUND" ./build/CMakeCache.txt
! grep -q "spdlog_DIR-NOTFOUND" ./build/CMakeCache.txt
! grep -q "fmt_DIR-NOTFOUND" ./build/CMakeCache.txt
- name: Build Project
run: cmake --build ./build
- name: Run tests
run: ctest --test-dir ./build --output-on-failure