Skip to content

Commit

Permalink
Merge branch 'master' into feat/developer/9948-load-xml-ldml-files
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdurdin committed Nov 15, 2023
2 parents a923537 + 26900f7 commit b8dcc1b
Show file tree
Hide file tree
Showing 103 changed files with 2,453 additions and 603 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/deb-packaging.README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Debian Packaging GitHub Action

You can manually trigger a deb-packaging action on GitHub, e.g. to test changes:

- push the changes to your fork of keymanapp/keyman: git push myfork HEAD:master
- make sure you have GHA enabled in the settings of your fork and created an
access token on GitHub
- trigger a build with:

```bash
curl --write-out '\n' --request POST \
--header "Accept: application/vnd.github+json" \
--header "Authorization: token $GITHUB_TOKEN" \
--data "{ \"event_type\": \"deb-pr-packaging: master\", \
\"client_payload\": { \
\"buildSha\": \"$(git rev-parse refs/heads/master)\", \
\"branch\": \"master\", \
\"baseBranch\": \"master\",
\"baseRef\": \"$(git rev-parse refs/heads/master^)\",
\"user\": \"${USER}\",
\"isTestBuild\": \"true\"}" \
https://api.github.com/repos/<yourgithubname>/keyman/dispatches
```

To trigger a build for PR #1234 in a branch `pr-1234` this would look similar
to this:

```bash
curl --write-out '\n' --request POST \
--header "Accept: application/vnd.github+json" \
--header "Authorization: token $GITHUB_TOKEN" \
--data "{ \"event_type\": \"deb-pr-packaging: PR #1234\", \
\"client_payload\": { \
\"buildSha\": \"$(git rev-parse refs/heads/pr-1234)\", \
\"branch\": \"pr-1234\", \
\"baseBranch\": \"master\",
\"baseRef\": \"$(git rev-parse refs/heads/master)\",
\"user\": \"${USER}\",
\"isTestBuild\": \"true\"}" \
https://api.github.com/repos/<yourgithubname>/keyman/dispatches
```
46 changes: 29 additions & 17 deletions .github/workflows/deb-packaging.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
name: "Ubuntu packaging"
run-name: "Ubuntu packaging - ${{ github.event.client_payload.branch }} (branch ${{ github.head_ref }}), by @${{ github.actor }}"
run-name: "Ubuntu packaging - ${{ github.event.client_payload.branch }} (branch ${{ github.event.client_payload.baseBranch }}), by @${{ github.event.client_payload.user }}"
on:
repository_dispatch:
types: ['deb-release-packaging:*', 'deb-pr-packaging:*']

# Input:
# buildSha: The SHA of the commit to build, e.g. of the branch or
# refs/pull/1234/head for PR
# branch: The branch to build, for a PR in the form `PR-1234`
# baseBranch: For a PR the base branch, otherwise the same as `branch`
# baseRef: The ref of the previous commit. For a PR the same as `baseBranch`.
# user: The user that triggered the build or created the PR
# isTestBuild: false for Releases, otherwise true

env:
COLOR_GREEN: "\e[32m"
GH_TOKEN: ${{ github.token }}
Expand All @@ -17,26 +27,21 @@ jobs:
outputs:
VERSION: ${{ steps.version_step.outputs.VERSION }}
PRERELEASE_TAG: ${{ steps.prerelease_tag.outputs.PRERELEASE_TAG }}
GIT_SHA: ${{ steps.set_status.outputs.GIT_SHA }}
GHA_TEST_BUILD: ${{ github.event.client_payload.isTestBuild }}
GHA_BRANCH: ${{ github.event.client_payload.branch }}
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0
with:
ref: '${{ github.event.client_payload.ref }}'
ref: '${{ github.event.client_payload.buildSha }}'

