File tree Expand file tree Collapse file tree 2 files changed +41
-10
lines changed Expand file tree Collapse file tree 2 files changed +41
-10
lines changed Original file line number Diff line number Diff line change 99
1010jobs :
1111 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 }}
1317 steps :
1418 - uses : actions/checkout@v4
1519 - uses : ./setup
1620 id : lima-actions-setup
1721 - uses : actions/cache@v4
1822 with :
1923 path : ~/.cache/lima
20- key : lima-${{ steps.lima-actions-setup.outputs.version }}
24+ key : lima-${{ steps.lima-actions-setup.outputs.version }}-${{ matrix.runner }}
2125 - run : limactl start --plain --name=default --cpus=1 --memory=1 template://fedora
2226 - uses : ./ssh
2327 - run : rsync -a -e ssh . lima-default:/tmp/repo
Original file line number Diff line number Diff line change @@ -19,13 +19,40 @@ runs:
1919 shell : bash
2020 run : |
2121 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+ echo
25+ echo "-----"
26+ cat /proc/cpuinfo
27+ echo "-----"
28+ echo
29+ qemu_arch=""
30+ case "$(uname -m)" in
31+ x86_64)
32+ qemu_arch=x86
33+ ;;
34+ aarch64)
35+ qemu_arch=arm
36+ ;;
37+ *)
38+ echo >&2 "Unsupported host architecture"
39+ exit 1
40+ ;;
41+ esac
42+ sudo apt-get update -qq
43+ sudo apt-get install -qqy --no-install-recommends ovmf qemu-system-${qemu_arch} qemu-utils
44+ sudo modprobe kvm
45+ # `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
46+ sudo chown $(whoami) /dev/kvm
47+ ;;
48+ Darwin)
49+ brew install qemu
50+ ;;
51+ *)
52+ echo >&2 "Unsupported host operating system"
53+ exit 1
54+ ;;
55+ esac
2956 - name : " Set up Lima"
3057 id : " setup-lima"
3158 env :
3764 if [ "${VERSION}" = "latest" ]; then
3865 VERSION="$(curl -fsSL -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/repos/lima-vm/lima/releases/latest | jq -r .tag_name)"
3966 fi
40- FILE="lima-${VERSION:1}-Linux-x86_64 .tar.gz"
67+ FILE="lima-${VERSION:1}-$(uname)-$(uname -m) .tar.gz"
4168 curl -fOSL https://github.com/lima-vm/lima/releases/download/${VERSION}/${FILE}
4269 gh attestation verify --owner=lima-vm "${FILE}"
4370 sudo tar Cxzf /usr/local "${FILE}"
You can’t perform that action at this time.
0 commit comments