From 3cee4449751f7454d7927bdbf4231d0c6e389cf7 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 18 Sep 2024 12:50:07 -0400 Subject: [PATCH] ci: Add revdep-ci for bootc This ensures when composefs changes, we don't break bootc. This test isn't too expensive and should be reliable, so I'm hopeful we can just enable it on every PR. ref: https://github.com/containers/composefs/issues/336 Signed-off-by: Colin Walters --- .dockerignore | 1 + .github/workflows/ci-bootc.yml | 30 ++++++++++++++++++++++++++++++ ci/Containerfile.c9s-bootc | 10 ++++++++++ 3 files changed, 41 insertions(+) create mode 100644 .dockerignore create mode 100644 .github/workflows/ci-bootc.yml create mode 100644 ci/Containerfile.c9s-bootc diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..1de5659 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +target \ No newline at end of file diff --git a/.github/workflows/ci-bootc.yml b/.github/workflows/ci-bootc.yml new file mode 100644 index 0000000..8cc84c6 --- /dev/null +++ b/.github/workflows/ci-bootc.yml @@ -0,0 +1,30 @@ +name: revdep CI bootc + +permissions: + actions: read + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + c9s-bootc-e2e: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: build + run: sudo podman build -t localhost/test:latest -f ci/Containerfile.c9s-bootc . + - name: bootc install + run: | + set -xeuo pipefail + sudo podman run --env BOOTC_SKIP_SELINUX_HOST_CHECK=1 --rm -ti --privileged -v /:/target --pid=host --security-opt label=disable \ + -v /dev:/dev -v /var/lib/containers:/var/lib/containers \ + localhost/test:latest bootc install to-filesystem --skip-fetch-check \ + --replace=alongside /target diff --git a/ci/Containerfile.c9s-bootc b/ci/Containerfile.c9s-bootc new file mode 100644 index 0000000..1297d6a --- /dev/null +++ b/ci/Containerfile.c9s-bootc @@ -0,0 +1,10 @@ +FROM quay.io/centos/centos:stream9 as build +RUN dnf -y install dnf-utils zstd && dnf config-manager --enable crb && dnf builddep -y composefs && \ + dnf -y install meson +COPY . /build +WORKDIR /build +RUN set -x; ls -al; meson setup target --prefix=/usr && meson compile -C target && \ + env DESTDIR=$(pwd)/target/instroot meson install -C target + +FROM quay.io/centos-bootc/centos-bootc-dev:stream9 +COPY --from=build /build/target/instroot/usr/ /usr/