- name: Set pending status on PR builds
id: set_status
if: github.event.client_payload.isTestBuild == 'true'
shell: bash
run: |
GIT_SHA="${{ github.event.client_payload.sha }}"
echo "GIT_SHA=$GIT_SHA" >> $GITHUB_OUTPUT
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
/repos/$GITHUB_REPOSITORY/statuses/$GIT_SHA \
/repos/$GITHUB_REPOSITORY/statuses/${{ github.event.client_payload.buildSha }} \
-f state='pending' \
-f target_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \
-f description='Debian packaging started' \
Expand All @@ -53,10 +58,14 @@ jobs:
./scripts/deb-packaging.sh --gha dependencies
- name: Build source package
id: build_source_package
run: |
TIER=$(cat TIER.md)
export TIER
export TIER=$(cat TIER.md)
export GHA_TEST_BUILD="${{ github.event.client_payload.isTestBuild }}"
export GHA_BRANCH="${{ github.event.client_payload.branch }}"
echo "TIER=$TIER" >> $GITHUB_ENV
echo "GHA_TEST_BUILD=${GHA_TEST_BUILD}" >> $GITHUB_ENV
echo "GHA_BRANCH=${GHA_BRANCH}" >> $GITHUB_ENV
cd linux
./scripts/deb-packaging.sh --gha source
Expand Down Expand Up @@ -84,7 +93,7 @@ jobs:
if [ "${{ github.event.client_payload.isTestBuild }}" == "true" ]; then
echo ":checkered_flag: **Test build of version ${{ steps.version_step.outputs.VERSION }} for ${{ github.event.client_payload.branch }}**" >> $GITHUB_STEP_SUMMARY
else
echo ":ship: **Release build of ${{ github.event.client_payload.branch }} branch (${{ github.event.client_payload.ref}}), version ${{ steps.version_step.outputs.VERSION }}**" >> $GITHUB_STEP_SUMMARY
echo ":ship: **Release build of ${{ github.event.client_payload.branch }} branch (${{ github.event.client_payload.branch}}), version ${{ steps.version_step.outputs.VERSION }}**" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo ":gift: Generated source package:" >> $GITHUB_STEP_SUMMARY
Expand Down Expand Up @@ -227,7 +236,8 @@ jobs:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0
with:
ref: '${{ github.event.client_payload.ref }}'
ref: '${{ github.event.client_payload.buildSha }}'
fetch-depth: 0

- name: Download Artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
Expand All @@ -243,10 +253,12 @@ jobs:
run: |
cd linux
PKG_NAME=libkeymancore
SRC_PKG="${GITHUB_WORKSPACE}/artifacts/keyman-srcpkg/keyman_${{ needs.sourcepackage.outputs.VERSION }}-1.debian.tar.xz" \
BIN_PKG="${GITHUB_WORKSPACE}/artifacts/keyman-binarypkgs/${PKG_NAME}_${{ needs.sourcepackage.outputs.VERSION }}-1${{ needs.sourcepackage.outputs.PRERELEASE_TAG }}+jammy1_amd64.deb" \
PKG_VERSION="${{ needs.sourcepackage.outputs.VERSION }}" \
./scripts/deb-packaging.sh --gha verify 2>> $GITHUB_STEP_SUMMARY
./scripts/deb-packaging.sh \
--gha \
--bin-pkg "${GITHUB_WORKSPACE}/artifacts/keyman-binarypkgs/${PKG_NAME}_${{ needs.sourcepackage.outputs.VERSION }}-1${{ needs.sourcepackage.outputs.PRERELEASE_TAG }}+jammy1_amd64.deb" \
--git-sha "${{ github.event.client_payload.buildSha }}" \
--git-base "${{ github.event.client_payload.baseRef }}" \
verify 2>> $GITHUB_STEP_SUMMARY
- name: Archive .symbols file
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
Expand Down Expand Up @@ -284,7 +296,7 @@ jobs:
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
/repos/$GITHUB_REPOSITORY/statuses/${{ needs.sourcepackage.outputs.GIT_SHA }} \
/repos/$GITHUB_REPOSITORY/statuses/${{ github.event.client_payload.buildSha }} \
-f state="$RESULT" \
-f target_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \
-f description="$MSG" \
Expand Down
63 changes: 63 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,68 @@
# Keyman Version History

## 17.0.210 alpha 2023-11-14

