Skip to content
Closed
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
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ on:

jobs:
test:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
runner: ["ubuntu-24.04", "ubuntu-24.04-arm"]
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: ./setup
id: lima-actions-setup
- uses: actions/cache@v4
with:
path: ~/.cache/lima
key: lima-${{ steps.lima-actions-setup.outputs.version }}
key: lima-${{ steps.lima-actions-setup.outputs.version }}-${{ matrix.runner }}
- run: limactl start --plain --name=default --cpus=1 --memory=1 template://fedora
- uses: ./ssh
- run: rsync -a -e ssh . lima-default:/tmp/repo
Expand Down
44 changes: 36 additions & 8 deletions setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,41 @@ runs:
shell: bash
run: |
set -eux -o pipefail
[ "$(uname)" = "Linux" ]
[ "$(uname -m)" = "x86_64" ]
sudo apt-get update -qq
sudo apt-get install -qqy --no-install-recommends ovmf qemu-system-x86 qemu-utils
sudo modprobe kvm
# `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
sudo chown $(whoami) /dev/kvm
case "$(uname)" in
Linux)
sudo dmesg | grep -i kvm
echo
echo "-----"
cat /proc/cpuinfo
echo "-----"
echo
qemu_arch=""
case "$(uname -m)" in
x86_64)
qemu_arch=x86
;;
aarch64)
qemu_arch=arm
;;
*)
echo >&2 "Unsupported host architecture"
exit 1
;;
esac
sudo apt-get update -qq
sudo apt-get install -qqy --no-install-recommends ovmf qemu-system-${qemu_arch} qemu-utils
sudo modprobe kvm
# `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
sudo chown $(whoami) /dev/kvm
;;
Darwin)
brew install qemu
;;
*)
echo >&2 "Unsupported host operating system"
exit 1
;;
esac
- name: "Set up Lima"
id: "setup-lima"
env:
Expand All @@ -37,7 +65,7 @@ runs:
if [ "${VERSION}" = "latest" ]; then
VERSION="$(curl -fsSL -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/repos/lima-vm/lima/releases/latest | jq -r .tag_name)"
fi
FILE="lima-${VERSION:1}-Linux-x86_64.tar.gz"
FILE="lima-${VERSION:1}-$(uname)-$(uname -m).tar.gz"
curl -fOSL https://github.com/lima-vm/lima/releases/download/${VERSION}/${FILE}
gh attestation verify --owner=lima-vm "${FILE}"
sudo tar Cxzf /usr/local "${FILE}"
Expand Down
Loading