From c1fc6a5eb8c971fc43041d3df34cf8bd49f31032 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Mon, 22 Sep 2025 09:13:44 -0400 Subject: [PATCH] release: build aarch64 artifacts for macos on GitHub Actions GitHub now supports this natively, so there's no need for me to do it any more. Fixes #3155 --- .github/workflows/release.yml | 4 ++++ CHANGELOG.md | 2 ++ RELEASE-CHECKLIST.md | 2 -- ci/build-and-publish-m2 | 43 ----------------------------------- 4 files changed, 6 insertions(+), 45 deletions(-) delete mode 100755 ci/build-and-publish-m2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9a9cc03..3139d03 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -114,6 +114,10 @@ jobs: os: macos-latest rust: nightly target: x86_64-apple-darwin + - build: macos + os: macos-latest + rust: nightly + target: aarch64-apple-darwin - build: win-msvc os: windows-latest rust: nightly diff --git a/CHANGELOG.md b/CHANGELOG.md index 928d099..7fe2cbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,8 @@ Bug fixes: Fix a bug where `-q --files-without-match` inverted the exit code. * [BUG #3140](https://github.com/BurntSushi/ripgrep/issues/3140): Ensure hyphens in flag names are escaped in the roff text for the man page. +* [BUG #3155](https://github.com/BurntSushi/ripgrep/issues/3155): + Statically compile PCRE2 into macOS release artifacts on `aarch64`. Feature enhancements: diff --git a/RELEASE-CHECKLIST.md b/RELEASE-CHECKLIST.md index c6f0d28..c168574 100644 --- a/RELEASE-CHECKLIST.md +++ b/RELEASE-CHECKLIST.md @@ -41,8 +41,6 @@ > tool that recursively searches the current directory for a regex pattern. > By default, ripgrep will respect gitignore rules and automatically skip > hidden files/directories and binary files. -* Run `git checkout {VERSION} && ci/build-and-publish-m2 {VERSION}` on a macOS - system with Apple silicon. * Run `cargo publish`. * Run `ci/sha256-releases {VERSION} >> pkg/brew/ripgrep-bin.rb`. Then edit `pkg/brew/ripgrep-bin.rb` to update the version number and sha256 hashes. diff --git a/ci/build-and-publish-m2 b/ci/build-and-publish-m2 deleted file mode 100755 index fa66a50..0000000 --- a/ci/build-and-publish-m2 +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -# This script builds a ripgrep release for the aarch64-apple-darwin target. -# At time of writing (2023-11-21), GitHub Actions does not free Apple silicon -# runners. Since I have somewhat recently acquired an M2 mac mini, I just use -# this script to build the release tarball and upload it with `gh`. -# -# Once GitHub Actions has proper support for Apple silicon, we should add it -# to our release workflow and drop this script. - -set -e - -version="$1" -if [ -z "$version" ]; then - echo "missing version" >&2 - echo "Usage: "$(basename "$0")" " >&2 - exit 1 -fi -if ! grep -q "version = \"$version\"" Cargo.toml; then - echo "version does not match Cargo.toml" >&2 - exit 1 -fi - -target=aarch64-apple-darwin -cargo build --release --features pcre2 --target $target -BIN=target/$target/release/rg -NAME=ripgrep-$version-$target -ARCHIVE="deployment/m2/$NAME" - -mkdir -p "$ARCHIVE"/{complete,doc} -cp "$BIN" "$ARCHIVE"/ -strip "$ARCHIVE/rg" -cp {README.md,COPYING,UNLICENSE,LICENSE-MIT} "$ARCHIVE"/ -cp {CHANGELOG.md,FAQ.md,GUIDE.md} "$ARCHIVE"/doc/ -"$BIN" --generate complete-bash > "$ARCHIVE/complete/rg.bash" -"$BIN" --generate complete-fish > "$ARCHIVE/complete/rg.fish" -"$BIN" --generate complete-powershell > "$ARCHIVE/complete/_rg.ps1" -"$BIN" --generate complete-zsh > "$ARCHIVE/complete/_rg" -"$BIN" --generate man > "$ARCHIVE/doc/rg.1" - -tar c -C deployment/m2 -z -f "$ARCHIVE.tar.gz" "$NAME" -shasum -a 256 "$ARCHIVE.tar.gz" > "$ARCHIVE.tar.gz.sha256" -gh release upload "$version" "$ARCHIVE.tar.gz" "$ARCHIVE.tar.gz.sha256"