Change CI test macos from macos-13 to macos-14

This commit is contained in:
Takeshi Nakatani
2025-10-14 12:57:03 +00:00
committed by Andrew Gaul
parent 11a362939f
commit 9da9db069c
3 changed files with 36 additions and 7 deletions

View File

@ -116,8 +116,15 @@ jobs:
# This job doesn't work with GitHub Actions using macOS 11+ because "load_osxfuse" returns
# "exit code = 1".(requires OS reboot)
#
macos-13:
runs-on: macos-13
macos-14:
runs-on: macos-14
# [NOTE]
# In macos-14 (and maybe later), the location of the CA certificate is different and you need to specify it.
# We give the CA path as an environment variable.
#
env:
CURL_CA_BUNDLE: "/opt/homebrew/etc/ca-certificates/cert.pem"
steps:
- name: Checkout source code
@ -132,6 +139,7 @@ jobs:
- name: Install fuse-t
run: |
if [ ! -d /usr/local/include ]; then sudo mkdir -p /usr/local/include; echo "Created /usr/local/include directory"; fi
HOMEBREW_NO_AUTO_UPDATE=1 brew install fuse-t
- name: Install brew other packages

View File

@ -118,6 +118,16 @@ if [ ! -d "${TEST_BUCKET_MOUNT_POINT_1}" ]; then
mkdir -p "${TEST_BUCKET_MOUNT_POINT_1}"
fi
# [NOTE]
# For the Github Actions macos-14 Runner,
# Set variables for when stdbuf is used and when it is not.
#
if [ -n "${STDBUF_BIN}" ]; then
STDBUF_COMMAND_LINE=("${STDBUF_BIN}" -oL -eL)
else
STDBUF_COMMAND_LINE=()
fi
# This function execute the function parameters $1 times
# before giving up, with 1 second delays.
function retry {
@ -181,7 +191,7 @@ function start_s3proxy {
S3PROXY_CACERT_FILE=""
fi
"${STDBUF_BIN}" -oL -eL java -jar "${S3PROXY_BINARY}" --properties "${S3PROXY_CONFIG}" &
"${STDBUF_COMMAND_LINE[@]}" java -jar "${S3PROXY_BINARY}" --properties "${S3PROXY_CONFIG}" &
S3PROXY_PID=$!
# wait for S3Proxy to start
@ -197,7 +207,7 @@ function start_s3proxy {
chmod +x "${CHAOS_HTTP_PROXY_BINARY}"
fi
"${STDBUF_BIN}" -oL -eL java -jar "${CHAOS_HTTP_PROXY_BINARY}" --properties chaos-http-proxy.conf &
"${STDBUF_COMMAND_LINE[@]}" java -jar "${CHAOS_HTTP_PROXY_BINARY}" --properties chaos-http-proxy.conf &
CHAOS_HTTP_PROXY_PID=$!
# wait for Chaos HTTP Proxy to start
@ -317,7 +327,7 @@ function start_s3fs {
(
set -x
CURL_CA_BUNDLE="${S3PROXY_CACERT_FILE}" \
${STDBUF_BIN} -oL -eL \
"${STDBUF_COMMAND_LINE[@]}" \
${VALGRIND_EXEC} \
${S3FS} \
${TEST_BUCKET_1} \
@ -340,7 +350,7 @@ function start_s3fs {
-f \
"${@}" &
echo $! >&3
) 3>pid | "${STDBUF_BIN}" -oL -eL "${SED_BIN}" "${SED_BUFFER_FLAG}" "s/^/s3fs: /" &
) 3>pid | "${STDBUF_COMMAND_LINE[@]}" "${SED_BIN}" "${SED_BUFFER_FLAG}" "s/^/s3fs: /" &
sleep 1
S3FS_PID=$(<pid)
export S3FS_PID

View File

@ -58,7 +58,18 @@ export LC_ALL=en_US.UTF-8
# Set your PATH appropriately so that you can find these commands.
#
if [ "$(uname)" = "Darwin" ]; then
export STDBUF_BIN="gstdbuf"
# [NOTE][TODO]
# In macos-14(and maybe later), currently coreutils' gstdbuf doesn't
# work with the Github Actions Runner.
# This is because libstdbuf.so is arm64, when arm64e is required.
# To resolve this case, we'll avoid making calls to stdbuf. This can
# result in mixed log output, but there is currently no workaround.
#
if lipo -archs /opt/homebrew/Cellar/coreutils/9.8/libexec/coreutils/libstdbuf.so 2>/dev/null | grep -q 'arm64e'; then
export STDBUF_BIN="gstdbuf"
else
export STDBUF_BIN=""
fi
export TRUNCATE_BIN="gtruncate"
export SED_BIN="gsed"
else