Skip to content

Commit c049426

Browse files
committed
CI: upgrade test: bump up the old Lima (v0.10.0→v0.15.1)
v0.10.0 (Apr 25, 2022) is too old to test upgradability. Bump up to v0.15.1 (Apr 16, 2023). Signed-off-by: Akihiro Suda <[email protected]>
1 parent df53f57 commit c049426

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ jobs:
372372
timeout-minutes: 120
373373
strategy:
374374
matrix:
375-
oldver: ["v0.10.0"]
375+
oldver: ["v0.15.1"]
376376
steps:
377377
- uses: actions/checkout@v4
378378
with:

hack/test-upgrade.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ function install_lima() {
2727
fi
2828
}
2929

30+
function install_lima_binary() {
31+
ver="$1"
32+
tar="tar"
33+
if [ ! -w "${PREFIX}/bin" ] || [ ! -w "${PREFIX}/share" ]; then
34+
tar="sudo ${tar}"
35+
fi
36+
curl -fsSL "https://github.com/lima-vm/lima/releases/download/${ver}/lima-${ver:1}-$(uname -s)-$(uname -m).tar.gz" | ${tar} Cxzvm "${PREFIX}"
37+
}
38+
3039
function uninstall_lima() {
3140
files="${PREFIX}/bin/lima ${PREFIX}/bin/limactl ${PREFIX}/share/lima ${PREFIX}/share/doc/lima"
3241
if [ -w "${PREFIX}/bin" ] && [ -w "${PREFIX}/share" ]; then
@@ -46,14 +55,13 @@ INFO "Uninstalling lima"
4655
uninstall_lima
4756

4857
INFO "Installing the old Lima ${OLDVER}"
49-
install_lima "${OLDVER}"
58+
install_lima_binary "${OLDVER}" || install_lima "${OLDVER}"
5059

5160
export LIMA_INSTANCE="test-upgrade"
5261

5362
INFO "Creating an instance \"${LIMA_INSTANCE}\" with the old Lima"
5463
defer "show_lima_log;limactl delete -f \"${LIMA_INSTANCE}\""
55-
# Lima older than v0.15.1 needs `-pdpe1gb` for stability: https://github.com/lima-vm/lima/pull/1487
56-
QEMU_SYSTEM_X86_64="qemu-system-x86_64 -cpu host,-pdpe1gb" limactl start --tty=false "${LIMA_INSTANCE}" || (
64+
limactl start --tty=false --name="${LIMA_INSTANCE}" template://ubuntu-lts || (
5765
show_lima_log
5866
exit 1
5967
)

0 commit comments

Comments
 (0)