From 9da9db069cc8354efe7ada679ca029d56d15e770 Mon Sep 17 00:00:00 2001 From: Takeshi Nakatani Date: Tue, 14 Oct 2025 12:57:03 +0000 Subject: [PATCH] Change CI test macos from macos-13 to macos-14 --- .github/workflows/ci.yml | 12 ++++++++++-- test/integration-test-common.sh | 18 ++++++++++++++---- test/test-utils.sh | 13 ++++++++++++- 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d32f592..18964c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/test/integration-test-common.sh b/test/integration-test-common.sh index c3eb680..ede4d12 100644 --- a/test/integration-test-common.sh +++ b/test/integration-test-common.sh @@ -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=$(/dev/null | grep -q 'arm64e'; then + export STDBUF_BIN="gstdbuf" + else + export STDBUF_BIN="" + fi export TRUNCATE_BIN="gtruncate" export SED_BIN="gsed" else