-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/pr/49'
- Loading branch information
Showing
4 changed files
with
103 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: test-build | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
schedule: | ||
- cron: '30 3 * * 2' | ||
|
||
concurrency: | ||
group: "${{ github.ref }}" | ||
cancel-in-progress: true | ||
jobs: | ||
build-debian: | ||
strategy: | ||
# Keep other matrix jobs running, even if one fails. | ||
fail-fast: false | ||
matrix: | ||
host_release: | ||
- unstable | ||
- trixie | ||
- bookworm | ||
|
||
# We want a working shell, qemu, python and docker. Specific version should not matter (much). | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: ./test/gha-build-deb.sh | ||
name: "Build .deb for ${{matrix.host_release}}" | ||
env: | ||
HOST_RELEASE: ${{matrix.host_release}} | ||
|
||
- name: Archive built .deb | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: deb-${{matrix.host_release}} | ||
if-no-files-found: error | ||
path: | | ||
*.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ Maintainer: Grml Team <[email protected]> | |
Uploaders: | ||
Michael Prokop <[email protected]>, | ||
Alexander Wirt <[email protected]>, | ||
Christian Hofstaedtler <[email protected]>, | ||
Chris Hofstaedtler <[email protected]>, | ||
Ulrich Dangel <[email protected]>, | ||
Build-Depends: | ||
asciidoc, | ||
|
@@ -17,8 +17,9 @@ Build-Depends: | |
vulture, | ||
xsltproc, | ||
Standards-Version: 4.6.2 | ||
Rules-Requires-Root: no | ||
Homepage: https://grml.org/grml2usb/ | ||
Vcs-git: git://git.grml.org/grml2usb.git | ||
Vcs-Git: git://git.grml.org/grml2usb.git | ||
Vcs-Browser: https://git.grml.org/?p=grml2usb.git | ||
|
||
Package: grml2usb | ||
|
@@ -38,7 +39,7 @@ Recommends: | |
syslinux, | ||
syslinux-utils, | ||
xorriso | genisoimage, | ||
Description: install Grml system / ISO to usb device | ||
Description: install Grml system / ISO to USB device | ||
This script installs a Grml ISO to an USB device to be able | ||
to boot from it. Make sure you have at least one Grml ISO | ||
or a running Grml system (/run/live/medium) available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
# | ||
# Build a grml2usb.deb. | ||
# To be run inside docker, as this script assumes it can modify the running OS. | ||
|
||
set -eu -o pipefail | ||
set -x | ||
|
||
if [ "${1:-}" != "--autobuild" ]; then | ||
echo "$0: Only intended for CI scenarios, will destroy source files and modify running OS." >&2 | ||
exit 1 | ||
fi | ||
BUILD_NUMBER="${2:-}" | ||
if [ -z "$BUILD_NUMBER" ]; then | ||
echo "$0: missing build number in arguments" >&2 | ||
exit 1 | ||
fi | ||
|
||
apt-get update | ||
apt-get install -qq -y --no-install-recommends build-essential devscripts equivs | ||
|
||
SOURCEDIR=$PWD | ||
|
||
cd /tmp | ||
mk-build-deps -ir -t 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y' "$SOURCEDIR"/debian/control | ||
|
||
dpkg-source -b "$SOURCEDIR" | ||
dpkg-source -x ./*.dsc builddir | ||
cd builddir | ||
|
||
OLD_VERSION=$(dpkg-parsechangelog -SVersion) | ||
|
||
cat > debian/changelog <<EOT | ||
grml2usb (${OLD_VERSION}+autobuild${BUILD_NUMBER}) UNRELEASED; urgency=medium | ||
* Automated Build | ||
-- Automated Build <builder@localhost> $(date -R) | ||
EOT | ||
|
||
dpkg-buildpackage -b --no-sign | ||
|
||
mv ../*deb "$SOURCEDIR"/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
# | ||
# Entrypoint for GitHub Actions to build a grml2usb.deb. | ||
|
||
set -eu -o pipefail | ||
set -x | ||
|
||
if [ -z "${CI:-}" ] || [ -z "${GITHUB_RUN_NUMBER:-}" ]; then | ||
echo "Running outside of CI pipeline." >&2 | ||
exit 1 | ||
fi | ||
|
||
docker run --privileged -v "$(pwd)":/code --rm -i debian:"$HOST_RELEASE" \ | ||
bash -c 'TERM='"$TERM"' cd /code && ./test/docker-build-deb.sh --autobuild '"$GITHUB_RUN_NUMBER" |