From 73ce5e051c2c445de73d1f109ab036955529b403 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sun, 16 Nov 2025 15:09:26 +0100 Subject: [PATCH] Add min os and arch inspection (#6259) --- .ci/compile.sh | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.ci/compile.sh b/.ci/compile.sh index 6c8a7db18..a7c349fb0 100755 --- a/.ci/compile.sh +++ b/.ci/compile.sh @@ -156,6 +156,7 @@ function ccachestatsverbose() { # Compile if [[ $RUNNER_OS == macOS ]]; then + if [[ $TARGET_MACOS_VERSION ]]; then # CMAKE_OSX_DEPLOYMENT_TARGET is a vanilla cmake flag needed to compile to target macOS version flags+=("-DCMAKE_OSX_DEPLOYMENT_TARGET=$TARGET_MACOS_VERSION") @@ -202,17 +203,18 @@ if [[ $RUNNER_OS == macOS ]]; then hdiutil_script="/tmp/hdiutil.sh" # shellcheck disable=SC2016 echo '#!/bin/bash -i=0 -while ! hdiutil "$@"; do - if (( ++i >= 10 )); then - echo "Error: hdiutil failed $i times!" >&2 - break - fi - sleep 1 -done' >"$hdiutil_script" + i=0 + while ! hdiutil "$@"; do + if (( ++i >= 10 )); then + echo "Error: hdiutil failed $i times!" >&2 + break + fi + sleep 1 + done' >"$hdiutil_script" chmod +x "$hdiutil_script" flags+=(-DCPACK_COMMAND_HDIUTIL="$hdiutil_script") fi + elif [[ $RUNNER_OS == Windows ]]; then # Enable MTT, see https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/ # and https://devblogs.microsoft.com/cppblog/cpp-build-throughput-investigation-and-tune-up/#multitooltask-mtt @@ -242,6 +244,19 @@ if [[ $USE_CCACHE ]]; then echo "::endgroup::" fi +if [[ $RUNNER_OS == macOS ]]; then + echo "::group::Inspect Mach-O binaries" + for app in cockatrice oracle servatrice dbconverter; do + binary="$GITHUB_WORKSPACE/build/$app/$app.app/Contents/MacOS/$app" + echo "Inspecting $app..." + vtool -show-build "$binary" + file "$binary" + lipo -info "$binary" + echo "" + done + echo "::endgroup::" +fi + if [[ $MAKE_TEST ]]; then echo "::group::Run tests" ctest -C "$BUILDTYPE" --output-on-failure @@ -256,7 +271,6 @@ fi if [[ $MAKE_PACKAGE ]]; then echo "::group::Create package" - cmake --build . --target package --config "$BUILDTYPE" echo "::endgroup::"