From 37854e6302c52eece47001625730c698cba186b5 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 11 Sep 2025 16:13:39 +0200 Subject: [PATCH 1/3] maint(linux): allow to force package build on non-Keyman repo 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. --- .github/workflows/deb-packaging.README.md | 3 ++- .github/workflows/deb-packaging.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deb-packaging.README.md b/.github/workflows/deb-packaging.README.md index 9dcfce20db..02673679e0 100644 --- a/.github/workflows/deb-packaging.README.md +++ b/.github/workflows/deb-packaging.README.md @@ -36,6 +36,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//keyman/dispatches ``` diff --git a/.github/workflows/deb-packaging.yml b/.github/workflows/deb-packaging.yml index 472adf91b0..cf1eb718e9 100644 --- a/.github/workflows/deb-packaging.yml +++ b/.github/workflows/deb-packaging.yml @@ -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 }} From 43bcd92602fd9a183e529450b22568a70bcd8dab Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 11 Sep 2025 15:28:55 +0200 Subject: [PATCH 2/3] maint(linux): enable autopkgtests during package build This enables running `autopkgtests` during a package build. Fixes: #13777 Test-bot: skip --- .github/workflows/deb-packaging.yml | 46 +++++++++++++++++------------ 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/.github/workflows/deb-packaging.yml b/.github/workflows/deb-packaging.yml index cf1eb718e9..28440c4211 100644 --- a/.github/workflows/deb-packaging.yml +++ b/.github/workflows/deb-packaging.yml @@ -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 From 281c37c3d0bcac9d6b9dc8b82a3a53e8c72111c6 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Mon, 15 Sep 2025 15:47:01 +0200 Subject: [PATCH 3/3] maint(linux): address code review comments --- .github/workflows/deb-packaging.README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deb-packaging.README.md b/.github/workflows/deb-packaging.README.md index 02673679e0..662526a875 100644 --- a/.github/workflows/deb-packaging.README.md +++ b/.github/workflows/deb-packaging.README.md @@ -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//keyman/dispatches ```