From 59a8241fddc0750fe5a741e1adae048ed67794ea Mon Sep 17 00:00:00 2001 From: "Felipe R. Monteiro" Date: Fri, 13 Nov 2026 02:12:04 +0000 Subject: [PATCH] Build kissat for macOS 11.0 and check the bundle's minimum macOS The bundled kissat is built from source on the release runner, so it targets the runner's macOS. Since the x86_64 bundle moved to macos-15-intel (#4442), its kissat requires macOS 15.0, and with #5138 the aarch64 kissat does too (0.68.0 shipped one requiring 14.0). Every other binary in the bundle targets 11.0. Set MACOSX_DEPLOYMENT_TARGET=11.0 for the kissat build on macOS, and fail the macOS bundle builds when any bundled binary requires a newer macOS, so the next runner upgrade cannot drop support silently. Signed-off-by: Felipe R. Monteiro --- .github/actions/build-bundle/action.yml | 25 +++++++++++++++++++++++++ scripts/setup/install_kissat.sh | 7 +++++++ 2 files changed, 32 insertions(+) diff --git a/.github/actions/build-bundle/action.yml b/.github/actions/build-bundle/action.yml index 84d60d77a7df..612cc67148d1 100644 --- a/.github/actions/build-bundle/action.yml +++ b/.github/actions/build-bundle/action.yml @@ -55,6 +55,31 @@ runs: cargo bundle -- ${{ env.VERSION }} echo "BUNDLE=kani-${{ env.VERSION }}-${{ inputs.platform }}.tar.gz" >> $GITHUB_ENV + - name: Check minimum macOS version + if: ${{ runner.os == 'macOS' }} + shell: bash + run: | + # Every binary in the bundle must run on macOS 11.0, the oldest version rustc targets. A tool + # built from source on the runner targets the runner's macOS unless told otherwise, so a + # runner upgrade can silently drop support for older versions. + oldest=11.0 + dir=$(mktemp -d) + tar -xzf "${{ env.BUNDLE }}" -C "$dir" + status=0 + for bin in "$dir"/kani-*/bin/*; do + file "$bin" | grep -q Mach-O || continue + minos=$(otool -l "$bin" | awk ' + /LC_BUILD_VERSION/ { b = 1 } b && $1 == "minos" { print $2; b = 0 } + /LC_VERSION_MIN_MACOSX/ { v = 1 } v && $1 == "version" { print $2; v = 0 }' | sort -V | tail -1) + echo "$(basename "$bin"): minimum macOS ${minos:-unknown}" + if [ -z "$minos" ] || [ "$(printf '%s\n%s\n' "$minos" "$oldest" | sort -V | tail -1)" != "$oldest" ]; then + echo "::error::$(basename "$bin") requires macOS ${minos:-unknown}, but the bundle must run on macOS $oldest" + status=1 + fi + done + rm -rf "$dir" + exit $status + - name: Build package shell: bash run: | diff --git a/scripts/setup/install_kissat.sh b/scripts/setup/install_kissat.sh index 7b2e86f3c27e..2f5a9d008e7e 100755 --- a/scripts/setup/install_kissat.sh +++ b/scripts/setup/install_kissat.sh @@ -28,6 +28,13 @@ fi FILE="rel-${KISSAT_VERSION}.tar.gz" URL="https://github.com/arminbiere/kissat/archive/refs/tags/$FILE" +# The release bundle ships this binary. On macOS, build it for macOS 11.0, the oldest version that rustc +# targets for both macOS targets and that the rest of the bundle supports, instead of the runner's own +# version (which compilers use by default). +if [[ "$(uname)" == "Darwin" ]]; then + export MACOSX_DEPLOYMENT_TARGET=11.0 +fi + set -x curl -L --remote-name "$URL"