- Add Forgejo repository setup to test workflow for libostree packages - Install libostree-dev and libostree-1-1 from Forgejo registry - Add all missing Debian build dependencies: debhelper-compat, dh-cargo, cargo, rustc - Add system library dependencies: libcurl4-gnutls-dev, libfuse3-dev, libsoup-3.0-dev - Add documentation dependencies: gobject-introspection, gtk-doc-tools, docbook-xml, etc. - Update todo.md to reflect completed main goal and next steps This ensures the test workflow has all the same dependencies as the main workflow and should now pass both cargo build and dpkg-buildpackage steps.
99 lines
No EOL
3.4 KiB
YAML
99 lines
No EOL
3.4 KiB
YAML
name: Test Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
pull_request:
|
|
branches: [ main, master ]
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
BOOTC_VERSION: "1.5.1"
|
|
|
|
jobs:
|
|
test-bootc-build:
|
|
name: Test bootc Build (with existing libostree)
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ubuntu:latest
|
|
steps:
|
|
- name: Setup build environment
|
|
shell: bash
|
|
run: |
|
|
apt update -y
|
|
apt install -y git curl pkg-config build-essential
|
|
|
|
# Install Rust using rustup to get the latest version
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
. ~/.cargo/env
|
|
|
|
# Set default toolchain for rustup
|
|
rustup default stable
|
|
|
|
# Verify Rust version
|
|
rustc --version
|
|
cargo --version
|
|
|
|
- name: Checkout repository manually
|
|
run: |
|
|
# Clone the repository manually instead of using actions/checkout
|
|
git clone https://git.raines.xyz/robojerk/bootc-deb.git /tmp/bootc-deb
|
|
cp -r /tmp/bootc-deb/* .
|
|
cp -r /tmp/bootc-deb/.* . 2>/dev/null || true
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
apt update -y
|
|
apt install -y libglib2.0-dev libzstd-dev libssl-dev pkg-config curl
|
|
|
|
# Add Forgejo repository for libostree packages
|
|
curl -fsSL https://git.raines.xyz/api/packages/robojerk/debian/repository.key -o /etc/apt/keyrings/forgejo-robojerk.asc
|
|
echo "deb [signed-by=/etc/apt/keyrings/forgejo-robojerk.asc] https://git.raines.xyz/api/packages/robojerk/debian noble main" | tee -a /etc/apt/sources.list.d/forgejo.list
|
|
apt update -y
|
|
|
|
# Install libostree packages from Forgejo
|
|
apt install -y libostree-dev=2025.2-1~noble1 libostree-1-1=2025.2-1~noble1
|
|
|
|
# Install additional Debian build dependencies
|
|
apt install -y debhelper-compat dh-cargo cargo rustc libcurl4-gnutls-dev libfuse3-dev libsoup-3.0-dev gobject-introspection gtk-doc-tools docbook-xml docbook-xsl xsltproc gjs libglib2.0-doc
|
|
|
|
- name: Check libostree version
|
|
run: |
|
|
pkg-config --modversion ostree-1 || echo "libostree not found"
|
|
dpkg -l | grep libostree || echo "No libostree packages installed"
|
|
|
|
- name: Clone bootc source
|
|
run: |
|
|
git clone --depth 1 --branch v${BOOTC_VERSION} https://github.com/containers/bootc.git bootc-${BOOTC_VERSION}
|
|
cd bootc-${BOOTC_VERSION}
|
|
|
|
- name: Apply compatibility patch
|
|
run: |
|
|
cd bootc-${BOOTC_VERSION}
|
|
patch -p1 < ../bootc-libostree-compatibility.patch
|
|
|
|
- name: Copy debian packaging
|
|
run: |
|
|
cd bootc-${BOOTC_VERSION}
|
|
cp -r ../debian .
|
|
|
|
- name: Test cargo build
|
|
shell: bash
|
|
run: |
|
|
cd bootc-${BOOTC_VERSION}
|
|
# Source Rust environment for the build
|
|
. ~/.cargo/env
|
|
cargo build --release
|
|
|
|
- name: Test package build (if libostree available)
|
|
shell: bash
|
|
run: |
|
|
cd bootc-${BOOTC_VERSION}
|
|
# Source Rust environment for the build
|
|
. ~/.cargo/env
|
|
if pkg-config --exists ostree-1; then
|
|
dpkg-buildpackage -us -uc -b
|
|
echo "Package build successful"
|
|
else
|
|
echo "Skipping package build - libostree not available"
|
|
fi |