-
-
Notifications
You must be signed in to change notification settings - Fork 16
193 lines (167 loc) · 5.22 KB
/
macOS-Qt5.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
name: macOS Qt5 CI
on:
workflow_dispatch:
push:
branches:
- main
tags:
- '**'
paths-ignore:
- ".gitignore"
- "README.md"
# ignore CI for other platforms
- ".github/FUNDING.yml"
- ".github/actions/**"
- ".github/workflows/Android-Qt5.yml"
- ".github/workflows/Android-Qt6.yml"
- ".github/workflows/iOS-Qt5.yml"
- ".github/workflows/iOS-Qt6.yml"
- ".github/workflows/Linux-Qt5.yml"
- ".github/workflows/Linux-Qt6.yml"
- ".github/workflows/macOS-Qt6.yml"
- ".github/workflows/Windows-Qt5.yml"
- ".github/workflows/Windows-Qt6.yml"
pull_request:
branches:
- main
paths-ignore:
- ".gitignore"
- "README.md"
# ignore CI for other platforms
- ".github/FUNDING.yml"
- ".github/actions/**"
- ".github/workflows/Android-Qt5.yml"
- ".github/workflows/Android-Qt6.yml"
- ".github/workflows/iOS-Qt5.yml"
- ".github/workflows/iOS-Qt6.yml"
- ".github/workflows/Linux-Qt5.yml"
- ".github/workflows/Linux-Qt6.yml"
- ".github/workflows/macOS-Qt6.yml"
- ".github/workflows/Windows-Qt5.yml"
- ".github/workflows/Windows-Qt6.yml"
concurrency:
# cancel jobs on PRs only
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
QT_VERSION: 5.15.2
jobs:
build-core:
name: "Build maplibre-gl-native"
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: source
submodules: recursive
fetch-depth: 0
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Download Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: ==3.0.*
version: ${{ env.QT_VERSION }}
target: desktop
- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@v3
- name: Set up ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: macOS_maplibre-gl-native_legacy
append-timestamp: false
- name: Build maplibre-gl-native
run: |
mkdir build && cd build
cmake ../source/dependencies/maplibre-gl-native/ \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX=../install-qmaplibregl \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \
-DMBGL_WITH_QT=ON \
-DMBGL_QT_LIBRARY_ONLY=ON \
-DMBGL_QT_STATIC=ON
ninja
ninja install
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: maplibre-gl-native_macOS
path: install-qmaplibregl
build-plugin:
name: "Build qt-geoservices-maplibre-gl"
runs-on: macos-12
needs: build-core
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: source
fetch-depth: 0
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Download Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: ==3.0.*
version: ${{ env.QT_VERSION }}
target: desktop
- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@v3
- name: Set up ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: macOS_qt-geoservices-maplibre-gl_legacy
append-timestamp: false
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: maplibre-gl-native_macOS
path: install-qmaplibregl
- name: Build qt-geoservices-maplibre-gl
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
mkdir build && cd build
qmake ../source/ QMAPLIBREGL_PATH=../install-qmaplibregl
make -j2
INSTALL_ROOT=../install make install
- name: Create artifacts
run: |
pushd install/Users/runner/work/maplibre-native-qt
tar cjvf ../../../../../qt-geoservices-maplibre-gl_macOS.tar.bz2 Qt
popd
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: qt-geoservices-maplibre-gl_macOS
path: qt-geoservices-maplibre-gl_macOS.tar.bz2
release:
name: "Release qt-geoservices-maplibre-gl"
if: github.ref_type == 'tag'
runs-on: macos-12
needs: build-plugin
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: qt-geoservices-maplibre-gl_macOS
- name: Name tarball
env:
TAG_NAME: ${{ github.ref_name }}
run: |
mv qt-geoservices-maplibre-gl_macOS.tar.bz2 qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_macOS.tar.bz2
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_macOS.tar.bz2
allowUpdates: true
draft: true