-
Notifications
You must be signed in to change notification settings - Fork 7
345 lines (308 loc) · 10.3 KB
/
mac.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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
name: MacOS wxOSX builds
on:
push:
branches:
- master
tags:
- v*
paths-ignore:
- '.github/**'
- 'assets/**'
- 'tools/**'
- 'lib/wx/doc/**'
- 'lib/wx/version.rb'
- '**.md'
- '.cirrus.yml'
pull_request:
branches:
- master
paths-ignore:
- '.github/**'
- 'assets/**'
- 'tools/**'
- 'lib/wx/doc/**'
- 'lib/wx/version.rb'
- 'rakelib/lib/**/*.yaml'
- '**.md'
- 'Gemfile'
- '.yardopts'
- '.gitignore'
- 'LICENSE'
- '.cirrus.yml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
defaults:
run:
shell: /usr/bin/arch -arch ${{ matrix.arch }} /bin/bash --noprofile --norc -eo pipefail {0}
runs-on: ${{ matrix.runner }}
name: ${{ matrix.name }} wxRuby(${{ matrix.wxr_type }}) ruby-${{ matrix.ruby }} wxWidgets-${{ vars.WXWIDGETS_LATEST_STABLE }}(${{ matrix.wxw_type }}) SWIG${{ matrix.swig }}
strategy:
fail-fast: false
matrix:
include:
- name: wxMac macOS 14
runner: macos-14
arch: arm64
ruby: 'ruby'
swig: '4'
configure_flags: --disable-sys-libs
wxw_type: develop
wxr_type: develop
- name: wxMac macOS 14
runner: macos-14
arch: arm64
ruby: 'ruby'
swig: '4'
configure_flags: --disable-sys-libs
wxw_type: embed
wxr_type: gem
- name: wxMac macOS 13
runner: macos-13
arch: x86_64
ruby: 'ruby'
swig: '4'
configure_flags: --disable-sys-libs
wxw_type: develop
wxr_type: develop
- name: wxMac macOS 13
runner: macos-13
arch: x86_64
ruby: 'ruby'
swig: '4'
configure_flags: --disable-sys-libs
wxw_type: embed
wxr_type: binpkg
- name: wxMac macOS 13
runner: macos-13
arch: x86_64
ruby: 'ruby'
swig: '4'
configure_flags: --disable-sys-libs
wxw_type: embed
wxr_type: gem
- name: wxMac macOS 13
runner: macos-13
arch: x86_64
ruby: 'ruby'
swig: '4'
configure_flags: --disable-sys-libs
wxw_type: system
wxr_type: gem
env:
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
NSUnbufferedIO: YES
WXWIDGETS_ROOT: ${{ github.workspace }}/ext/wxWidgets
WXWIN_INSTALL: ${{ github.workspace }}/ext/wxWidgets/install
WXWIDGETS_LATEST_STABLE: ${{ vars.WXWIDGETS_LATEST_STABLE }}
steps:
- name: Show default Ruby
run: |
ruby -v
- name: Checkout
uses: actions/checkout@v4
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Setup Ruby gems
run: |
bundle install
- name: checkout wxWidgets
if: matrix.wxw_type != 'embed'
uses: actions/checkout@v4
with:
repository: wxWidgets/wxWidgets
path: ${{ env.WXWIDGETS_ROOT }}
ref: v${{ env.WXWIDGETS_LATEST_STABLE }}
submodules: 'recursive'
- name: Set environment variables
run: |
echo TZ=UTC >> $GITHUB_ENV
echo LD_LIBRARY_PATH=`pwd`/lib >> $GITHUB_ENV
wxPROC_COUNT=`sysctl -n hw.logicalcpu`
((wxPROC_COUNT++))
echo wxPROC_COUNT=$wxPROC_COUNT >> $GITHUB_ENV
echo wxBUILD_ARGS=-j$wxPROC_COUNT >> $GITHUB_ENV
# Setting this variable suppresses "Error retrieving accessibility bus address"
# messages from WebKit tests that we're not interested in.
echo NO_AT_BRIDGE=1 >> $GITHUB_ENV
case "${{ matrix.compiler }}" in
clang)
echo CC=clang >> $GITHUB_ENV
echo CXX='clang++ -stdlib=libc++' >> $GITHUB_ENV
echo LD=clang++ >> $GITHUB_ENV
allow_warn_opt="-Wno-error=#warnings"
;;
'')
# Assume gcc.
allow_warn_opt="-Wno-error=cpp"
;;
*)
echo "*** Unknown compiler: ${{ matrix.compiler }} ***"
;;
esac
if [ -z ${{ matrix.allow_warnings }} ]; then
error_opts="-Werror $allow_warn_opt"
if [ "${{ matrix.runner }}" != "macos-11" ]; then
error_opts="$error_opts -Wno-unused-but-set-variable"
fi
echo "wxMAKEFILE_ERROR_CXXFLAGS=$error_opts" >> $GITHUB_ENV
echo "wxMAKEFILE_CXXFLAGS=$wxMAKEFILE_CXXFLAGS $error_opts" >> $GITHUB_ENV
fi
echo "wxMAKEFILE_CXXFLAGS=$wxMAKEFILE_CXXFLAGS $error_opts" >> $GITHUB_ENV
- name: Before install
if: matrix.wxw_type != 'embed'
working-directory: ${{ env.WXWIDGETS_ROOT }}
run: |
./build/tools/before_install.sh
- name: Install SWIG
if: matrix.runner != 'macos-11'
run: |
brew install swig
- name: Install doxygen
if: matrix.wxw_type != 'embed'
run: |
brew install doxygen
- name: Show build environment
run: |
echo "Environment:"
env | sort
echo
echo "Ruby version:"
ruby -v
echo
echo "SWIG version:"
swig -version
echo
if [ "${{ matrix.wxw_type }}" != "embed" ]; then
echo "Doxygen version:"
doxygen -v
echo
fi
echo "Compiler version:"
${CXX-g++} --version
echo
- name: Configuring wxWidgets
if: matrix.wxw_type != 'embed'
working-directory: ${{ env.WXWIDGETS_ROOT }}
run: |
wxCONFIGURE_OPTIONS="--disable-sys-libs --without-liblzma ${{ matrix.configure_flags }}"
if [ "${{ matrix.wxw_type }}" == "develop" ]; then
./configure $wxCONFIGURE_OPTIONS --disable-optimise --prefix=$WXWIN_INSTALL --disable-tests --without-subdirs --disable-debug_info || rc=$?
else
./configure $wxCONFIGURE_OPTIONS --disable-optimise --prefix=/usr/local --disable-tests --without-subdirs --disable-debug_info || rc=$?
fi
if [ -n "$rc" ]; then
echo '*** Configuring failed, contents of config.log follows: ***'
echo '-----------------------------------------------------------'
cat config.log
echo '-----------------------------------------------------------'
exit $rc
fi
- name: Build wxWidgets
if: matrix.wxw_type != 'embed'
working-directory: ${{ env.WXWIDGETS_ROOT }}
run: |
if [ "${{ matrix.wxw_type }}" == "develop" ]; then
export WX_SKIP_DOXYGEN_VERSION_CHECK=1
make $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_ERROR_CXXFLAGS" && make install && pushd docs/doxygen && ./regen.sh xml && popd
else
make $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_ERROR_CXXFLAGS" && make install
fi
- name: Show wx-config
if: matrix.wxw_type != 'embed'
run: |
if [ "${{ matrix.wxw_type }}" == "develop" ]; then
$WXWIN_INSTALL/bin/wx-config --prefix
$WXWIN_INSTALL/bin/wx-config --exec-prefix
$WXWIN_INSTALL/bin/wx-config --version-full
$WXWIN_INSTALL/bin/wx-config --selected-config
$WXWIN_INSTALL/bin/wx-config --cppflags
$WXWIN_INSTALL/bin/wx-config --cxx
$WXWIN_INSTALL/bin/wx-config --ld
$WXWIN_INSTALL/bin/wx-config --libs all
$WXWIN_INSTALL/bin/wx-config --libs media
else
wx-config --prefix
wx-config --exec-prefix
wx-config --version-full
wx-config --selected-config
wx-config --cppflags
wx-config --cxx
wx-config --ld
wx-config --libs all
wx-config --libs media
fi
- name: Remove wxWidgets
if: matrix.wxw_type != 'develop'
run: rm -rf $WXWIDGETS_ROOT
- name: Configure wxRuby3
if: matrix.wxr_type != 'gem'
run: |
if [ "${{ matrix.wxw_type }}" == "embed" ]; then
bundle exec rake configure WXRUBY_AUTOINSTALL=1
elif [ "${{ matrix.wxw_type }}" == "develop" ]; then
bundle exec rake configure WXWIN=$WXWIN_INSTALL WXXML=$WXWIDGETS_ROOT/docs/doxygen/out/xml
else
bundle exec rake configure
fi
- name: Build wxRuby3
if: matrix.wxr_type != 'gem'
run: |
bundle exec rake build
- name: Run wxRuby3 post-build checks
if: matrix.wxr_type != 'gem'
run: |
ruby tools/check_swig_types.rb
- name: Build wxRuby3 gem
if: matrix.wxr_type == 'gem' || matrix.wxr_type == 'binpkg'
run: |
bundle exec rake gem
if [ "${{ matrix.wxr_type }}" == "binpkg" ]; then
bundle exec rake binpkg
fi
- name: Remove wxWidgets
if: matrix.wxw_type == 'develop' && matrix.wxr_type == 'binpkg'
run: rm -rf $WXWIDGETS_ROOT
- name: Clean wxRuby3 build artifacts
if: matrix.wxr_type != 'develop'
run: bundle exec rake clean
- name: Install wxRuby3 gem
if: matrix.wxr_type != 'develop'
run: |
if [ "${{ matrix.wxr_type }}" == "binpkg" ]; then
gem install $(echo pkg/*.gem) -- package=`pwd`/$(echo pkg/*.pkg)
else
if [ "${{ matrix.wxw_type }}" == "system" ]; then
gem install $(echo pkg/*.gem) -- prebuilt=none && wxruby setup --wxwin=@system
elif [ "${{ matrix.wxw_type }}" == "embed" ]; then
gem install $(echo pkg/*.gem) -- prebuilt=none && wxruby setup --autoinstall
else
gem install $(echo pkg/*.gem) -- prebuilt=none && wxruby setup --wxwin=$WXWIN_INSTALL
fi
fi
- name: Check wxRuby3 gem install
if: matrix.wxr_type != 'develop'
run: |
wxruby check
- name: Check embedded wxWidgets version
if: matrix.wxw_type == 'embed'
run: |
if [ "${{ matrix.wxr_type }}" == "develop" ]; then
bundle exec rake wxruby:exec[ruby,tools/check_wxw_version.rb,$WXWIDGETS_LATEST_STABLE]
else
ruby tools/check_wxw_version.rb "$WXWIDGETS_LATEST_STABLE"
fi
- name: Run wxRuby3 regression tests
run: |
if [ "${{ matrix.wxr_type }}" == "develop" ]; then
bundle exec rake test
else
wxruby test
fi