Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/actions/build-bundle/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +69 to +79
rm -rf "$dir"
exit $status

- name: Build package
shell: bash
run: |
Expand Down
7 changes: 7 additions & 0 deletions scripts/setup/install_kissat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading