Skip to content

Commit

Permalink
CI: add ci .deb build step
Browse files Browse the repository at this point in the history
  • Loading branch information
zeha committed Jan 31, 2025
1 parent 885483a commit d952a8e
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/test-build.yml
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

0 comments on commit d952a8e

Please sign in to comment.