1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-05 06:45:13 +01:00

ci: Use bcvk

Make builds unprivileged by default and start using bcvk in
our own CI, the same way we expect people to do so locally
now.

Signed-off-by: Colin Walters <walters@verbum.org>
This commit is contained in:
Colin Walters
2025-10-09 20:47:28 -04:00
parent 58876bf20e
commit 7e526508a9
4 changed files with 25 additions and 36 deletions

View File

@@ -65,5 +65,20 @@ runs:
if: ${{ inputs.libvirt == 'true' }}
shell: bash
run: |
set -eux
sudo apt install -y libkrb5-dev pkg-config libvirt-dev genisoimage qemu-utils qemu-kvm qemu-utils libvirt-daemon-system
set -xeuo pipefail
export BCVK_VERSION=0.5.3
sudo apt install -y libkrb5-dev pkg-config libvirt-dev genisoimage qemu-utils qemu-kvm virtiofsd libvirt-daemon-system
# Something in the stack is overriding this, but we want session right now for bcvk
echo LIBVIRT_DEFAULT_URI=qemu:///session >> $GITHUB_ENV
td=$(mktemp -d)
cd $td
# Install bcvk
target=bcvk-$(arch)-unknown-linux-gnu
curl -LO https://github.com/bootc-dev/bcvk/releases/download/v${BCVK_VERSION}/${target}.tar.gz
tar xzf ${target}.tar.gz
sudo install -T ${target} /usr/bin/bcvk
cd -
rm -rf "$td"
# Also bump the default fd limit as a workaround for https://github.com/bootc-dev/bcvk/issues/65
sudo sed -i -e 's,^\* hard nofile 65536,* hard nofile 524288,' /etc/security/limits.conf

View File

@@ -19,6 +19,9 @@ on:
env:
CARGO_TERM_COLOR: always
# Something seems to be setting this in the default GHA runners, which breaks bcvk
# as the default runner user doesn't have access
LIBVIRT_DEFAULT_URI: "qemu:///session"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -135,11 +138,11 @@ jobs:
- name: Build container and disk image
run: |
sudo tests/build.sh ${{ matrix.test_os }}
tests/build.sh ${{ matrix.test_os }}
- name: Run container tests
run:
sudo just test-container
just test-container
- name: Archive disk image
uses: actions/upload-artifact@v4