Merge branch 'ci-drop-macos-14'

Switch CI jobs using macOS 14 to 15 and fix new warnings when using
newer Apple clang used on this GitHub Actions image.

See #27153.
This commit is contained in:
Vadim Zeitlin
2026-10-04 19:29:06 +02:00
10 changed files with 45 additions and 39 deletions
+4 -4
View File
@@ -61,8 +61,8 @@ jobs:
cmake_generator: Unix Makefiles
cmake_samples: ALL
cmake_build_toolkit: gtk3
- name: macOS 14 wxOSX Xcode
runner: macos-14
- name: macOS 15 wxOSX Xcode
runner: macos-15
cmake_generator: Xcode
cmake_defines: -DCMAKE_OSX_DEPLOYMENT_TARGET="10.13"
cmake_build_toolkit: osx_cocoa
@@ -79,8 +79,8 @@ jobs:
cmake_samples: SOME
cmake_tests: OFF
cmake_build_toolkit: gtk3
- name: macOS 14 wxIOS
runner: macos-14
- name: macOS 15 wxIOS
runner: macos-15
cmake_generator: Xcode
cmake_defines: -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_FIND_ROOT_PATH=/usr/local -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO
cmake_samples: OFF
+3 -3
View File
@@ -88,15 +88,15 @@ jobs:
configure_flags: --enable-std_string_conv_in_wxstring --disable-compat32 --disable-sys-libs
use_asan: true
- name: wxMac Intel C++17
runner: macos-14
runner: macos-15
arch: x86_64
configure_flags: --with-cxx=17 --with-macosx-version-min=10.12
- name: wxMac Universal C++14
runner: macos-14
runner: macos-15
arch: arm64
configure_flags: --with-cxx=14 --enable-universal_binary=arm64,x86_64 --disable-shared --disable-sys-libs --disable-debug --enable-optimise
- name: wxiOS
runner: macos-14
runner: macos-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
configure_env: PKG_CONFIG_LIBDIR=/dev/null
+1 -1
View File
@@ -90,7 +90,7 @@ jobs:
configuration: 'Release'
project: samples/minimal/minimal_cocoa.xcodeproj
- name: iOS static Debug
runner: macos-14
runner: macos-15
scheme: 'static'
destination: 'generic/platform=iOS'
arch: x86_64
+17 -11
View File
@@ -685,17 +685,6 @@ int wxSsize(const C& c)
# define wxGCC_ONLY_WARNING_RESTORE(x)
#endif
/* Specific macros for -Wcast-function-type warning new in gcc 8. */
#if wxCHECK_GCC_VERSION(8, 0)
#define wxGCC_WARNING_SUPPRESS_CAST_FUNCTION_TYPE() \
wxGCC_WARNING_SUPPRESS(cast-function-type)
#define wxGCC_WARNING_RESTORE_CAST_FUNCTION_TYPE() \
wxGCC_WARNING_RESTORE(cast-function-type)
#else
#define wxGCC_WARNING_SUPPRESS_CAST_FUNCTION_TYPE()
#define wxGCC_WARNING_RESTORE_CAST_FUNCTION_TYPE()
#endif
/*
Macros to suppress and restore clang warning only when it is valid.
@@ -719,6 +708,23 @@ int wxSsize(const C& c)
# define wxCLANG_WARNING_RESTORE(x)
#endif
/*
Specific macros for -Wcast-function-type warning new in gcc 8 and also
supported by clang, which enables its -Wcast-function-type-mismatch subset
by default in some versions (e.g. Apple clang 17).
*/
#if wxCHECK_GCC_VERSION(8, 0)
#define wxWARNING_SUPPRESS_CAST_FUNCTION_TYPE() \
wxGCC_WARNING_SUPPRESS(cast-function-type)
#define wxWARNING_RESTORE_CAST_FUNCTION_TYPE() \
wxGCC_WARNING_RESTORE(cast-function-type)
#else
#define wxWARNING_SUPPRESS_CAST_FUNCTION_TYPE() \
wxCLANG_WARNING_SUPPRESS(cast-function-type)
#define wxWARNING_RESTORE_CAST_FUNCTION_TYPE() \
wxCLANG_WARNING_RESTORE(cast-function-type)
#endif
/*
Macros to suppress and restore MSVC warnings, taking the warning number.
+2 -4
View File
@@ -139,13 +139,11 @@ inline wxEventFunction wxEventFunctionCast(void (wxEvtHandler::*func)(T&))
// them locally to avoid generating hundreds of them when compiling any
// code using event table macros.
wxGCC_WARNING_SUPPRESS_CAST_FUNCTION_TYPE()
wxCLANG_WARNING_SUPPRESS(cast-function-type)
wxWARNING_SUPPRESS_CAST_FUNCTION_TYPE()
return reinterpret_cast<wxEventFunction>(func);
wxCLANG_WARNING_RESTORE(cast-function-type)
wxGCC_WARNING_RESTORE_CAST_FUNCTION_TYPE()
wxWARNING_RESTORE_CAST_FUNCTION_TYPE()
}
// In good old pre-C++17 times we could just static_cast the event handler,
+2 -2
View File
@@ -209,11 +209,11 @@ public:
template <typename T>
static T GetProcAddress(const wxString& name)
{
wxGCC_WARNING_SUPPRESS_CAST_FUNCTION_TYPE()
wxWARNING_SUPPRESS_CAST_FUNCTION_TYPE()
return reinterpret_cast<T>(GetProcAddress(name));
wxGCC_WARNING_RESTORE_CAST_FUNCTION_TYPE()
wxWARNING_RESTORE_CAST_FUNCTION_TYPE()
}
protected:
+6 -4
View File
@@ -59,14 +59,16 @@ protected:
virtual void DoYieldFor(long eventsToProcess) override;
void CommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity);
void DefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity);
void CommonModeObserverCallBack(CFRunLoopObserverRef observer, unsigned long activity);
void DefaultModeObserverCallBack(CFRunLoopObserverRef observer, unsigned long activity);
// set to false to avoid idling at unexpected moments - eg when having native message boxes
void SetProcessIdleEvents(bool process) { m_processIdleEvents = process; }
static void OSXCommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info);
static void OSXDefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info);
// Those are used as CFRunLoopObserverCallBack and so must have the same
// signature, in particular use "unsigned long" for CFRunLoopActivity.
static void OSXCommonModeObserverCallBack(CFRunLoopObserverRef observer, unsigned long activity, void *info);
static void OSXDefaultModeObserverCallBack(CFRunLoopObserverRef observer, unsigned long activity, void *info);
// get the currently executing CFRunLoop
virtual CFRunLoopRef CFGetCurrentRunLoop() const;
+2 -2
View File
@@ -403,9 +403,9 @@ void wxGUIEventLoop::DoYieldFor(long eventsToProcess)
while (Pending()) // avoid false positives from our idle source
gtk_main_iteration();
wxGCC_WARNING_SUPPRESS_CAST_FUNCTION_TYPE()
wxWARNING_SUPPRESS_CAST_FUNCTION_TYPE()
gdk_event_handler_set ((GdkEventFunc)gtk_main_do_event, nullptr, nullptr);
wxGCC_WARNING_RESTORE_CAST_FUNCTION_TYPE()
wxWARNING_RESTORE_CAST_FUNCTION_TYPE()
wxEventLoopBase::DoYieldFor(eventsToProcess);
+6 -6
View File
@@ -69,21 +69,21 @@ wxCFEventLoopSource::~wxCFEventLoopSource()
#endif // wxUSE_EVENTLOOP_SOURCE
void wxCFEventLoop::OSXCommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info)
void wxCFEventLoop::OSXCommonModeObserverCallBack(CFRunLoopObserverRef observer, unsigned long activity, void *info)
{
wxCFEventLoop * eventloop = static_cast<wxCFEventLoop *>(info);
if ( eventloop && eventloop->IsRunning() )
eventloop->CommonModeObserverCallBack(observer, activity);
}
void wxCFEventLoop::OSXDefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info)
void wxCFEventLoop::OSXDefaultModeObserverCallBack(CFRunLoopObserverRef observer, unsigned long activity, void *info)
{
wxCFEventLoop * eventloop = static_cast<wxCFEventLoop *>(info);
if ( eventloop && eventloop->IsRunning() )
eventloop->DefaultModeObserverCallBack(observer, activity);
}
void wxCFEventLoop::CommonModeObserverCallBack(CFRunLoopObserverRef WXUNUSED(observer), int activity)
void wxCFEventLoop::CommonModeObserverCallBack(CFRunLoopObserverRef WXUNUSED(observer), unsigned long activity)
{
if ( activity & kCFRunLoopBeforeTimers )
{
@@ -116,7 +116,7 @@ void wxCFEventLoop::CommonModeObserverCallBack(CFRunLoopObserverRef WXUNUSED(obs
void
wxCFEventLoop::DefaultModeObserverCallBack(CFRunLoopObserverRef WXUNUSED(observer),
int WXUNUSED(activity))
unsigned long WXUNUSED(activity))
{
/*
if ( activity & kCFRunLoopBeforeTimers )
@@ -145,11 +145,11 @@ wxCFEventLoop::wxCFEventLoop()
bzero( &ctxt, sizeof(ctxt) );
ctxt.info = this;
m_commonModeRunLoopObserver = CFRunLoopObserverCreate( kCFAllocatorDefault, kCFRunLoopBeforeTimers | kCFRunLoopBeforeWaiting , true /* repeats */, 0,
(CFRunLoopObserverCallBack) wxCFEventLoop::OSXCommonModeObserverCallBack, &ctxt );
wxCFEventLoop::OSXCommonModeObserverCallBack, &ctxt );
CFRunLoopAddObserver(m_runLoop, m_commonModeRunLoopObserver, kCFRunLoopCommonModes);
m_defaultModeRunLoopObserver = CFRunLoopObserverCreate( kCFAllocatorDefault, kCFRunLoopBeforeTimers | kCFRunLoopBeforeWaiting , true /* repeats */, 0,
(CFRunLoopObserverCallBack) wxCFEventLoop::OSXDefaultModeObserverCallBack, &ctxt );
wxCFEventLoop::OSXDefaultModeObserverCallBack, &ctxt );
CFRunLoopAddObserver(m_runLoop, m_defaultModeRunLoopObserver, kCFRunLoopDefaultMode);
}
+2 -2
View File
@@ -168,10 +168,10 @@ TEST_CASE("Event::BuiltinConnect", "[event][connect]")
// using casts like this is even uglier than using wxIdleEventHandler and
// results in warnings with gcc, but it should still continue to work for
// compatibility
wxGCC_WARNING_SUPPRESS_CAST_FUNCTION_TYPE()
wxWARNING_SUPPRESS_CAST_FUNCTION_TYPE()
handler.Connect(wxEVT_IDLE, (wxObjectEventFunction)(wxEventFunction)&MyHandler::OnIdle);
handler.Disconnect(wxEVT_IDLE, (wxObjectEventFunction)(wxEventFunction)&MyHandler::OnIdle);
wxGCC_WARNING_RESTORE_CAST_FUNCTION_TYPE()
wxWARNING_RESTORE_CAST_FUNCTION_TYPE()
handler.Bind(wxEVT_IDLE, GlobalOnIdle);
handler.Unbind(wxEVT_IDLE, GlobalOnIdle);