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
56 changes: 27 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,15 @@ jobs:
retention-days: 7

# ---------------------------------------------------------------------------
# RPM build validation — aarch64 (QEMU emulation, all targets)
# RPM build validation — aarch64 (native ARM64 runner, all targets)
# ---------------------------------------------------------------------------
rpm-build-aarch64:
name: RPM Build (${{ matrix.mock_root }})
needs: [ci]
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
container:
image: fedora:42
options: --privileged
strategy:
fail-fast: false
matrix:
Expand All @@ -369,35 +372,30 @@ jobs:
- mock_root: fedora-43-aarch64
- mock_root: centos-stream+epel-10-aarch64
steps:
- name: Install build dependencies
run: |
dnf install -y --setopt=install_weak_deps=False \
mock rpm-build rpmdevtools git
usermod -a -G mock root

- uses: actions/checkout@v4

- name: Build SRPMs and RPMs (aarch64 QEMU)
uses: uraimo/run-on-arch-action@v3
with:
arch: aarch64
distro: fedora_latest
githubToken: ${{ github.token }}
dockerRunArgs: |
--privileged
--volume "${{ github.workspace }}:/work"
install: |
dnf install -y --setopt=install_weak_deps=False \
mock rpm-build rpmdevtools git
usermod -a -G mock root
run: |
cd /work
packaging/build-srpm.sh
shopt -s nullglob
mkdir -p packaging/rpms
for srpm in packaging/srpms/*.src.rpm; do
echo "--- mock: $srpm ---"
mock -r ${{ matrix.mock_root }} --enable-network --isolation=simple \
--rebuild "$srpm" --resultdir=packaging/rpms/ || {
echo "FAILED: $srpm"
cat packaging/rpms/build.log 2>/dev/null || true
exit 1
}
done
- name: Build SRPMs
run: packaging/build-srpm.sh

- name: Build RPMs via mock
run: |
shopt -s nullglob
mkdir -p packaging/rpms
for srpm in packaging/srpms/*.src.rpm; do
echo "--- mock: $srpm ---"
mock -r ${{ matrix.mock_root }} --enable-network --isolation=simple \
--rebuild "$srpm" --resultdir=packaging/rpms/ || {
echo "FAILED: $srpm"
cat packaging/rpms/build.log 2>/dev/null || true
exit 1
}
done

- name: Upload RPMs
uses: actions/upload-artifact@v4
Expand Down
83 changes: 40 additions & 43 deletions .github/workflows/rpm-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,15 @@ jobs:
path: repo/

# ---------------------------------------------------------------------------
# Stage 2b: Build aarch64 binary RPMs per target (QEMU emulation)
# Stage 2b: Build aarch64 binary RPMs per target (native ARM64 runner)
# ---------------------------------------------------------------------------
build-rpms-aarch64:
name: Build RPMs (${{ matrix.target }})
needs: build-source
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
container:
image: fedora:42
options: --privileged
strategy:
fail-fast: false
matrix:
Expand All @@ -141,60 +144,54 @@ jobs:
mock_root: centos-stream+epel-10-aarch64
repo_path: repo/epel/10/aarch64
steps:
- name: Install build dependencies
run: |
dnf install -y --setopt=install_weak_deps=False mock createrepo_c
usermod -a -G mock root

- name: Download SRPMs
uses: actions/download-artifact@v4
with:
name: srpms
path: srpms/

- name: Build RPMs and prepare repo (aarch64 QEMU)
uses: uraimo/run-on-arch-action@v3
with:
arch: aarch64
distro: fedora_latest
githubToken: ${{ github.token }}
dockerRunArgs: |
--privileged
--volume "${{ github.workspace }}/srpms:/srpms"
--volume "${{ github.workspace }}/output:/output"
install: |
dnf install -y --setopt=install_weak_deps=False mock createrepo_c
usermod -a -G mock root
run: |
mkdir -p /rpms
FAILED=""
for srpm in /srpms/*.src.rpm; do
echo "--- mock: $srpm ---"
if mock -r ${{ matrix.mock_root }} --enable-network --isolation=simple \
--rebuild "$srpm" --resultdir=/rpms/; then
echo "--- OK: $srpm ---"
else
echo "--- FAILED: $srpm ---"
FAILED="$FAILED $srpm"
fi
done
if [ -n "$FAILED" ]; then
echo "=== FAILED builds ===$FAILED"
exit 1
- name: Build RPMs via mock
run: |
mkdir -p rpms
FAILED=""
for srpm in srpms/*.src.rpm; do
echo "--- mock: $srpm ---"
if mock -r ${{ matrix.mock_root }} --enable-network --isolation=simple \
--rebuild "$srpm" --resultdir=rpms/; then
echo "--- OK: $srpm ---"
else
echo "--- FAILED: $srpm ---"
FAILED="$FAILED $srpm"
fi
done
if [ -n "$FAILED" ]; then
echo "=== FAILED builds ===$FAILED"
exit 1
fi

# Prepare repo directory inside the container (createrepo_c is here)
mkdir -p /output/${{ matrix.repo_path }}
cp /rpms/*.noarch.rpm /rpms/*.aarch64.rpm \
/output/${{ matrix.repo_path }}/ 2>/dev/null || true
if ! ls /output/${{ matrix.repo_path }}/*.rpm >/dev/null 2>&1; then
echo "ERROR: No RPMs found for repo"
exit 1
fi
rm -f /output/${{ matrix.repo_path }}/*-debuginfo-* \
/output/${{ matrix.repo_path }}/*-debugsource-*
createrepo_c /output/${{ matrix.repo_path }}
- name: Prepare repo directory
run: |
mkdir -p ${{ matrix.repo_path }}
cp rpms/*.noarch.rpm rpms/*.aarch64.rpm \
${{ matrix.repo_path }}/ 2>/dev/null || true
if ! ls ${{ matrix.repo_path }}/*.rpm >/dev/null 2>&1; then
echo "ERROR: No RPMs found for repo"
exit 1
fi
rm -f ${{ matrix.repo_path }}/*-debuginfo-* \
${{ matrix.repo_path }}/*-debugsource-*
createrepo_c ${{ matrix.repo_path }}

- name: Upload repo artifact
uses: actions/upload-artifact@v4
with:
name: repo-${{ matrix.target }}
path: output/repo/
path: repo/

# ---------------------------------------------------------------------------
# Stage 3: Assemble and deploy to GitHub Pages
Expand Down
Loading