Skip to content

Commit 8fbc88a

Browse files
authored
Merge pull request #1723 from AkihiroSuda/remove-cirrus
CI: move Cirrus tests to GHA (larger instances)
2 parents c559436 + 463b4d3 commit 8fbc88a

File tree

3 files changed

+105
-83
lines changed

3 files changed

+105
-83
lines changed

.cirrus.yml

Lines changed: 0 additions & 75 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 102 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,6 @@ jobs:
110110
retry_on: error
111111
max_attempts: 3
112112
command: ./hack/test-templates.sh templates/default.yaml
113-
- name: "Test alpine.yaml"
114-
uses: nick-invision/retry@v2
115-
with:
116-
timeout_minutes: 30
117-
retry_on: error
118-
max_attempts: 3
119-
command: ./hack/test-templates.sh templates/alpine.yaml
120113
- name: "Test experimental/9p.yaml"
121114
uses: nick-invision/retry@v2
122115
with:
@@ -132,12 +125,113 @@ jobs:
132125
max_attempts: 3
133126
command: ./hack/test-templates.sh hack/test-templates/test-misc.yaml
134127
# GHA macOS is slow and flaky, so we only test a few YAMLS here.
135-
# Other yamls are tested on Linux instances of Cirrus.
128+
# Other yamls are tested on Linux instances.
136129
#
137130
- name: "Show cache"
138131
if: always()
139132
run: ./hack/debug-cache.sh
140133

134+
# Non-default templates are tested on Linux instances of GHA,
135+
# as they seem more stable than macOS instances.
136+
integration-linux:
137+
name: Integration tests (on Linux)
138+
# A "larger" runner is used for enabling nested virt
139+
runs-on: ubuntu-latest-4-cores
140+
timeout-minutes: 120
141+
strategy:
142+
fail-fast: false
143+
matrix:
144+
template:
145+
- alpine.yaml
146+
- debian.yaml
147+
- fedora.yaml
148+
- archlinux.yaml
149+
- opensuse.yaml
150+
- experimental/net-user-v2.yaml
151+
- docker.yaml
152+
steps:
153+
- uses: actions/checkout@v3
154+
with:
155+
fetch-depth: 1
156+
- uses: actions/setup-go@v4
157+
with:
158+
go-version: 1.20.x
159+
- uses: actions/cache@v3
160+
with:
161+
path: ~/.cache/lima/download
162+
# hashFiles do not seem to support symlinks
163+
# TODO: more fine-grained cache
164+
key: ${{ runner.os }}-${{ hashFiles('examples/*.yaml') }}
165+
- name: Make
166+
run: make
167+
- name: Install
168+
run: sudo make install
169+
- name: Install test dependencies
170+
run: |
171+
sudo apt-get install -y --no-install-recommends ovmf qemu-system-x86 qemu-utils
172+
sudo modprobe kvm
173+
# `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
174+
sudo chown $(whoami) /dev/kvm
175+
- name: "Show cache"
176+
run: ./hack/debug-cache.sh
177+
- name: "Test"
178+
uses: nick-invision/retry@v2
179+
with:
180+
timeout_minutes: 30
181+
retry_on: error
182+
max_attempts: 3
183+
command: ./hack/test-templates.sh templates/${{ matrix.template }}
184+
- name: "Show cache"
185+
run: ./hack/debug-cache.sh
186+
187+
colima:
188+
name: Colima
189+
# A "larger" runner is used for enabling nested virt
190+
runs-on: ubuntu-latest-4-cores
191+
timeout-minutes: 120
192+
strategy:
193+
matrix:
194+
colima-version: ["v0.5.5"]
195+
steps:
196+
- uses: actions/checkout@v3
197+
with:
198+
fetch-depth: 1
199+
- uses: actions/setup-go@v4
200+
with:
201+
go-version: 1.20.x
202+
- uses: actions/cache@v3
203+
with:
204+
path: ~/.cache/lima/download
205+
key: ${{ runner.os }}-colima-${{ matrix.colima-version }}
206+
- name: Make
207+
run: make
208+
- name: Install
209+
run: sudo make install
210+
- name: Install colima
211+
run: |
212+
git clone https://github.com/abiosoft/colima
213+
cd colima
214+
git checkout ${{ matrix.colima-version }}
215+
make
216+
sudo make install
217+
- name: Install test dependencies
218+
run: |
219+
sudo apt-get install -y --no-install-recommends ovmf qemu-system-x86 qemu-utils
220+
sudo modprobe kvm
221+
# `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
222+
sudo chown $(whoami) /dev/kvm
223+
- name: "Show cache"
224+
run: ./hack/debug-cache.sh
225+
- name: "Test"
226+
uses: nick-invision/retry@v2
227+
with:
228+
timeout_minutes: 30
229+
retry_on: error
230+
max_attempts: 3
231+
command: ./hack/test-colima.sh
232+
- name: "Show cache"
233+
run: ./hack/debug-cache.sh
234+
141235
vmnet:
142236
name: "VMNet test"
143237
runs-on: macos-11

examples/archlinux.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ mounts:
1616
- location: "~"
1717
- location: "/tmp/lima"
1818
writable: true
19+
# reverse-sshfs seems unstable with ArchLinux ?
20+
mountType: "9p"
21+
vmType: "qemu"
1922
firmware:
2023
legacyBIOS: true

0 commit comments

Comments
 (0)