Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github action deb builder #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build deb packages

on: [push, pull_request]

jobs:
build:
name: ${{ matrix.os }} ${{ matrix.version }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- os: debian
version: bookworm
- os: ubuntu
version: jammy
- os: ubuntu
version: noble
permissions:
contents: write
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Commit Hash
id: commit
uses: prompt/actions-commit-hash@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- uses: jtdor/build-deb-action@v1
with:
docker-image: ${{ matrix.os == 'ubuntu' && format('ubuntu:{0}', matrix.version) || format('debian:{0}-slim', matrix.version) }}
buildpackage-opts: --build=binary --no-sign
before-build-hook: debchange --controlmaint --local "+${{ steps.commit.outputs.short }}~${{ matrix.version }}" -b --distribution ${{ matrix.version }} "CI build"
extra-build-deps: devscripts git ninja-build

- name: Upload package
uses: actions/upload-artifact@v4
with:
name: osmdbt_${{ matrix.version }}
path: debian/artifacts/*.deb

- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
name: Release ${{ github.ref }}
files: |
debian/artifacts/*.deb
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ override_dh_auto_configure:

# Tests need to run one after the other otherwise the database tests will fail
override_dh_auto_test:
dh_auto_test --no-parallel
# dh_auto_test --no-parallel