* docs(common): Update CODEOWNERS for web (#9997)
* chore(core): Add additional API checks (#9867)

## 17.0.209 alpha 2023-11-13

* docs(windows): update meson and emscripten details (#9933)
* fix(web): Increase size of spacebar text (#9954)

## 17.0.208 alpha 2023-11-08

* fix(web): Fix clearing of deadkeys (#9944)
* fix(web): Ignore `osk-always-visible` on non-desktop devices (#9951)
* fix(linux): Fix baseline tests (#9967)
* chore(linux): Fix GHA triggering (#9965)
* fix(linux): Fix trigger for baseline tests (#9968)

## 17.0.207 alpha 2023-11-07

* refactor(web): Link to `index.html` in test pages (#9953)
* feat(developer): Add more non-printing characters (#9846)

## 17.0.206 alpha 2023-11-06

* chore(developer): remove compile.pas and CompileErrorCodes.pas (#9924)
* chore(common): remove prepublish step from package.json (#9937)
* feat(developer): provide line number for some kmw compiler messages (#9938)
* fix(developer): Sentry in Server should honour reporting settings (#9940)
* fix(developer): resilience in loading Server config and cache files (#9941)

## 17.0.205 alpha 2023-11-03

* fix(developer): use KeymanWeb.Codes for 17.0+ (#9913)
* fix(developer): don't use osk-always-visible on touch devices (#9917)
* chore(linux): Improve repository_dispatch (#9865)
* chore(linux): Refactor deb-packaging.sh script (#9866)
* chore(linux): Add Core API version number (#9877)
* fix(developer): kmc code generation for context(n) in context (#9932)
* chore(developer): remove obsolete 'Allow Multiple Instances' and 'Use Legacy Compiler' options (#9934)
* chore(developer): common/include dep for kmcmplib (#9935)
* feat(common): ldml update to WIP cldr data (#9919)

## 17.0.204 alpha 2023-11-02

* fix(web): fixes doc-kbd display of default layer when it's not defined first (#9891)
* fix(developer): compiler crash when no project loaded (#9898)
* fix(developer): debug flag for compiling keyboards (#9901)
* chore(developer): verify kmp.json output from kmc-package (#9844)
* fix(developer): Project MRU now saves correctly (#9902)
* chore(common): fixup SchemaValidators error handling (#9903)
* chore(developer): change field label to 'Related Package ID' in Related Packages dialog (#9904)
* fix(developer): open editor links in new window (#9905)
* fix(developer): enable and update unit tests (#9907)
* fix(developer): layout builder - maintain presentation during undo (#9914)
* feat(developer): extract font family from .ttf in kmc-keyboard-info (#9859)
* fix(developer): raise error if virtual key in context string (#9908)
* feat(developer): Compile button in TIKE toolbar (#9910)
* chore(developer): rename messages.ts for clarity (#9920)
* fix(developer): warn if layer switch key is missing ID (#9921)
* fix(developer): restore selection in layout builder even with duplicate ids (#9922)
* fix(developer): enable line breaks in debugger (#9906)

## 17.0.203 alpha 2023-10-30

* fix(linux): Fix uninstallation of shared keyboard (#9880)
Expand Down
2 changes: 1 addition & 1 deletion VERSION.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
17.0.204
17.0.211
20 changes: 10 additions & 10 deletions common/test/keyboards/baseline/k_014___groups_and_virtual_keys.kmn
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ store(&MnemonicLayout) "0"

c ----------------------------------------------

group(UMain) using keys
+ [K_A] > U+03B1
+ [CTRL K_2] > deadkey(MacronBug)
+ [ALT K_2] > deadkey(MacronBug)
+ [SHIFT K_2] > deadkey(BreveBug)
group(UMain) using keys
+ [K_A] > U+03B1
+ [CTRL K_2] > deadkey(MacronBug)
+ [ALT K_2] > deadkey(MacronBug)
+ [SHIFT K_2] > deadkey(BreveBug)

match > use(DK1)

c ----------------------------------------------

group(DK1)
deadkey(MacronBug) U+03B1 > U+1FB1 c won't work
deadkey(BreveBug) U+03B1 > U+1FB0 c works
group(DK1)
deadkey(MacronBug) U+03B1 > U+1FB1
deadkey(BreveBug) U+03B1 > U+1FB0
16 changes: 12 additions & 4 deletions common/test/keyboards/baseline/k_020___deadkeys_and_backspace.kmn
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ c 2. One char and one deadkey in context 'a' dk(2) + BKSP = nul
c 3. One deadkey and one char in context dk(3) 'a' + BKSP = nul
c 4. Two deadkeys in a row in context dk(4a) dk(4b) + BKSP = nul
c 5. One char and two deadkeys in context 'a' dk(5a) dk(5b) 'b' + BKSP = 'a'
c 6. One char and two deadkeys and one char and two deadkeys in context 'a' dk(6a) dk(6b) 'b' dk(6c) dk(6d) + BKSP = 'a'
c keys: [K_1][K_BKSP][K_2][K_BKSP][K_3][K_BKSP][K_4][K_BKSP][K_5][K_BKSP][K_6][K_BKSP]
c expected: 78aa
c context: 7890
c 6. One char and two deadkeys and one char and two deadkeys in context:
c 'a' dk(6a) dk(6b) 'b' dk(6c) dk(6d) + BKSP = 'a'
c 7. Tests behaviour when deleting two characters with deadkey prior to first character,
c verifying that deadkeys are preserved with the first backspace event:
c 'c' (dk7) 'de' + BKSP + BKSP = 'ok'

c keys: [K_1][K_BKSP][K_2][K_BKSP][K_3][K_BKSP][K_4][K_BKSP][K_5][K_BKSP][K_6][K_BKSP][K_7][K_BKSP][K_BKSP]
c expected: wxaa ok
c context: wxyz

store(&VERSION) '9.0'

Expand All @@ -22,3 +27,6 @@ group(main) using keys
+ '4' > dk(4a) dk(4b)
+ '5' > 'a' dk(5a) dk(5b) 'b'
+ '6' > 'a' dk(6a) dk(6b) 'b' dk(6c) dk(6d)
+ '7' > 'c' dk(7) 'd' 'e'
'c' 'd' + [K_BKSP] > ' fail'
'c' dk(7) 'd' + [K_BKSP] > ' ok'
Binary file modified common/test/keyboards/baseline/k_020___deadkeys_and_backspace.kmx
Binary file not shown.
Loading

0 comments on commit b8dcc1b

Please sign in to comment.