WIP: examples: Add bootc UKI & BLS examples #768
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow builds a container across a matrix of OSes, | |
| # generates a disk image from that, and runs integration tests | |
| # using tmt + libvirt (using nested virt support in the default GHA runners). | |
| name: Build+TMT | |
| on: | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test_os: [fedora-42, fedora-43, centos-9, centos-10] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| set -eux | |
| echo 'deb [trusted=yes] https://ftp.debian.org/debian/ testing main' | sudo tee /etc/apt/sources.list.d/testing.list | |
| sudo apt update | |
| sudo apt install -y crun/testing podman/testing just qemu-utils | |
| - uses: actions/checkout@v4 | |
| - name: Free up disk space on runner | |
| run: sudo ./ci/clean-gha-runner.sh | |
| - name: Set architecture variable | |
| id: set_arch | |
| run: echo "ARCH=$(arch)" >> $GITHUB_ENV | |
| - name: Build container and disk image | |
| run: | | |
| sudo tests/build.sh ${{ matrix.test_os }} | |
| - name: Run container tests | |
| run: | |
| sudo just test-container | |
| - name: Archive disk image | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: PR-${{ github.event.number }}-${{ matrix.test_os }}-${{ env.ARCH }}-disk | |
| path: target/bootc-integration-test.qcow2 | |
| retention-days: 1 | |
| test: | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test_os: [fedora-42, fedora-43, centos-9, centos-10] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Free up disk space on runner | |
| run: sudo ./ci/clean-gha-runner.sh | |
| - name: Set architecture variable | |
| id: set_arch | |
| run: echo "ARCH=$(arch)" >> $GITHUB_ENV | |
| - name: Install deps | |
| run: | | |
| sudo apt-get update | |
| # see https://tmt.readthedocs.io/en/stable/overview.html#install | |
| sudo apt install -y libkrb5-dev pkg-config libvirt-dev genisoimage qemu-kvm qemu-utils libvirt-daemon-system just | |
| pip install --user "tmt[provision-virtual]" | |
| - name: Create folder to save disk image | |
| run: mkdir -p target | |
| - name: Download disk.raw | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: PR-${{ github.event.number }}-${{ matrix.test_os }}-${{ env.ARCH }}-disk | |
| path: target | |
| - name: Enable KVM group perms | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| ls -l /dev/kvm | |
| - name: Workaround https://github.com/teemtee/testcloud/issues/18 | |
| run: sudo rm -f /usr/bin/chcon && sudo ln -sr /usr/bin/true /usr/bin/chcon | |
| - name: Run all TMT tests | |
| run: | | |
| just test-tmt-nobuild | |
| - name: Archive TMT logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tmt-log-PR-${{ github.event.number }}-${{ matrix.test_os }}-${{ env.ARCH }}-${{ matrix.tmt_plan }} | |
| path: /var/tmp/tmt |