commit 00a17868b42cb7f7f8715455e70e1830383e301f parent 0b429da81bb0f4084890e4dbbf9bb1e835ce3f6b Author: Henry Unite <unitehenry@gmail.com> Date: Mon, 26 Oct 2026 16:40:46 +0000 ci: use lima-actions for qemu and limactl setup Diffstat:
| M | .github/workflows/ci.yml | | | 52 | ++++++---------------------------------------------- |
1 file changed, 6 insertions(+), 46 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml @@ -96,55 +96,15 @@ jobs: with: node-version: 24 - - name: Prepare QEMU cache directory - run: mkdir -p ~/.cache/qemu-debs + - name: Setup Lima + id: lima-actions-setup + uses: lima-vm/lima-actions/setup@v1 - - name: Cache QEMU packages - id: cache-qemu + - name: Cache Lima images uses: actions/cache@v4 with: - path: ~/.cache/qemu-debs - key: ${{ runner.os }}-qemu-x86 - restore-keys: | - ${{ runner.os }}-qemu- - - - name: Install x86 QEMU - run: | - sudo apt-get update - if [ "${{ steps.cache-qemu.outputs.cache-hit }}" == "true" ]; then - sudo cp ~/.cache/qemu-debs/*.deb /var/cache/apt/archives/ 2>/dev/null || true - fi - sudo apt-get install -y qemu-system-x86 - if [ "${{ steps.cache-qemu.outputs.cache-hit }}" != "true" ]; then - mkdir -p ~/.cache/qemu-debs - sudo cp /var/cache/apt/archives/*.deb ~/.cache/qemu-debs/ 2>/dev/null || true - sudo chown -R $USER:$USER ~/.cache/qemu-debs - fi - - - name: Resolve limactl version - id: limactl-version - run: | - mkdir -p ~/.cache/limactl - VERSION=$(curl -fsSL https://api.github.com/repos/lima-vm/lima/releases/latest | jq -r '.tag_name') - echo "version=${VERSION}" >> $GITHUB_OUTPUT - - - name: Cache limactl - id: cache-limactl - uses: actions/cache@v4 - with: - path: ~/.cache/limactl/lima.tar.gz - key: ${{ runner.os }}-limactl-${{ steps.limactl-version.outputs.version }} - restore-keys: | - ${{ runner.os }}-limactl- - - - name: Install limactl - run: | - if [ "${{ steps.cache-limactl.outputs.cache-hit }}" != "true" ]; then - mkdir -p ~/.cache/limactl - curl -fsSL $(curl -fsSL https://api.github.com/repos/lima-vm/lima/releases/latest | jq -r '.assets[] | select(.name | endswith("Linux-x86_64.tar.gz")) | .browser_download_url') -o ~/.cache/limactl/lima.tar.gz - fi - sudo tar -C /usr/local -xzf ~/.cache/limactl/lima.tar.gz -m -v - limactl --version + path: ~/.cache/lima + key: lima-${{ steps.lima-actions-setup.outputs.version }} - name: Install run: ./scripts/install