-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 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,51 @@ | ||
name: test-build | ||
on: | ||
pull_request: | ||
push: | ||
|
||
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 | ||
|
||
# We want a working shell, qemu, python and docker. Specific version should not matter (much). | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: "Build .deb" | ||
run: | | ||
sudo apt-get update | ||
sudo 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) | ||
SOURCE=$(dpkg-parsechangelog -SSource) | ||
cat > debian/changelog <<EOT | ||
${SOURCE} (${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"/ | ||
- name: Archive built .deb | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: deb-${{matrix.host_release}} | ||
if-no-files-found: error | ||
path: | | ||
*.deb |