-
Notifications
You must be signed in to change notification settings - Fork 181
137 lines (119 loc) · 4.16 KB
/
build-macos.yml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Build macOS
on:
push:
pull_request:
branches:
- master
jobs:
build-macos:
runs-on: macos-13
steps:
# XProtect can cause random failures if it decides that the DMG we create
# during the packaging phase is malware.
# See https://github.com/actions/runner-images/issues/7522 and https://github.com/servo/servo/pull/30779
- name: Kill XProtectBehaviorService
run: |
echo Killing XProtect.; sudo pkill -9 XProtect >/dev/null || true;
- name: Downgrade Python version
uses: actions/setup-python@v4
id: cp39
with:
python-version: '3.9'
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
setup-python: false
version: '5.15.2'
target: 'desktop'
- name: Install Dependencies
run: brew install ninja doxygen graphviz protobuf [email protected] pkg-config
- name: Install Cap’n Proto
run: |
mkdir "${{ runner.workspace }}/capnp"
cd "${{ runner.workspace }}/capnp"
curl -O https://capnproto.org/capnproto-c++-0.9.0.tar.gz
tar zxf capnproto-c++-0.9.0.tar.gz
cd capnproto-c++-0.9.0
./configure
make -j
sudo make install
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'
fetch-depth: 0
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install Python requirements
run: |
sudo pip3 install -r "$GITHUB_WORKSPACE/doc/requirements.txt"
- name: CMake
run: |
mkdir "${{ runner.workspace }}/_build"
cd "${{ runner.workspace }}/_build"
cmake $GITHUB_WORKSPACE -G "Ninja" \
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=cmake/submodule_dependencies.cmake \
-DHAS_HDF5=ON \
-DHAS_QT5=ON \
-DHAS_CURL=ON \
-DHAS_CAPNPROTO=ON \
-DHAS_FTXUI=ON \
-DBUILD_DOCS=ON \
-DBUILD_APPS=ON \
-DBUILD_SAMPLES=ON \
-DBUILD_TIME=ON \
-DBUILD_PY_BINDING=ON \
-DBUILD_CSHARP_BINDING=OFF \
-DBUILD_ECAL_TESTS=ON \
-DECAL_INCLUDE_PY_SAMPLES=OFF \
-DECAL_INSTALL_SAMPLE_SOURCES=ON \
-DECAL_JOIN_MULTICAST_TWICE=OFF \
-DECAL_NPCAP_SUPPORT=OFF \
-DECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS=ON \
-DECAL_THIRDPARTY_BUILD_PROTOBUF=OFF \
-DECAL_THIRDPARTY_BUILD_SPDLOG=ON \
-DECAL_THIRDPARTY_BUILD_TINYXML2=ON \
-DECAL_THIRDPARTY_BUILD_FINEFTP=ON \
-DECAL_THIRDPARTY_BUILD_CURL=OFF \
-DECAL_THIRDPARTY_BUILD_GTEST=ON \
-DECAL_THIRDPARTY_BUILD_HDF5=OFF \
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON \
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON \
-DECAL_THIRDPARTY_BUILD_QWT=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=/usr/local/opt/[email protected] \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \
-DPython_FIND_STRATEGY=LOCATION \
-DPython_FIND_REGISTRY=NEVER
shell: bash
- name: Build Release
run: cmake --build . --config Release
working-directory: ${{ runner.workspace }}/_build
- name: Create config path and copy ecal.yaml
run: |
sudo mkdir /etc/ecal
sudo cp "./ecal/core/cfg/gen/ecal.yaml" /etc/ecal
working-directory: ${{ runner.workspace }}/_build
# - name: Build Documentation C
# run: cmake --build . --target documentation_c
# working-directory: ${{ runner.workspace }}/_build
# - name: Build Documentation C++
# run: cmake --build . --target documentation_cpp
# working-directory: ${{ runner.workspace }}/_build
# currently event test fails under macos ..
# - name: Run Tests
# run: ctest -V
# working-directory: ${{ runner.workspace }}/_build
- name: Pack
uses: nick-fields/retry@v2
with:
max_attempts: 3
retry_on: error
timeout_minutes: 3
command: cd ${{ runner.workspace }}/_build && cpack -G DragNDrop
- name: Upload DMG
uses: actions/upload-artifact@v4
with:
name: macos-dmg
path: ${{ runner.workspace }}/_build/_deploy/*.dmg