Merge branch 'js/ci-use-macos-13'
Replace macos-12 used at GitHub CI with macos-13. * js/ci-use-macos-13: ci: upgrade to using macos-13 This is another backport to `maint-2.39` to allow less CI jobs to break. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
This commit is contained in:
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
@ -262,11 +262,11 @@ jobs:
|
|||||||
pool: ubuntu-20.04
|
pool: ubuntu-20.04
|
||||||
- jobname: osx-clang
|
- jobname: osx-clang
|
||||||
cc: clang
|
cc: clang
|
||||||
pool: macos-12
|
pool: macos-13
|
||||||
- jobname: osx-gcc
|
- jobname: osx-gcc
|
||||||
cc: gcc
|
cc: gcc
|
||||||
cc_package: gcc-9
|
cc_package: gcc-13
|
||||||
pool: macos-12
|
pool: macos-13
|
||||||
- jobname: linux-gcc-default
|
- jobname: linux-gcc-default
|
||||||
cc: gcc
|
cc: gcc
|
||||||
pool: ubuntu-latest
|
pool: ubuntu-latest
|
||||||
|
@ -253,11 +253,9 @@ ubuntu-*)
|
|||||||
export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH"
|
export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH"
|
||||||
;;
|
;;
|
||||||
macos-*)
|
macos-*)
|
||||||
if [ "$jobname" = osx-gcc ]
|
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)"
|
||||||
|
if [ "$jobname" != osx-gcc ]
|
||||||
then
|
then
|
||||||
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)"
|
|
||||||
else
|
|
||||||
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)"
|
|
||||||
MAKEFLAGS="$MAKEFLAGS NO_APPLE_COMMON_CRYPTO=NoThanks"
|
MAKEFLAGS="$MAKEFLAGS NO_APPLE_COMMON_CRYPTO=NoThanks"
|
||||||
MAKEFLAGS="$MAKEFLAGS NO_OPENSSL=NoThanks"
|
MAKEFLAGS="$MAKEFLAGS NO_OPENSSL=NoThanks"
|
||||||
fi
|
fi
|
||||||
|
@ -80,9 +80,7 @@ void CFRunLoopRun(void);
|
|||||||
void CFRunLoopStop(CFRunLoopRef run_loop);
|
void CFRunLoopStop(CFRunLoopRef run_loop);
|
||||||
CFRunLoopRef CFRunLoopGetCurrent(void);
|
CFRunLoopRef CFRunLoopGetCurrent(void);
|
||||||
extern CFStringRef kCFRunLoopDefaultMode;
|
extern CFStringRef kCFRunLoopDefaultMode;
|
||||||
void FSEventStreamScheduleWithRunLoop(FSEventStreamRef stream,
|
void FSEventStreamSetDispatchQueue(FSEventStreamRef stream, dispatch_queue_t q);
|
||||||
CFRunLoopRef run_loop,
|
|
||||||
CFStringRef run_loop_mode);
|
|
||||||
unsigned char FSEventStreamStart(FSEventStreamRef stream);
|
unsigned char FSEventStreamStart(FSEventStreamRef stream);
|
||||||
void FSEventStreamStop(FSEventStreamRef stream);
|
void FSEventStreamStop(FSEventStreamRef stream);
|
||||||
void FSEventStreamInvalidate(FSEventStreamRef stream);
|
void FSEventStreamInvalidate(FSEventStreamRef stream);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#ifndef __clang__
|
#ifndef __clang__
|
||||||
|
#include <dispatch/dispatch.h>
|
||||||
#include "fsm-darwin-gcc.h"
|
#include "fsm-darwin-gcc.h"
|
||||||
#else
|
#else
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
@ -38,7 +39,9 @@ struct fsm_listen_data
|
|||||||
|
|
||||||
FSEventStreamRef stream;
|
FSEventStreamRef stream;
|
||||||
|
|
||||||
CFRunLoopRef rl;
|
dispatch_queue_t dq;
|
||||||
|
pthread_cond_t dq_finished;
|
||||||
|
pthread_mutex_t dq_lock;
|
||||||
|
|
||||||
enum shutdown_style {
|
enum shutdown_style {
|
||||||
SHUTDOWN_EVENT = 0,
|
SHUTDOWN_EVENT = 0,
|
||||||
@ -379,8 +382,11 @@ force_shutdown:
|
|||||||
fsmonitor_batch__free_list(batch);
|
fsmonitor_batch__free_list(batch);
|
||||||
string_list_clear(&cookie_list, 0);
|
string_list_clear(&cookie_list, 0);
|
||||||
|
|
||||||
|
pthread_mutex_lock(&data->dq_lock);
|
||||||
data->shutdown_style = FORCE_SHUTDOWN;
|
data->shutdown_style = FORCE_SHUTDOWN;
|
||||||
CFRunLoopStop(data->rl);
|
pthread_cond_broadcast(&data->dq_finished);
|
||||||
|
pthread_mutex_unlock(&data->dq_lock);
|
||||||
|
|
||||||
strbuf_release(&tmp);
|
strbuf_release(&tmp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -441,10 +447,6 @@ int fsm_listen__ctor(struct fsmonitor_daemon_state *state)
|
|||||||
if (!data->stream)
|
if (!data->stream)
|
||||||
goto failed;
|
goto failed;
|
||||||
|
|
||||||
/*
|
|
||||||
* `data->rl` needs to be set inside the listener thread.
|
|
||||||
*/
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
failed:
|
failed:
|
||||||
@ -471,6 +473,11 @@ void fsm_listen__dtor(struct fsmonitor_daemon_state *state)
|
|||||||
FSEventStreamRelease(data->stream);
|
FSEventStreamRelease(data->stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data->dq)
|
||||||
|
dispatch_release(data->dq);
|
||||||
|
pthread_cond_destroy(&data->dq_finished);
|
||||||
|
pthread_mutex_destroy(&data->dq_lock);
|
||||||
|
|
||||||
FREE_AND_NULL(state->listen_data);
|
FREE_AND_NULL(state->listen_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -479,9 +486,11 @@ void fsm_listen__stop_async(struct fsmonitor_daemon_state *state)
|
|||||||
struct fsm_listen_data *data;
|
struct fsm_listen_data *data;
|
||||||
|
|
||||||
data = state->listen_data;
|
data = state->listen_data;
|
||||||
data->shutdown_style = SHUTDOWN_EVENT;
|
|
||||||
|
|
||||||
CFRunLoopStop(data->rl);
|
pthread_mutex_lock(&data->dq_lock);
|
||||||
|
data->shutdown_style = SHUTDOWN_EVENT;
|
||||||
|
pthread_cond_broadcast(&data->dq_finished);
|
||||||
|
pthread_mutex_unlock(&data->dq_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fsm_listen__loop(struct fsmonitor_daemon_state *state)
|
void fsm_listen__loop(struct fsmonitor_daemon_state *state)
|
||||||
@ -490,9 +499,11 @@ void fsm_listen__loop(struct fsmonitor_daemon_state *state)
|
|||||||
|
|
||||||
data = state->listen_data;
|
data = state->listen_data;
|
||||||
|
|
||||||
data->rl = CFRunLoopGetCurrent();
|
pthread_mutex_init(&data->dq_lock, NULL);
|
||||||
|
pthread_cond_init(&data->dq_finished, NULL);
|
||||||
|
data->dq = dispatch_queue_create("FSMonitor", NULL);
|
||||||
|
|
||||||
FSEventStreamScheduleWithRunLoop(data->stream, data->rl, kCFRunLoopDefaultMode);
|
FSEventStreamSetDispatchQueue(data->stream, data->dq);
|
||||||
data->stream_scheduled = 1;
|
data->stream_scheduled = 1;
|
||||||
|
|
||||||
if (!FSEventStreamStart(data->stream)) {
|
if (!FSEventStreamStart(data->stream)) {
|
||||||
@ -501,7 +512,9 @@ void fsm_listen__loop(struct fsmonitor_daemon_state *state)
|
|||||||
}
|
}
|
||||||
data->stream_started = 1;
|
data->stream_started = 1;
|
||||||
|
|
||||||
CFRunLoopRun();
|
pthread_mutex_lock(&data->dq_lock);
|
||||||
|
pthread_cond_wait(&data->dq_finished, &data->dq_lock);
|
||||||
|
pthread_mutex_unlock(&data->dq_lock);
|
||||||
|
|
||||||
switch (data->shutdown_style) {
|
switch (data->shutdown_style) {
|
||||||
case FORCE_ERROR_STOP:
|
case FORCE_ERROR_STOP:
|
||||||
|
Reference in New Issue
Block a user