Skip to content

Commit 50dd735

Browse files
committed
move vagrant CI to ubuntu 24.04
Signed-off-by: Jin Dong <[email protected]>
1 parent 74e00af commit 50dd735

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,7 @@ jobs:
392392
test-integration-freebsd:
393393
timeout-minutes: 30
394394
name: FreeBSD
395-
# ubuntu-24.04 lacks the vagrant package
396-
runs-on: ubuntu-22.04
395+
runs-on: ubuntu-24.04
397396
steps:
398397
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
399398
with:
@@ -404,9 +403,19 @@ jobs:
404403
key: vagrant-${{ matrix.box }}
405404
- name: Set up vagrant
406405
run: |
406+
# from https://github.com/containerd/containerd/blob/v2.0.1/.github/workflows/ci.yml#L583-L596
407+
# which is based on https://github.com/opencontainers/runc/blob/v1.1.8/.cirrus.yml#L41-L49
408+
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
409+
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
410+
sudo sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources
407411
sudo apt-get update
408-
sudo apt-get install -y libvirt-daemon libvirt-daemon-system vagrant vagrant-libvirt
412+
sudo apt-get install -y libvirt-daemon libvirt-daemon-system vagrant ovmf
413+
# https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1725#issuecomment-1454058646
414+
sudo cp /usr/share/OVMF/OVMF_VARS_4M.fd /var/lib/libvirt/qemu/nvram/
409415
sudo systemctl enable --now libvirtd
416+
sudo apt-get build-dep -y ruby-libvirt
417+
sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev
418+
sudo vagrant plugin install vagrant-libvirt
410419
- name: Boot VM
411420
run: |
412421
ln -sf Vagrantfile.freebsd Vagrantfile

0 commit comments

Comments
 (0)