Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/actions/bootc-ubuntu-setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: 'Bootc Ubuntu Setup'
description: 'Default host setup'
inputs:
libvirt:
description: 'Install libvirt and virtualization stack'
required: false
default: 'false'
runs:
using: 'composite'
steps:
Expand Down Expand Up @@ -45,3 +50,20 @@ runs:
id: set_arch
shell: bash
run: echo "ARCH=$(arch)" >> $GITHUB_ENV
# We often use Rust, so set up opinionated default caching
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
# Only generate caches on push to git main
save-if: ${{ github.ref == 'refs/heads/main' }}
# Suppress actually using the cache for builds running from
# git main so that we avoid incremental compilation bugs
lookup-only: ${{ github.ref == 'refs/heads/main' }}
# Install libvirt stack if requested
- name: Install libvirt and virtualization stack
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
42 changes: 5 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ jobs:
- uses: actions/checkout@v4
- name: Bootc Ubuntu Setup
uses: ./.github/actions/bootc-ubuntu-setup
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
save-if: ${{ github.ref == 'refs/heads/main' }}
lookup-only: ${{ github.ref == 'refs/heads/main' }}
- name: Validate (default)
run: just validate
# Build container with continuous repository enabled
Expand All @@ -47,12 +41,6 @@ jobs:
- uses: actions/checkout@v4
- name: Bootc Ubuntu Setup
uses: ./.github/actions/bootc-ubuntu-setup
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
save-if: ${{ github.ref == 'refs/heads/main' }}
lookup-only: ${{ github.ref == 'refs/heads/main' }}
- name: Build with continuous repo enabled
run: sudo just build --build-arg=continuous_repo=1
# Check for security vulnerabilities and license compliance
Expand All @@ -74,12 +62,6 @@ jobs:
uses: actions/checkout@v4
- name: Bootc Ubuntu Setup
uses: ./.github/actions/bootc-ubuntu-setup
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
save-if: ${{ github.ref == 'refs/heads/main' }}
lookup-only: ${{ github.ref == 'refs/heads/main' }}
- name: Enable fsverity for /
run: sudo tune2fs -O verity $(findmnt -vno SOURCE /)
- name: Install utils
Expand Down Expand Up @@ -133,12 +115,6 @@ jobs:
- uses: actions/checkout@v4
- name: Bootc Ubuntu Setup
uses: ./.github/actions/bootc-ubuntu-setup
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
save-if: ${{ github.ref == 'refs/heads/main' }}
lookup-only: ${{ github.ref == 'refs/heads/main' }}
- name: Build mdbook
run: just build-mdbook
# Build containers and disk images for integration testing across OS matrix
Expand All @@ -154,14 +130,8 @@ jobs:
- uses: actions/checkout@v4
- name: Bootc Ubuntu Setup
uses: ./.github/actions/bootc-ubuntu-setup
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
save-if: ${{ github.ref == 'refs/heads/main' }}
lookup-only: ${{ github.ref == 'refs/heads/main' }}
- name: Install qemu-utils
run: sudo apt install -y qemu-utils
libvirt: true

- name: Build container and disk image
run: |
Expand Down Expand Up @@ -192,12 +162,10 @@ jobs:
- uses: actions/checkout@v4
- name: Bootc Ubuntu Setup
uses: ./.github/actions/bootc-ubuntu-setup
- 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]"
with:
libvirt: true
- name: Install tmt
run: pip install --user "tmt[provision-virtual]"

- name: Create folder to save disk image
run: mkdir -p target
Expand Down
Loading