Skip to content

fix: resolve rpmbuild versioning and makefile lint target issues #101

fix: resolve rpmbuild versioning and makefile lint target issues

fix: resolve rpmbuild versioning and makefile lint target issues #101

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
actions: read
checks: write
contents: read
jobs:
ci-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@2.0.0
with:
scandir: './scripts'
- name: Run Markdownlint
uses: DavidAnson/markdownlint-cli2-action@v23
with:
config: rpm/.markdownlint.jsonc
globs: "**/*.md"
ci-actionlint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install Actionlint
run: |
curl -fsSL \
https://github.com/rhysd/actionlint/releases/download/v1.7.8/actionlint_1.7.8_linux_amd64.tar.gz \
-o /tmp/actionlint.tar.gz
tar -xzf /tmp/actionlint.tar.gz -C /tmp actionlint
install -m 0755 /tmp/actionlint /usr/local/bin/actionlint
- name: Run Actionlint
run: actionlint -color
ci-prep:
runs-on: ubuntu-latest
container: fedora:latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install dependencies
run: dnf install -y python3 make
- name: Configure RPM _topdir
run: echo "%_topdir ${{ github.workspace }}/rpmbuild" > ~/.rpmmacros
- name: Prepare Build Environment
run: make prep
ci-lint-spec:
runs-on: ubuntu-latest
container: fedora:latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install dependencies
run: dnf install -y rpmlint make python3
- name: Configure RPM _topdir
run: echo "%_topdir ${{ github.workspace }}/rpmbuild" > ~/.rpmmacros
- name: Lint RPM Spec
run: make lint-spec
ci-build:
runs-on: ubuntu-latest
container: fedora:latest
outputs:
rpm_artifact_id: ${{ steps.upload_rpms.outputs.artifact-id }}
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install dependencies
run: dnf install -y python3 rpm-build systemd-rpm-macros make tar
- name: Build RPM
run: make rpm
- name: Upload RPM Artifacts
id: upload_rpms
uses: actions/upload-artifact@v6
with:
name: rpms
path: rpmbuild/RPMS/noarch/*.rpm
ci-lint-rpm:
needs: ci-build
runs-on: ubuntu-latest
container: fedora:latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Download RPM Artifacts
uses: actions/download-artifact@v4
with:
name: rpms
path: rpmbuild/RPMS/noarch
- name: Install dependencies
run: dnf install -y rpmlint make
- name: Lint RPM Artifacts
run: make lint-rpm
ci-smoke-test:
needs: ci-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
fedora_version: [40, 41, 42, rawhide]
install_mode: [rootless, rootless-service-user, rootful]
container:
image: fedora:${{ matrix.fedora_version }}
options: --privileged
name: Fedora ${{ matrix.fedora_version }} / ${{ matrix.install_mode }}
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install dependencies
run: dnf install -y curl unzip systemd podman shadow-utils util-linux
- name: Download RPM Artifacts
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
mkdir -p rpms
curl -fsSL \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
-o rpms/rpms.zip \
"${{ github.api_url }}/repos/${{ github.repository }}/actions/artifacts/${{ needs.ci-build.outputs.rpm_artifact_id }}/zip"
unzip -o rpms/rpms.zip -d rpms
- name: Install Rootless RPMs
if: matrix.install_mode == 'rootless'
run: |
dnf install -y rpms/podman-ai-stack-[0-9].*.noarch.rpm
- name: Install Rootless Service-User RPMs
if: matrix.install_mode == 'rootless-service-user'
run: |
dnf install -y \
rpms/podman-ai-stack-[0-9].*.noarch.rpm \
rpms/podman-ai-stack-user-*.noarch.rpm
- name: Install Rootful RPMs
if: matrix.install_mode == 'rootful'
run: |
dnf install -y \
rpms/podman-ai-stack-[0-9].*.noarch.rpm \
rpms/podman-ai-stack-root-*.noarch.rpm
- name: Verify Shared Package Files
run: |
test -f /etc/sysconfig/podman-ai-stack
test -f /etc/containers/systemd/users/open-webui.container
test -f /etc/containers/systemd/users/ollama.container
test -f /etc/containers/systemd/users/podman-ai-stack.pod
- name: Verify Rootless Install Path
if: matrix.install_mode == 'rootless'
run: |
test ! -f /etc/containers/systemd/open-webui.container
test ! -f /etc/containers/systemd/ollama.container
if getent passwd podman-ai > /dev/null; then
echo "podman-ai user should not exist for current-user rootless installs"
exit 1
fi
if getent group podman-ai > /dev/null; then
echo "podman-ai group should not exist for current-user rootless installs"
exit 1
fi
- name: Verify Rootless Service-User Install Path
if: matrix.install_mode == 'rootless-service-user'
run: |
test ! -f /etc/containers/systemd/open-webui.container
test ! -f /etc/containers/systemd/ollama.container
getent passwd podman-ai
getent group podman-ai
test -d /var/lib/podman-ai
loginctl user-status podman-ai || echo "loginctl output is limited without full systemd"
- name: Verify Rootful Install Path
if: matrix.install_mode == 'rootful'
run: |
test -f /etc/containers/systemd/open-webui.container
test -f /etc/containers/systemd/ollama.container
test -f /etc/containers/systemd/podman-ai-stack.pod
if getent passwd podman-ai > /dev/null; then
echo "podman-ai user should not exist for rootful installs"
exit 1
fi
- name: Dry-run Quadlet Generator
run: |
/usr/lib/systemd/system-generators/podman-system-generator --dry-run || echo "Generator dry-run can fail in CI containers without full systemd"
- name: Functional Test (Start Services & HTTP Check)
run: |
echo "Starting Podman AI Stack..."
if [ -d /run/systemd/system ] && systemctl is-system-running >/dev/null 2>&1; then
if [ "${{ matrix.install_mode }}" == "rootful" ]; then
systemctl start podman-ai-stack-pod
elif [ "${{ matrix.install_mode }}" == "rootless" ]; then
systemctl --user start podman-ai-stack-pod
else
sudo -u podman-ai XDG_RUNTIME_DIR=/var/lib/podman-ai systemctl --user start podman-ai-stack-pod
fi
else
echo "Systemd not running as PID 1. Falling back to direct Podman execution for functional testing..."
podman run -d --name open-webui -p 3000:8080 --cgroups=disabled ghcr.io/open-webui/open-webui:main
fi
echo "Waiting for Open WebUI to initialize and serve HTTP..."
timeout 180 bash -c 'while ! curl -s -f http://localhost:3000/health > /dev/null; do echo "Waiting..."; sleep 5; done'
echo "Functional test passed successfully!"