-
Notifications
You must be signed in to change notification settings - Fork 2.6k
80 lines (71 loc) · 1.91 KB
/
macos.yml
File metadata and controls
80 lines (71 loc) · 1.91 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Mac OS build
on:
workflow_dispatch:
push:
branches:
- master
- fixes
- develop
- release/*
tags:
- 'v[0-9]+.*'
pull_request:
branches:
- master
- fixes
- develop
- release/*
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
mosquitto:
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: pin cmake to 3.x series
uses: jwlawson/actions-setup-cmake@09fd9b0fb3b239b4b68d9256cd65adf8d6b91da0
with:
cmake-version: '3.31.6'
- name: Python test dependencies
uses: actions/setup-python@v6
with:
cache: 'pip'
- name: Install Homebrew dependencies
run: |
brew update
brew list cmake || brew install cmake
brew install \
argon2 \
cjson \
cunit \
docbook-xsl \
gcc \
googletest \
libedit \
libmicrohttpd \
make \
openssl \
uthash
- name: Configure CMake
run: |
EDITLINE_DIR=$(brew --prefix libedit)
HOMEBREW_PREFIX=$(brew --prefix)
cmake -B ${{github.workspace}}/build64 \
-G Ninja \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_PREFIX_PATH="$HOMEBREW_PREFIX" \
-DWITH_DOCS=OFF \
-DOPENSSL_ROOT_DIR=$(brew --prefix openssl@3)
- name: Build
run: |
cmake --build ${{github.workspace}}/build64 \
--config ${{env.BUILD_TYPE}}
- name: Test
working-directory: build64/
run: |
python3 -m venv venv
source venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install psutil
ctest --output-on-failure --repeat until-pass:5