Merge branch 'master' into arm64-linux-bottle-blocks

This commit is contained in:
Carlo Cabrera 2025-03-18 17:25:00 +08:00 committed by GitHub
commit ab59e2d5dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 22 additions and 17 deletions

View File

@ -181,7 +181,7 @@ jobs:
echo "push=$(jq --raw-output "${filter}" <<<"${PUSH}")" >>"${GITHUB_OUTPUT}"
- name: Log in to GitHub Packages (github-actions[bot])
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: github-actions[bot]
@ -204,7 +204,7 @@ jobs:
- name: Log in to GitHub Packages (BrewTestBot)
if: fromJSON(steps.attributes.outputs.push)
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: BrewTestBot
@ -234,7 +234,7 @@ jobs:
- name: Upload the Docker image digest
if: fromJSON(steps.attributes.outputs.push)
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: digest-${{ matrix.version }}-${{ matrix.arch }}
path: ${{ runner.temp }}/digests/*
@ -249,25 +249,25 @@ jobs:
version: ${{ fromJSON(needs.generate-tags.outputs.matrix) }}
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
with:
cache-binary: false
- name: Download Docker image digests
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
with:
path: ${{ runner.temp }}/digests
pattern: digest-${{ matrix.version }}-*
merge-multiple: true
- name: Log in to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
username: brewtestbot
password: ${{ secrets.HOMEBREW_BREW_DOCKER_TOKEN }}
- name: Log in to GitHub Packages (BrewTestBot)
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: BrewTestBot

View File

@ -53,7 +53,7 @@ jobs:
run: vale docs/
- name: Install Ruby
uses: ruby/setup-ruby@277ba2a127aba66d45bad0fa2dc56f80dbfedffa # v1.222.0
uses: ruby/setup-ruby@922ebc4c5262cd14e07bb0e1db020984b6c064fe # v1.226.0
with:
bundler-cache: true
working-directory: docs

View File

@ -43,7 +43,7 @@ jobs:
persist-credentials: false
- name: Install Ruby
uses: ruby/setup-ruby@277ba2a127aba66d45bad0fa2dc56f80dbfedffa # v1.222.0
uses: ruby/setup-ruby@922ebc4c5262cd14e07bb0e1db020984b6c064fe # v1.226.0
with:
bundler-cache: true
working-directory: rubydoc

View File

@ -341,7 +341,7 @@ jobs:
filenames=$(find Library/Homebrew/test/junit -name 'rspec*.xml' -print | tr '\n' ',')
echo "filenames=${filenames%,}" >> "$GITHUB_OUTPUT"
- uses: codecov/test-results-action@5c441a7bcc06f8706cde90192857d337c5dab8a6 # v1.0.4
- uses: codecov/test-results-action@f2dba722c67b86c6caa034178c6e4d35335f6706 # v1.1.0
with:
working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}
files: ${{ steps.junit_xml.outputs.filenames }}

View File

@ -20,7 +20,7 @@ RUN touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu
# shellcheck disable=SC1091,SC2154,SC2292
RUN apt-get update \
&& apt-get install -y --no-install-recommends software-properties-common gnupg-agent \
&& add-apt-repository -y ppa:git-core/ppa \
&& if [ "$(uname -m)" != aarch64 ]; then add-apt-repository -y ppa:git-core/ppa; fi \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
acl \

View File

@ -74,7 +74,8 @@ module OS
end
def check_supported_architecture
return if Hardware::CPU.arch == :x86_64
return if Hardware::CPU.intel?
return if Homebrew::EnvConfig.developer? && ENV["HOMEBREW_ARM64_TESTING"].present? && Hardware::CPU.arm?
<<~EOS
Your CPU architecture (#{Hardware::CPU.arch}) is not supported. We only support

View File

@ -173,7 +173,7 @@ class Livecheck
url: T.any(String, Symbol),
homebrew_curl: T.nilable(T::Boolean),
post_form: T.nilable(T::Hash[Symbol, String]),
post_json: T.nilable(T::Hash[Symbol, String]),
post_json: T.nilable(T::Hash[Symbol, T.anything]),
).returns(T.nilable(T.any(String, Symbol)))
}
def url(url = T.unsafe(nil), homebrew_curl: nil, post_form: nil, post_json: nil)

View File

@ -16,7 +16,7 @@ module Homebrew
prop :post_form, T.nilable(T::Hash[Symbol, String])
# JSON data to use when making a `POST` request.
prop :post_json, T.nilable(T::Hash[Symbol, String])
prop :post_json, T.nilable(T::Hash[Symbol, T.anything])
# Returns a `Hash` of options that are provided as arguments to `url`.
sig { returns(T::Hash[Symbol, T.untyped]) }

View File

@ -174,7 +174,7 @@ module Homebrew
sig {
params(
post_form: T.nilable(T::Hash[Symbol, String]),
post_json: T.nilable(T::Hash[Symbol, String]),
post_json: T.nilable(T::Hash[Symbol, T.anything]),
).returns(T::Array[String])
}
def self.post_args(post_form: nil, post_json: nil)

View File

@ -20,7 +20,7 @@ module RuboCop
STANZA_GROUPS = T.let(
[
[:arch, :on_arch_conditional],
[:arch, :on_arch_conditional, :os],
[:version, :sha256],
ON_SYSTEM_METHODS_STANZA_ORDER,
[:language],

View File

@ -25,6 +25,7 @@ RSpec.describe RuboCop::Cop::Cask::StanzaGrouping, :config do
cask 'foo' do
arch arm: "arm64", intel: "x86_64"
folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin"
os macos: ">= :big_sur"
version :latest
sha256 :no_check

View File

@ -44,6 +44,8 @@ RSpec.describe RuboCop::Cop::Cask::StanzaOrder, :config do
it "reports an offense when an `arch` stanza is out of order" do
expect_offense <<~CASK
cask 'foo' do
os macos: ">= :big_sur"
^^^^^^^^^^^^^^^^^^^^^^^ `os` stanza out of order
version :latest
^^^^^^^^^^^^^^^ `version` stanza out of order
sha256 :no_check
@ -56,6 +58,7 @@ RSpec.describe RuboCop::Cop::Cask::StanzaOrder, :config do
expect_correction <<~CASK
cask 'foo' do
arch arm: "arm", intel: "x86_64"
os macos: ">= :big_sur"
version :latest
sha256 :no_check
end

View File

@ -1,6 +1,6 @@
cask "sha256-os" do
os macos: "darwin", linux: "linux"
arch arm: "arm", intel: "intel"
os macos: "darwin", linux: "linux"
version "1.2.3"
sha256 arm: "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94",