Skip to content

Commit

Permalink
WIP: Run grml-live itself in GitHub test-build job
Browse files Browse the repository at this point in the history
  • Loading branch information
zeha committed Dec 10, 2024
1 parent 7683e73 commit 8321d4f
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,27 @@ jobs:
if-no-files-found: error
path: |
*.deb
build-iso:
strategy:
fail-fast: false
matrix:
host_release:
- bookworm

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- run: ./test/gha-build-iso.sh
name: "Build ISO on ${{matrix.host_release}}"
env:
HOST_RELEASE: ${{matrix.host_release}}

- name: Archive built ISO
uses: actions/upload-artifact@v4
with:
name: grml-live-build-result-${{matrix.host_release}}
if-no-files-found: error
path: |
results/*
28 changes: 28 additions & 0 deletions test/gha-build-iso.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Entrypoint for GitHub Actions to build an ISO with a minimal setup,
# just to validate grml-live itself.

set -euxo pipefail

cat >build-gha-ci-test-config <<EOT
---
last_release: 2024.02
EOT

# Install as little Debian packages as possible,
# we do not want to test *Debian*.
cat > etc/grml/fai/config/package_config/GRML_GHACI <<EOT
PACKAGES install AMD64
linux-image-amd64
PACKAGES install ARM64
linux-image-arm64
EOT

# Note: file ownership inside docker is "wrong", and then git will fail.
# As a workaround we set safe.directory to ignore the ownership issues.

docker run -i --rm --volume "${PWD}:/source" -e SKIP_SOURCES=1 -e DO_DAILY_UPLOAD=0 -w /source debian:"$HOST_RELEASE" bash -c \
"apt-get update -qq && apt-get satisfy -q -y --no-install-recommends 'git, ca-certificates' && git config --global --add safe.directory /source && /source/build-driver/build /source daily /source/build-gha-ci-test-config ghaci amd64 testing"

0 comments on commit 8321d4f

Please sign in to comment.