File tree Expand file tree Collapse file tree 2 files changed +42
-10
lines changed Expand file tree Collapse file tree 2 files changed +42
-10
lines changed Original file line number Diff line number Diff line change 9
9
10
10
jobs :
11
11
test :
12
- runs-on : ubuntu-24.04
12
+ strategy :
13
+ fail-fast : false
14
+ matrix :
15
+ runner : ["ubuntu-24.04", "ubuntu-24.04-arm"]
16
+ runs-on : ${{ matrix.runner }}
13
17
steps :
14
18
- uses : actions/checkout@v4
15
19
- uses : ./setup
16
20
id : lima-actions-setup
17
21
- uses : actions/cache@v4
18
22
with :
19
23
path : ~/.cache/lima
20
- key : lima-${{ steps.lima-actions-setup.outputs.version }}
24
+ key : lima-${{ steps.lima-actions-setup.outputs.version }}-${{ matrix.runner }}
21
25
- run : limactl start --plain --name=default --cpus=1 --memory=1 template://fedora
22
26
- uses : ./ssh
23
27
- run : rsync -a -e ssh . lima-default:/tmp/repo
Original file line number Diff line number Diff line change @@ -19,13 +19,41 @@ runs:
19
19
shell : bash
20
20
run : |
21
21
set -eux -o pipefail
22
- [ "$(uname)" = "Linux" ]
23
- [ "$(uname -m)" = "x86_64" ]
24
- sudo apt-get update -qq
25
- sudo apt-get install -qqy --no-install-recommends ovmf qemu-system-x86 qemu-utils
26
- sudo modprobe kvm
27
- # `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
28
- sudo chown $(whoami) /dev/kvm
22
+ case "$(uname)" in
23
+ Linux)
24
+ sudo dmesg | grep -i kvm
25
+ echo
26
+ echo "-----"
27
+ cat /proc/cpuinfo
28
+ echo "-----"
29
+ echo
30
+ qemu_arch=""
31
+ case "$(uname -m)" in
32
+ x86_64)
33
+ qemu_arch=x86
34
+ ;;
35
+ aarch64)
36
+ qemu_arch=arm
37
+ ;;
38
+ *)
39
+ echo >&2 "Unsupported host architecture"
40
+ exit 1
41
+ ;;
42
+ esac
43
+ sudo apt-get update -qq
44
+ sudo apt-get install -qqy --no-install-recommends ovmf qemu-system-${qemu_arch} qemu-utils
45
+ sudo modprobe kvm
46
+ # `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
47
+ sudo chown $(whoami) /dev/kvm
48
+ ;;
49
+ Darwin)
50
+ brew install qemu
51
+ ;;
52
+ *)
53
+ echo >&2 "Unsupported host operating system"
54
+ exit 1
55
+ ;;
56
+ esac
29
57
- name : " Set up Lima"
30
58
id : " setup-lima"
31
59
env :
37
65
if [ "${VERSION}" = "latest" ]; then
38
66
VERSION="$(curl -fsSL -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/repos/lima-vm/lima/releases/latest | jq -r .tag_name)"
39
67
fi
40
- FILE="lima-${VERSION:1}-Linux-x86_64 .tar.gz"
68
+ FILE="lima-${VERSION:1}-$(uname)-$(uname -m) .tar.gz"
41
69
curl -fOSL https://github.com/lima-vm/lima/releases/download/${VERSION}/${FILE}
42
70
gh attestation verify --owner=lima-vm "${FILE}"
43
71
sudo tar Cxzf /usr/local "${FILE}"
You can’t perform that action at this time.
0 commit comments