Skip to content

Commit

Permalink
fix: dev: mark slow tests linux-only to run in GH ci
Browse files Browse the repository at this point in the history
* make sure six is a test-only requirement used by oldcodebase
* make sure debuild can see new (python) package name
* enhance the deb workflow for artifact action v4
* update .gitchangelog.rc and add keepachangelog template file
* revert previous changelog updates to original	(upstream)

Signed-off-by: Steve Arnold <[email protected]>
  • Loading branch information
sarnold committed Apr 7, 2024
1 parent b8eba02 commit cf1f8d6
Show file tree
Hide file tree
Showing 15 changed files with 390 additions and 4,132 deletions.
19 changes: 19 additions & 0 deletions .gitchangelog-keepachangelog.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ChangeLog

{{#versions}}
## {{#tag}}{{{tag}}}{{/tag}}{{^tag}}_(unreleased)_{{/tag}}

{{#sections}}
### {{{label}}}

{{#commits}}
- {{{subject}}} [{{{author}}}]
{{#body}}

{{{body_indented}}}
{{/body}}
{{/commits}}

{{/sections}}

{{/versions}}
25 changes: 11 additions & 14 deletions .gitchangelog.rc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8; mode: python -*-
##
## Message Format
## Format
##
## ACTION: [AUDIENCE:] COMMIT_MSG [!TAG ...]
##
Expand Down Expand Up @@ -57,13 +57,14 @@
## Any commit having its full commit message matching any regexp listed here
## will be ignored and won't be reported in the changelog.
##
#ignore_regexps = []
ignore_regexps = [
r'@minor', r'!minor',
r'@cosmetic', r'!cosmetic',
r'@refactor', r'!refactor',
r'@wip', r'!wip',
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[p|P]kg:',
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[d|D]ev:',
r'^([cC]i)\s*:',
r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$',
r'^$', ## ignore commits with empty messages
]
Expand Down Expand Up @@ -135,8 +136,6 @@ section_regexps = [
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)')
#body_process = noop
body_process = ReSub(r'((^|\n)[A-Z]\w+(-\w+)*: .*(\n\s+.*)*)+$', r'') | strip
#body_process = lambda text: ""
#body_process = ReSub(r'.*', '')


## ``subject_process`` is a callable
Expand All @@ -155,18 +154,16 @@ subject_process = (strip |
## Tags that will be used for the changelog must match this regexp.
##
tag_filter_regexp = r'^v?[0-9]+\.[0-9]+(\.[0-9]+)?$'
#tag_filter_regexp = r"^.*$"
#tag_filter_regexp = r'^[0-9]+\.[0-9]+(\.[0-9]+)?$'


## ``unreleased_version_label`` is a string or a callable that outputs a string
##
## This label will be used as the changelog Title of the last set of changes
## between last valid tag and HEAD if any.
# custom template (.tpl file below) overrides this setting
#unreleased_version_label = lambda: swrap(
# ["git", "describe", "--tags"],
# shell=False,
#)
unreleased_version_label = "(unreleased)"
unreleased_version_label = lambda: swrap(
["git", "describe", "--tags"],
shell=False)


## ``output_engine`` is a callable
Expand Down Expand Up @@ -199,15 +196,16 @@ unreleased_version_label = "(unreleased)"
##
#output_engine = rest_py
#output_engine = mustache("restructuredtext")
output_engine = mustache("markdown")
#output_engine = mustache("markdown")
output_engine = mustache(".gitchangelog-keepachangelog.tpl")
#output_engine = makotemplate("restructuredtext")


## ``include_merge`` is a boolean
##
## This option tells git-log whether to include merge commits in the log.
## The default is to include them.
include_merge = True
include_merge = False


## ``log_encoding`` is a string identifier
Expand Down Expand Up @@ -254,7 +252,6 @@ include_merge = True
# r'/(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n/',
# idx=lambda m: m.start(1)
# )

#publish = stdout


Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt-get -qq update
sudo apt-get install -y libgpgme-dev
sudo apt-get install -y pbzip2 pigz lzop liblz4-tool libgpgme11-dev
- name: Macos dependencies
if: runner.os == 'MacOS'
Expand Down
34 changes: 31 additions & 3 deletions .github/workflows/debs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,31 @@ on:
workflow_dispatch:

jobs:
build-debs:
get_version:
name: Get version info
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
outputs:
version: ${{ steps.git_ver.outputs.version }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get package version
id: git_ver
run: |
version=$(git describe --tags | sed -e "s|v||" -e "s|-g|+g|")
echo "Version from git: ${version}"
echo "version=${version}" >> $GITHUB_OUTPUT
build_debs:
name: ${{ matrix.name }}
runs-on: ubuntu-22.04
needs: [get_version]

strategy:
fail-fast: false
Expand All @@ -31,6 +53,12 @@ jobs:
dist: bookworm

steps:
- name: Check github variables
env:
VERSION: ${{ needs.get_version.outputs.version }}
run: |
echo "Package version from git: ${VERSION}"
- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -39,7 +67,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install devscripts
debchange -v "`git describe --tags | sed -e "s|v||" -e "s|-g|+g|"`-${{ matrix.dist }}" -b -M --distribution ${{ matrix.dist }} "ci build"
debchange -v ${{ needs.get_version.outputs.version }}-${{ matrix.dist }} -b -M --distribution ${{ matrix.dist }} "ci build"
- name: Build deb packages
uses: jtdor/build-deb-action@v1
Expand All @@ -53,5 +81,5 @@ jobs:
- name: Upload deb files
uses: actions/upload-artifact@v4
with:
name: "deb-packages"
name: "bmaptool_${{ needs.get_version.outputs.version }}-${{ matrix.dist }}"
path: ./debian/artifacts/*.deb
Loading

0 comments on commit cf1f8d6

Please sign in to comment.