Merge pull request #14749 from keymanapp/maint/linux/pkgbuild

By default we skip package builds if run on a non-Keyman repo. This makes it harder to test changes, so this PR allows to pass the parameter `force: true` when triggering the build.
This commit is contained in:
Eberhard Beilharz 2025-09-17 09:51:25 +02:00 committed by GitHub
commit d699610375
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 32 additions and 22 deletions

View file

@ -18,7 +18,8 @@ You can manually trigger a deb-packaging action on GitHub, e.g. to test changes:
\"baseBranch\": \"master\",
\"baseRef\": \"$(git rev-parse refs/heads/master^)\",
\"user\": \"${USER}\",
\"isTestBuild\": \"true\"}" \
\"isTestBuild\": \"true\",
\"force\": \"true\"}" \
https://api.github.com/repos/<yourgithubname>/keyman/dispatches
```
@ -36,6 +37,7 @@ You can manually trigger a deb-packaging action on GitHub, e.g. to test changes:
\"baseBranch\": \"master\",
\"baseRef\": \"$(git rev-parse refs/heads/master)\",
\"user\": \"${USER}\",
\"isTestBuild\": \"true\"}" \
\"isTestBuild\": \"true\",
\"force\": \"true\"}" \
https://api.github.com/repos/<yourgithubname>/keyman/dispatches
```

View file

@ -35,7 +35,7 @@ env:
jobs:
sourcepackage:
name: Build source package
if: github.repository == 'keymanapp/keyman'
if: github.repository == 'keymanapp/keyman' || github.event.client_payload.force
runs-on: ubuntu-24.04
outputs:
KEYMAN_VERSION: ${{ steps.version_step.outputs.KEYMAN_VERSION }}
@ -185,28 +185,36 @@ jobs:
runs-on: ubuntu-latest
steps:
# - name: Download Artifacts
# uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
# with:
# path: artifacts
# merge-multiple: true
- name: Download Source Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: keyman-srcpkg
path: artifacts
# - name: Install dependencies
# run: |
# sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y install autopkgtest qemu-system qemu-utils autodep8 genisoimage python3-distro-info
- name: Download Binary Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
path: artifacts
pattern: keyman-binarypkgs-*
merge-multiple: true
# - name: Build test image
# run: |
# cd "${GITHUB_WORKSPACE}/artifacts"
# autopkgtest-buildvm-ubuntu-cloud -v --release=jammy
# - name: Run tests
# run: |
# cd "${GITHUB_WORKSPACE}/artifacts"
# autopkgtest -B *.deb keyman_*.dsc -- qemu autopkgtest-jammy-amd64.img
- name: Ignore
- name: Install dependencies
run: |
echo "Ignored for now - until working solution is in place (#13777)"
sudo apt update
sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y install autopkgtest qemu-system qemu-utils autodep8 genisoimage python3-distro-info
- name: Build test image
run: |
cd "${GITHUB_WORKSPACE}/artifacts"
sudo chown ${USER} /dev/kvm
autopkgtest-buildvm-ubuntu-cloud -v --release=$(lsb_release -c -s)
- name: Run tests
run: |
# Tests are defined in linux/debian/tests/test-build
cd "${GITHUB_WORKSPACE}/artifacts"
DIST="$(lsb_release -c -s)"
autopkgtest -B *${DIST}*.deb keyman_*.dsc -- qemu autopkgtest-${DIST}-amd64.img
deb_signing:
name: Sign source and binary packages