2021-08-21 08:39:43 -04:00
|
|
|
name: Mac builds
|
2021-04-18 13:34:22 -04:00
|
|
|
|
|
|
|
on:
|
2021-08-19 14:43:12 -04:00
|
|
|
workflow_dispatch:
|
2021-08-20 11:05:38 -04:00
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
paths-ignore:
|
2022-01-13 19:41:14 -05:00
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
2021-08-21 08:39:43 -04:00
|
|
|
- '.github/workflows/ci.yml'
|
|
|
|
- '.github/workflows/ci_cmake.yml'
|
2021-08-24 09:53:40 -04:00
|
|
|
- '.github/workflows/ci_msw.yml'
|
2021-08-21 08:39:43 -04:00
|
|
|
- '.github/workflows/ci_msw_cross.yml'
|
2021-08-20 11:05:38 -04:00
|
|
|
- 'build/tools/appveyor*.bat'
|
|
|
|
- 'distrib/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'interface/**'
|
|
|
|
- 'include/msvc/**'
|
|
|
|
- 'include/wx/dfb/**'
|
|
|
|
- 'include/wx/gtk/**'
|
|
|
|
- 'include/wx/gtk1/**'
|
|
|
|
- 'include/wx/motif/**'
|
|
|
|
- 'include/wx/msw/**'
|
|
|
|
- 'include/wx/x11/**'
|
|
|
|
- 'locale/**'
|
|
|
|
- 'src/dfb/**'
|
|
|
|
- 'src/gtk/**'
|
|
|
|
- 'src/gtk1/**'
|
|
|
|
- 'src/motif/**'
|
|
|
|
- 'src/msw/**'
|
|
|
|
- 'src/x11/**'
|
|
|
|
- '*.md'
|
|
|
|
- '*.yml'
|
|
|
|
- 'wxwidgets.props'
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
paths-ignore:
|
2022-01-13 19:41:14 -05:00
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
2021-08-21 08:39:43 -04:00
|
|
|
- '.github/workflows/ci.yml'
|
|
|
|
- '.github/workflows/ci_cmake.yml'
|
2021-08-24 09:53:40 -04:00
|
|
|
- '.github/workflows/ci_msw.yml'
|
2021-08-21 08:39:43 -04:00
|
|
|
- '.github/workflows/ci_msw_cross.yml'
|
2021-08-20 11:05:38 -04:00
|
|
|
- 'build/tools/appveyor*.bat'
|
|
|
|
- 'distrib/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'interface/**'
|
|
|
|
- 'include/msvc/**'
|
|
|
|
- 'include/wx/dfb/**'
|
|
|
|
- 'include/wx/gtk/**'
|
|
|
|
- 'include/wx/gtk1/**'
|
|
|
|
- 'include/wx/motif/**'
|
|
|
|
- 'include/wx/msw/**'
|
|
|
|
- 'include/wx/x11/**'
|
|
|
|
- 'locale/**'
|
|
|
|
- 'src/dfb/**'
|
|
|
|
- 'src/gtk/**'
|
|
|
|
- 'src/gtk1/**'
|
|
|
|
- 'src/motif/**'
|
|
|
|
- 'src/msw/**'
|
|
|
|
- 'src/x11/**'
|
|
|
|
- '*.md'
|
|
|
|
- '*.yml'
|
|
|
|
- 'wxwidgets.props'
|
2021-04-18 13:34:22 -04:00
|
|
|
|
|
|
|
jobs:
|
2021-04-18 14:24:05 -04:00
|
|
|
build-and-test:
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: /usr/bin/arch -arch ${{ matrix.arch }} /bin/bash -l {0}
|
2021-08-20 11:05:38 -04:00
|
|
|
|
2021-08-28 17:38:53 -04:00
|
|
|
runs-on: ${{ matrix.runner }}
|
2021-08-20 11:05:38 -04:00
|
|
|
|
2021-08-21 08:41:02 -04:00
|
|
|
name: ${{ matrix.name }}
|
2021-04-18 14:24:05 -04:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-08-20 11:05:38 -04:00
|
|
|
include:
|
2021-09-23 12:13:25 -04:00
|
|
|
- name: wxMac ARM C++11 STL
|
2021-08-28 17:38:53 -04:00
|
|
|
runner: self-hosted
|
2021-08-21 08:41:02 -04:00
|
|
|
arch: arm64
|
2021-09-23 12:13:25 -04:00
|
|
|
configure_flags: --with-cxx=11 --enable-stl
|
2021-08-21 10:17:26 -04:00
|
|
|
use_asan: true
|
2021-08-28 17:38:53 -04:00
|
|
|
- name: wxMac Intel C++17
|
|
|
|
runner: self-hosted
|
2021-08-21 08:41:02 -04:00
|
|
|
arch: x86_64
|
|
|
|
configure_flags: --with-cxx=17 --with-macosx-version-min=10.12 --enable-debug
|
2021-08-28 17:38:53 -04:00
|
|
|
- name: wxMac Universal C++14
|
|
|
|
runner: self-hosted
|
2021-08-21 08:41:02 -04:00
|
|
|
arch: arm64
|
2021-08-21 10:17:26 -04:00
|
|
|
configure_flags: --with-cxx=14 --enable-universal_binary=arm64,x86_64 --disable-shared --disable-debug --enable-optimise
|
2021-08-28 17:38:53 -04:00
|
|
|
- name: wxMac macOS 10.15
|
|
|
|
runner: macos-10.15
|
|
|
|
arch: x86_64
|
|
|
|
configure_flags: --disable-sys-libs
|
|
|
|
- name: wxiOS
|
|
|
|
runner: macos-10.15
|
|
|
|
arch: x86_64
|
|
|
|
configure_flags: --with-osx_iphone --enable-monolithic --disable-sys-libs --host=i686-apple-darwin_sim --build=x86_64-apple-darwin17.7.0
|
|
|
|
xcode_sdk: iphonesimulator
|
|
|
|
skip_samples: true
|
|
|
|
skip_testing: true
|
|
|
|
allow_warnings: true
|
2021-08-20 11:05:38 -04:00
|
|
|
|
|
|
|
env:
|
2021-08-21 08:41:02 -04:00
|
|
|
wxCONFIGURE_FLAGS: --disable-sys-libs --without-liblzma ${{ matrix.configure_flags }} --prefix=${{ github.workspace }}/localbin_${{ matrix.arch }}
|
2021-08-21 10:17:26 -04:00
|
|
|
wxUSE_ASAN: ${{ matrix.use_asan && 1 || 0 }}
|
2021-08-20 11:05:38 -04:00
|
|
|
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
|
|
|
|
NSUnbufferedIO: YES
|
2021-04-18 13:34:22 -04:00
|
|
|
|
|
|
|
steps:
|
2021-08-20 11:05:38 -04:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2021-04-18 13:34:22 -04:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-08-20 11:05:38 -04:00
|
|
|
|
|
|
|
- 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"
|
|
|
|
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
|
|
|
|
run: |
|
|
|
|
./build/tools/before_install.sh
|
|
|
|
mkdir -p $PWD/localbin_${{ matrix.arch }}
|
|
|
|
|
2021-12-15 10:02:54 -05:00
|
|
|
- name: Show build environment
|
|
|
|
run: |
|
|
|
|
echo "Environment:"
|
|
|
|
env | sort
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo "Compiler version:"
|
|
|
|
${CXX-g++} --version
|
|
|
|
echo
|
|
|
|
|
2021-08-20 11:05:38 -04:00
|
|
|
- name: Configuring
|
|
|
|
run: |
|
|
|
|
wxCONFIGURE_OPTIONS="--disable-optimise $wxCONFIGURE_FLAGS"
|
2021-08-28 17:38:53 -04:00
|
|
|
|
|
|
|
if [ -n "${{ matrix.xcode_sdk }}" ]; then
|
|
|
|
sdk_path=`xcrun --sdk ${{ matrix.xcode_sdk }} --show-sdk-path`
|
|
|
|
wxCONFIGURE_OPTIONS="--with-macosx-sdk=$sdk_path $wxCONFIGURE_OPTIONS"
|
|
|
|
fi
|
|
|
|
|
2021-08-20 11:05:38 -04:00
|
|
|
./configure $wxCONFIGURE_OPTIONS --disable-debug_info || rc=$?
|
2021-08-21 10:17:26 -04:00
|
|
|
if [ ${{ matrix.use_asan }} ]; then
|
|
|
|
wxASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
|
|
|
|
wxASAN_CXXFLAGS=$wxASAN_CFLAGS
|
|
|
|
wxASAN_LDFLAGS="-fsanitize=address"
|
|
|
|
|
|
|
|
./configure $wxCONFIGURE_OPTIONS --enable-debug "CFLAGS=$wxASAN_CFLAGS" "CXXFLAGS=$wxASAN_CXXFLAGS" "LDFLAGS=$wxASAN_LDFLAGS" || rc=$?
|
|
|
|
else
|
|
|
|
./configure $wxCONFIGURE_OPTIONS --disable-debug_info || rc=$?
|
|
|
|
fi
|
2021-08-20 11:05:38 -04:00
|
|
|
if [ -n "$rc" ]; then
|
|
|
|
echo '*** Configuring failed, contents of config.log follows: ***'
|
|
|
|
echo '-----------------------------------------------------------'
|
|
|
|
cat config.log
|
|
|
|
echo '-----------------------------------------------------------'
|
|
|
|
exit $rc
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Building
|
|
|
|
run: |
|
|
|
|
make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_ERROR_CXXFLAGS"
|
|
|
|
|
|
|
|
- name: Building tests
|
|
|
|
run: |
|
2021-08-28 17:41:31 -04:00
|
|
|
make -C tests $wxBUILD_ARGS failtest
|
2021-08-20 11:05:38 -04:00
|
|
|
make -k -C tests $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS"
|
|
|
|
|
|
|
|
- name: Testing
|
|
|
|
if: matrix.skip_testing != true
|
|
|
|
working-directory: tests
|
|
|
|
run: |
|
|
|
|
. ../build/tools/httpbin.sh
|
|
|
|
httpbin_launch
|
|
|
|
export ASAN_OPTIONS=fast_unwind_on_malloc=0
|
|
|
|
# Explicitly use bash because /bin/sh doesn't have pipefail option
|
|
|
|
/bin/bash -o pipefail -c './test 2>&1 | tee test.out' || rc=$?
|
|
|
|
if [ -n "$rc" ]; then
|
|
|
|
httpbin_show_log
|
|
|
|
exit $rc
|
|
|
|
fi
|
|
|
|
|
2021-09-07 12:42:03 -04:00
|
|
|
- name: Testing GUI
|
|
|
|
if: matrix.skip_testing != true
|
|
|
|
working-directory: tests
|
|
|
|
run: |
|
Disable container overflow detection in Mac STL ASAN CI build
This seems to result in a false positive in BitmapComboBoxTestCase with
the following stack:
ERROR: AddressSanitizer: container-overflow on address 0x00010d5331c0 at pc 0x00010743e1e8 bp 0x00016b6f8940 sp 0x00016b6f8938
WRITE of size 8 at 0x00010d5331c0 thread T0
#0 0x10743e1e4 in wxString::ConvertedBuffer<char>::ConvertedBuffer() string.h:3598
#1 0x10743ddbc in wxString::ConvertedBuffer<char>::ConvertedBuffer() string.h:3598
#2 0x10743f49c in wxString::wxString(wxString const&) string.h:1157
#3 0x1074324ac in wxString::wxString(wxString const&) string.h:1157
#4 0x10747a4c4 in void std::__1::allocator<wxString>::construct<wxString, wxString const&>(wxString*, wxString const&) memory:916
#5 0x10747a3f8 in void std::__1::allocator_traits<std::__1::allocator<wxString> >::construct<wxString, wxString const&, void>(std::__1::allocator<wxString>&, wxString*, wxString const&) allocator_traits.h:288
#6 0x107479e2c in std::__1::vector<wxString, std::__1::allocator<wxString> >::__construct_at_end(unsigned long, wxString const&) vector:1063
#7 0x107479b3c in std::__1::vector<wxString, std::__1::allocator<wxString> >::insert(std::__1::__wrap_iter<wxString const*>, unsigned long, wxString const&) vector:1889
#8 0x10756085c in wxBaseArray<wxString, wxSortedArray_SortFunction<wxString> >::Insert(wxString, unsigned long, unsigned long) dynarray.h:181
#9 0x108028fbc in wxVListBoxComboPopup::Insert(wxString const&, int) odcombo.cpp:539
#10 0x108030180 in wxOwnerDrawnComboBox::DoInsertItems(wxArrayStringsAdapter const&, unsigned int, void**, wxClientDataType) odcombo.cpp:1122
#11 0x10826d690 in wxBitmapComboBox::DoInsertItems(wxArrayStringsAdapter const&, unsigned int, void**, wxClientDataType) bmpcboxg.cpp:169
#12 0x10485271c in wxItemContainer::InsertItems(wxArrayStringsAdapter const&, unsigned int, void**, wxClientDataType) ctrlsub.h:160
#13 0x1048522a0 in wxItemContainer::InsertItems(wxArrayStringsAdapter const&, unsigned int) ctrlsub.h:165
#14 0x10483c08c in wxItemContainer::Insert(wxArrayString const&, unsigned int) ctrlsub.h:247
#15 0x10483dac8 in ItemContainerTestCase::Count() itemcontainertest.cpp:96
#16 0x104866e04 in BitmapComboBoxTestCase::runTest() bitmapcomboboxtest.cpp:50
...
0x00010d5331c0 is located 64 bytes inside of 160-byte region [0x00010d533180,0x00010d533220)
allocated by thread T0 here:
#0 0x105546714 in wrap__Znwm+0x74 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x4a714)
#1 0x10747ae10 in void* std::__1::__libcpp_operator_new<unsigned long>(unsigned long) new:235
#2 0x10747ad6c in std::__1::__libcpp_allocate(unsigned long, unsigned long) new:261
#3 0x10747ace8 in std::__1::allocator<wxString>::allocate(unsigned long) memory:870
#4 0x10747ab88 in std::__1::allocator_traits<std::__1::allocator<wxString> >::allocate(std::__1::allocator<wxString>&, unsigned long) allocator_traits.h:260
#5 0x10747aac4 in std::__1::__split_buffer<wxString, std::__1::allocator<wxString>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<wxString>&) __split_buffer:314
#6 0x10747a110 in std::__1::__split_buffer<wxString, std::__1::allocator<wxString>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<wxString>&) __split_buffer:313
#7 0x107479c30 in std::__1::vector<wxString, std::__1::allocator<wxString> >::insert(std::__1::__wrap_iter<wxString const*>, unsigned long, wxString const&) vector:1904
#8 0x10756085c in wxBaseArray<wxString, wxSortedArray_SortFunction<wxString> >::Insert(wxString, unsigned long, unsigned long) dynarray.h:181
#9 0x108028fbc in wxVListBoxComboPopup::Insert(wxString const&, int) odcombo.cpp:539
#10 0x108030180 in wxOwnerDrawnComboBox::DoInsertItems(wxArrayStringsAdapter const&, unsigned int, void**, wxClientDataType) odcombo.cpp:1122
#11 0x10826d690 in wxBitmapComboBox::DoInsertItems(wxArrayStringsAdapter const&, unsigned int, void**, wxClientDataType) bmpcboxg.cpp:169
#12 0x1075590bc in wxItemContainer::DoAppendItems(wxArrayStringsAdapter const&, void**, wxClientDataType) ctrlsub.h:352
#13 0x10484c9e0 in wxItemContainer::AppendItems(wxArrayStringsAdapter const&, void**, wxClientDataType) ctrlsub.h:117
#14 0x10484c8d4 in wxItemContainer::AppendItems(wxArrayStringsAdapter const&) ctrlsub.h:122
#15 0x10483999c in wxItemContainer::Append(wxArrayString const&) ctrlsub.h:209
#16 0x10483ccfc in ItemContainerTestCase::Count() itemcontainertest.cpp:82
#17 0x104866e04 in BitmapComboBoxTestCase::runTest() bitmapcomboboxtest.cpp:50
...
2022-01-11 09:33:16 -05:00
|
|
|
# We currently need to disable container overflow detection as we get
|
|
|
|
# what seems to be a false positive in BitmapComboBoxTestCase triggered
|
|
|
|
# by creating a new string from std::allocator<wxString>::construct()
|
|
|
|
# used by std::vector<>::insert().
|
|
|
|
export ASAN_OPTIONS='fast_unwind_on_malloc=0 detect_container_overflow=0'
|
2021-09-07 16:33:42 -04:00
|
|
|
# Exclude tests that are currently known to fail
|
2021-09-22 14:43:29 -04:00
|
|
|
wx_tests_selection='~[valnum] ~wxPersistTLW ~wxPersistDVC ~wxTopLevel::Show ~wxFont::Weight ~wxFont::NativeFontInfo ~WebView ~RadioButton::Single ~RadioButton::Focus ~wxHtmlPrintout::Pagination ~wxTextCtrl::GetBestSize ~TextCtrlTestCase ~ClippingBoxTestCase::wxClientDC ~wxExecute::RedirectUTF8 ~Ellipsization::NormalCase ~SpinCtrl::* ~SpinCtrlDouble::* ~NotebookTestCase ~SettingsTestCase ~XRC::LoadURL ~Window::Show ~ModalDialogsTestCase ~Button::Click ~Button::Disabled ~wxDVC::GetItemRect ~wxDVC::AppendTextColumn ~Grid::KeyboardSelection ~Grid::CellClick ~Grid::ReorderedColumnsCellClick ~Grid::CellSelect ~wxStyledTextCtrl::AutoComp ~EvtLoopTestCase ~EventPropagationTestCase'
|
2021-09-11 07:54:24 -04:00
|
|
|
./test_gui $wx_tests_selection
|
2021-09-07 12:42:03 -04:00
|
|
|
|
2021-08-20 11:05:38 -04:00
|
|
|
- name: Building samples
|
2021-08-28 17:41:31 -04:00
|
|
|
if: matrix.skip_testing != true && matrix.skip_samples != true
|
2021-08-20 11:05:38 -04:00
|
|
|
run: |
|
|
|
|
make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS" samples
|
|
|
|
|
|
|
|
- name: Installing
|
|
|
|
if: matrix.skip_testing != true
|
|
|
|
run: |
|
|
|
|
make install
|
|
|
|
|
|
|
|
- name: Testing installation
|
|
|
|
if: matrix.skip_testing != true
|
|
|
|
run: |
|
|
|
|
make -C samples/minimal -f makefile.unx clean
|
|
|
|
make -C samples/minimal -f makefile.unx WX_CONFIG=${{ github.workspace }}/localbin_${{ matrix.arch }}/bin/wx-config $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS"
|