Skip to content

Commit a69a5ea

Browse files
committed
CI: add AlmaLinux 8, CentOS Stream 9, and Fedora
Lima (http://lima-vm.io) is used to create VM of these distros. Close issue 220 Signed-off-by: Akihiro Suda <[email protected]>
1 parent c79bd28 commit a69a5ea

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/validate.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,46 @@ jobs:
9090

9191
- name: test
9292
run: make TESTFLAGS="${{ matrix.race }}" test
93+
94+
vm:
95+
name: "VM"
96+
strategy:
97+
fail-fast: false
98+
matrix:
99+
template:
100+
- template://almalinux-8
101+
- template://centos-stream-9
102+
- template://fedora
103+
runs-on: ubuntu-24.04
104+
steps:
105+
- uses: actions/checkout@v4
106+
107+
- name: "Install Lima"
108+
uses: lima-vm/lima-actions/setup@v1
109+
id: lima-actions-setup
110+
111+
- name: "Cache ~/.cache/lima"
112+
uses: actions/cache@v4
113+
with:
114+
path: ~/.cache/lima
115+
key: lima-${{ steps.lima-actions-setup.outputs.version }}
116+
117+
- name: "Start VM"
118+
# --plain is set to disable file sharing, port forwarding, built-in containerd, etc.
119+
run: limactl start --plain --name=default --cpus=1 --memory=1 ${{ matrix.template }}
120+
121+
- name: "Set up SSH"
122+
uses: lima-vm/lima-actions/ssh@v1
123+
124+
- name: "Initialize VM"
125+
# plain old rsync and ssh are used for the initialization of the guest,
126+
# so that people who are not familiar with Lima can understand the initialization steps.
127+
run: |
128+
set -eux -o pipefail
129+
# Sync the current directory to /tmp/selinux in the guest
130+
rsync -a -e ssh . lima-default:/tmp/selinux
131+
# Install packages
132+
ssh lima-default sudo dnf install -y git make golang
133+
134+
- name: "make test"
135+
run: ssh lima-default make -C /tmp/selinux test

0 commit comments

Comments
 (0)