diff --git a/.buildkite/pipeline-for-tags.yml b/.buildkite/pipeline-for-tags.yml index f33895a09..31adf7178 100644 --- a/.buildkite/pipeline-for-tags.yml +++ b/.buildkite/pipeline-for-tags.yml @@ -117,3 +117,42 @@ steps: - mkdir -p srcs - buildkite-agent artifact download "epel/*" srcs --step sign-source-packages-built-from-static-binaries - nix develop .#buildkite -c ./docker/build/fedora/upload.py -d srcs/epel --upload epel + + - label: Build Monterey x86_64 bottles + key: build-bottles-monterey-x86_64 + if: build.tag =~ /^v.*/ + agents: + queue: "x86_64-rosetta-darwin" + commands: + - nix develop .#autorelease-macos -c ./scripts/build-all-bottles.sh "monterey" + artifact_paths: + - '*.bottle.*' + retry: + automatic: + limit: 1 + + - label: Build Monterey arm64 bottles + key: build-bottles-monterey-arm64 + if: build.tag =~ /^v.*/ + agents: + queue: "arm64-darwin" + commands: + - nix develop .#autorelease-macos -c ./scripts/build-all-bottles.sh "arm64_monterey" + artifact_paths: + - '*.bottle.*' + retry: + automatic: + limit: 1 + + # We use the tag that triggered the pipeline here. + # However, this requires that the tag and the release name are the same, which + # in practice it's always the case in this repo. + - label: Add Monterey bottle hashes to formulae + depends_on: + - "build-bottles-monterey-arm64" + - "build-bottles-monterey-x86_64" + if: build.tag =~ /^v.*/ + commands: + - mkdir -p "Monterey" + - nix develop .#buildkite -c gh release download "$BUILDKITE_TAG" -D "Monterey/" -p "*monterey.bottle.tar.gz" + - nix develop .#autorelease -c ./scripts/sync-bottle-hashes.sh "$BUILDKITE_TAG" "Monterey" diff --git a/docs/support-policy.md b/docs/support-policy.md index 5ab56bbce..668c2bd84 100644 --- a/docs/support-policy.md +++ b/docs/support-policy.md @@ -51,4 +51,4 @@ Brew formulae provided by `tezos-packaging` aim to support all maintained macOS Unfortunately, the ability to provide pre-compiled brew bottles for formulae has a hard dependency on the available build infrastructure. Thus we currently only provide brew bottles for these two macOS versions: -* macOS 12 (Monterey) `x86_64` only +* macOS 12 (Monterey) both `x86_64` and `arm64` diff --git a/scripts/bottle-hashes.sh b/scripts/bottle-hashes.sh index bb478228b..37c625827 100755 --- a/scripts/bottle-hashes.sh +++ b/scripts/bottle-hashes.sh @@ -11,7 +11,7 @@ if [[ -d ./Formula ]] then if [[ -d "$1" ]] then - regex="(tezos-.*)-v.*\.(monterey|big_sur|arm64_big_sur)\.bottle\.tar\.gz" + regex="(tezos-.*)-v.*\.(monterey|arm64_monterey)\.bottle\.tar\.gz" for bottle in "$1"/tezos-*.bottle.tar.gz; do if [[ $bottle =~ $regex ]]; then bottle_hash=$(sha256sum "$bottle" | cut -d " " -f 1) diff --git a/scripts/update-brew-formulae.sh b/scripts/update-brew-formulae.sh index 6dd7e1d0b..3dafe823b 100755 --- a/scripts/update-brew-formulae.sh +++ b/scripts/update-brew-formulae.sh @@ -16,6 +16,7 @@ then -exec sed -i "s/:tag => \"v.*\"/:tag => \"$version\"/g" {} \; \ -exec sed -i "/catalina/d" {} \; \ -exec sed -i "/monterey/d" {} \; \ + -exec sed -i "/arm64_monterey/d" {} \; \ -exec sed -i "/mojave/d" {} \; \ -exec sed -i "/big_sur/d" {} \; \ -exec sed -i "/arm64_big_sur/d" {} \; diff --git a/tests/bottle-hashes/test-hash-insert.sh b/tests/bottle-hashes/test-hash-insert.sh index ba9b960e1..2caaf6841 100755 --- a/tests/bottle-hashes/test-hash-insert.sh +++ b/tests/bottle-hashes/test-hash-insert.sh @@ -34,18 +34,15 @@ end EOL monterey_bottle="$formula_name-v0.0-0.monterey.bottle.tar.gz" -big_sur_bottle="$formula_name-v0.0-0.big_sur.bottle.tar.gz" # Generate some dummy bottles dd if=/dev/urandom of=$bottle_dir/$monterey_bottle count=2000 status=none -dd if=/dev/urandom of=$bottle_dir/$big_sur_bottle count=2000 status=none # Run the hash inserting script ../../scripts/bottle-hashes.sh "$bottle_dir" "v0.0-1" # Assert the info was inserted correctly monterey_hash="$(sha256sum $bottle_dir/$monterey_bottle | cut -d " " -f 1)" -big_sur_hash="$(sha256sum $bottle_dir/$big_sur_bottle | cut -d " " -f 1)" expected_formula=$(cat << EOF class TezosHashTest < Formula @@ -60,7 +57,6 @@ class TezosHashTest < Formula bottle do root_url "https://github.com/serokell/tezos-packaging/releases/download/#{TezosHashTest.version}/" sha256 cellar: :any, monterey: "$monterey_hash" - sha256 cellar: :any, big_sur: "$big_sur_hash" end def install