Skip to content

Commit

Permalink
[DNM] verify 2954
Browse files Browse the repository at this point in the history
Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Dec 2, 2024
1 parent 591ce7e commit f4d8d6a
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/fedora.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Fedora

on:
workflow_dispatch:
pull_request:

jobs:
fedora:
runs-on: ubuntu-24.04
steps:
- name: Check out code

Check failure on line 11 in .github/workflows/fedora.yaml

View workflow job for this annotation

GitHub Actions / Lints

11:7 [indentation] wrong indentation: expected 4 but found 6

Check failure on line 11 in .github/workflows/fedora.yaml

View workflow job for this annotation

GitHub Actions / Lints

11:7 [indentation] wrong indentation: expected 4 but found 6
uses: actions/checkout@v4

- name: "Install QEMU"
run: |
set -eux
sudo apt-get update
sudo apt-get install -y --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
- name: "Install Lima"
run: |
set -eux
LIMA_VERSION=$(curl -fsSL https://api.github.com/repos/lima-vm/lima/releases/latest | jq -r .tag_name)
curl -fsSL https://github.com/lima-vm/lima/releases/download/${LIMA_VERSION}/lima-${LIMA_VERSION:1}-Linux-x86_64.tar.gz | sudo tar Cxzvf /usr/local -
- name: "Cache ~/.cache/lima"
uses: actions/cache@v4
with:
path: ~/.cache/lima
key: lima-${{ env.LIMA_VERSION }}

- name: "Start an instance of Fedora"
run: |
set -eux
limactl start --name=default --cpus=1 --memory=1 --network=lima:user-v2 template://fedora
lima sudo dnf install -y httpd
lima sudo systemctl enable --now httpd
- name: "Start another instance of Fedora"
run: |
set -eux
limactl start --name=another --cpus=1 --memory=1 --network=lima:user-v2 template://fedora
limactl shell another curl http://lima-default.internal

0 comments on commit f4d8d6a

Please sign in to comment.