Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use older qemu version #1160

Merged
merged 3 commits into from
Oct 9, 2024
Merged
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
34 changes: 34 additions & 0 deletions .github/hack/brew-install-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
# This script only works for formulas in the homebrew-core.
# It assumes the homebrew-core has been checked out into ./homebrew-core.
# It only needs commit messages, so the checkout can be filtered with tree:0.

set -eu -o pipefail

FORMULA=$1
VERSION=$2

export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALL_UPGRADE=1
export HOMEBREW_NO_INSTALL_CLEANUP=1

TAP=lima/tap
if ! brew tap | grep -q "^${TAP}\$"; then
brew tap-new "$TAP"
fi

# Get the latest commit id for the commit that updated this bottle
SHA=$(git -C homebrew-core log --max-count 1 --grep "^${FORMULA}: update ${VERSION} bottle" --format="%H")
if [[ -z $SHA ]]; then
echo "${FORMULA} ${VERSION} not found"
exit 1
fi

OUTPUT="$(brew --repo "$TAP")/Formula/${FORMULA}.rb"
RAW="https://raw.githubusercontent.com/Homebrew/homebrew-core"
curl -s "${RAW}/${SHA}/Formula/${FORMULA::1}/${FORMULA}.rb" -o "$OUTPUT"

if brew ls -1 | grep -q "^${FORMULA}\$"; then
brew uninstall "$FORMULA" --ignore-dependencies
fi
brew install "${TAP}/${FORMULA}"
64 changes: 60 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,24 @@ jobs:
with:
go-version: "1.23"

- name: Fetch homebrew-core commit messages
uses: actions/checkout@v4
with:
# needed by ./hack/brew-install-version.sh
repository: homebrew/homebrew-core
path: homebrew-core
fetch-depth: 0
filter: tree:0

- name: Install CLI deps
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
HOMEBREW_NO_INSTALL_UPGRADE: "1"
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"
run: |
brew install --overwrite [email protected] kubectl docker coreutils lima
brew uninstall --ignore-dependencies qemu
./.github/hack/brew-install-version.sh qemu 8.2.1

- name: Build and Install
run: make && sudo make install
Expand All @@ -63,7 +75,6 @@ jobs:

kubernetes-containerd:
runs-on: macos-13
needs: kubernetes-docker
steps:
- uses: actions/checkout@v4

Expand All @@ -72,12 +83,24 @@ jobs:
with:
go-version: "1.23"

- name: Fetch homebrew-core commit messages
uses: actions/checkout@v4
with:
# needed by ./hack/brew-install-version.sh
repository: homebrew/homebrew-core
path: homebrew-core
fetch-depth: 0
filter: tree:0

- name: Install CLI deps
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
HOMEBREW_NO_INSTALL_UPGRADE: "1"
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"
run: |
brew install --overwrite [email protected] kubectl docker coreutils lima
brew uninstall --ignore-dependencies qemu
./.github/hack/brew-install-version.sh qemu 8.2.1

- name: Build and Install
run: make && sudo make install
Expand All @@ -103,7 +126,6 @@ jobs:

docker:
runs-on: macos-13
needs: kubernetes-containerd
steps:
- uses: actions/checkout@v4

Expand All @@ -112,12 +134,24 @@ jobs:
with:
go-version: "1.23"

- name: Fetch homebrew-core commit messages
uses: actions/checkout@v4
with:
# needed by ./hack/brew-install-version.sh
repository: homebrew/homebrew-core
path: homebrew-core
fetch-depth: 0
filter: tree:0

- name: Install CLI deps
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
HOMEBREW_NO_INSTALL_UPGRADE: "1"
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"
run: |
brew install --overwrite [email protected] kubectl docker coreutils lima
brew uninstall --ignore-dependencies qemu
./.github/hack/brew-install-version.sh qemu 8.2.1

- name: Build and Install
run: make && sudo make install
Expand Down Expand Up @@ -152,7 +186,6 @@ jobs:

containerd:
runs-on: macos-13
needs: docker
steps:
- uses: actions/checkout@v4

Expand All @@ -161,12 +194,24 @@ jobs:
with:
go-version: "1.23"

- name: Fetch homebrew-core commit messages
uses: actions/checkout@v4
with:
# needed by ./hack/brew-install-version.sh
repository: homebrew/homebrew-core
path: homebrew-core
fetch-depth: 0
filter: tree:0

- name: Install CLI deps
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
HOMEBREW_NO_INSTALL_UPGRADE: "1"
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"
run: |
brew install --overwrite [email protected] kubectl docker coreutils lima
brew uninstall --ignore-dependencies qemu
./.github/hack/brew-install-version.sh qemu 8.2.1

- name: Build and Install
run: make && sudo make install
Expand Down Expand Up @@ -201,7 +246,6 @@ jobs:

incus:
runs-on: macos-13
needs: containerd
steps:
- uses: actions/checkout@v4

Expand All @@ -210,12 +254,24 @@ jobs:
with:
go-version: "1.23"

- name: Fetch homebrew-core commit messages
uses: actions/checkout@v4
with:
# needed by ./hack/brew-install-version.sh
repository: homebrew/homebrew-core
path: homebrew-core
fetch-depth: 0
filter: tree:0

- name: Install CLI deps
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
HOMEBREW_NO_INSTALL_UPGRADE: "1"
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"
run: |
brew install --overwrite [email protected] kubectl docker coreutils lima incus
brew uninstall --ignore-dependencies qemu
./.github/hack/brew-install-version.sh qemu 8.2.1

- name: Build and Install
run: make && sudo make install
Expand Down
Loading