Skip to content

The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.

1.1 KB
Raw Blame
#!/usr/bin/env bash
# Emit the producer group and cibuildwheel identifier for each tagged platform and ABI.
set -euo pipefail
cd "${1:?expected the release checkout}"
version=$(sed -nE 's/^[[:space:]]*uses: pypa\/cibuildwheel@v([0-9]+\.[0-9]+\.[0-9]+)[[:space:]]*$/\1/p' .github/workflows/build-wheels.yml)
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo 'Missing tagged cibuildwheel version' >&2; exit 1; }
venv="$RUNNER_TEMP/wheel-identifiers-venv"
python3 -m venv "$venv"
"$venv/bin/pip" --disable-pip-version-check install "cibuildwheel==$version" >&2
platforms=$(jq -er '.platforms[] | [.os, .rust_target] | @tsv' .github/ci-config.json)
while IFS=$'\t' read -r os target; do
  case "$target" in
    *-unknown-linux-gnu) platform=linux; arch=${target%%-*} ;;
    aarch64-apple-darwin) platform=macos; arch=arm64 ;;
    *) echo "Unsupported wheel target: $target" >&2; exit 1 ;;
  esac
  "$venv/bin/cibuildwheel" --print-build-identifiers --platform "$platform" --archs "$arch" sdks/python </dev/null |
    awk -v group="wheels-$os" '{print group "\t" $0}'
done <<< "$platforms"