maint(windows): rename action and clarify documentation

Build-bot: skip
This commit is contained in:
Marc Durdin 2025-12-17 04:46:07 +11:00
parent b26a2f1ad4
commit 98cc5e8893
4 changed files with 46 additions and 41 deletions

View file

@ -13,7 +13,7 @@ TODO
# close-linked-issues-for-merged-prs.yml
TODO
# core-arm64-test.yml: Test Keyman Core on Windows/ARM64
# core-arm64-windows-test.yml: Test Keyman Core on Windows/ARM64
This action allows us to test Keyman Core for Windows on ARM64 architecture with
a GitHub agent, as we do not have any TeamCity Windows build agents with ARM64
@ -22,42 +22,40 @@ arch.
It will normally be triggered as part of a test build from the
resources/teamcity/triggers/trigger-test-builds.sh script.
You can manually trigger a core-arm64-test action on GitHub, e.g. to test changes:
You can manually trigger a core-arm64-windows-test action on GitHub on your fork
of keymanapp/keyman. This is normally only needed to test changes to the action
itself:
- 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
- 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
- seet `GITHUB_TOKEN=<your_gh_token>`
- 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\": \"core-arm64-test: master\", \
--data "{ \"event_type\": \"core-arm64-windows-test: 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\", \
\"force\": \"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 trigger a build for PR #1234 in a branch `my-pr-branch` 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\": \"core-arm64-test: PR #1234\", \
--data "{ \"event_type\": \"core-arm64-windows-test: PR #1234\", \
\"client_payload\": { \
\"buildSha\": \"$(git rev-parse refs/heads/pr-1234)\", \
\"branch\": \"pr-1234\", \
\"baseBranch\": \"master\", \
\"baseRef\": \"$(git rev-parse refs/heads/master)\", \
\"buildSha\": \"$(git rev-parse refs/heads/my-pr-branch)\", \
\"branch\": \"my-pr-branch\", \
\"user\": \"${USER}\", \
\"isTestBuild\": \"true\", \
\"force\": \"true\"}" \
@ -71,11 +69,13 @@ TODO
# deb-packaging.yml: Ubuntu Packaging GitHub Action
You can manually trigger a deb-packaging action on GitHub, e.g. to test changes:
You can manually trigger a deb-packaging action on GitHub on your fork
of keymanapp/keyman. This is normally only needed to test changes to the action
itself:
- 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
- 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
- seet `GITHUB_TOKEN=<your_gh_token>`
- trigger a build with:
```bash

View file

@ -1,26 +1,31 @@
#
# This workflow tests Keyman Core on ARM64; we cannot use our TeamCity agents
# because we have no ARM64 Windows agents.
# This workflow tests Keyman Core on ARM64/Windows; we cannot use our TeamCity
# agents because we have no ARM64 Windows agents.
#
# It is triggered by a repository_dispatch event with the type
# `core-arm64-test:*`.
# `core-arm64-windows-test:*`.
#
name: "Keyman Core - ARM64 test"
run-name: "Keyman Core - ARM64 test - ${{ github.event.client_payload.branch }} (branch ${{ github.event.client_payload.baseBranch }}), by @${{ github.event.client_payload.user }}, testbuild: ${{ github.event.client_payload.isTestBuild }}"
name: "Keyman Core - ARM64/Windows test"
run-name: "Keyman Core - ARM64/Windows test - ${{ github.event.client_payload.branch }} by @${{ github.event.client_payload.user }}"
on:
repository_dispatch:
types: ['core-arm64-test:*']
types: ['core-arm64-windows-test:*']
# pull-request:
# 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`
# user: The user that triggered the build or created the PR
# isTestBuild: false for Releases, otherwise true
# Inputs:
#
# buildSha: The SHA of the commit to build, e.g. of the branch or
# refs/pull/1234/head for PR
# isTestBuild: true for PR and test builds, false for release builds
# force: true to run this action on a fork of keymanapp/keyman
#
# Descriptive inputs:
#
# branch: Name of the branch to build, generally, `master`, `beta`,
# `stable-x.y`, or for a PR `#1234`. Used only in the action
# title
# user: The user that triggered the build or created the PR. Used
# only in the action title
env:
GH_TOKEN: ${{ github.token }}
@ -28,8 +33,8 @@ env:
_builder_timings: false
jobs:
core-arm64-test:
name: Keyman Core ARM64 test
core-arm64-windows-test:
name: Keyman Core ARM64/Windows test
if: github.repository == 'keymanapp/keyman' || github.event.client_payload.force
runs-on: windows-11-arm
@ -124,24 +129,24 @@ jobs:
set_status:
name: Set result status on PR builds
needs: [core-arm64-test]
needs: [core-arm64-windows-test]
runs-on: windows-arm64
if: ${{ always() && github.event.client_payload.isTestBuild == 'true' }}
steps:
- name: Set success
if: needs.core-arm64-test.result == 'success'
if: needs.core-arm64-windows-test.result == 'success'
run: |
echo "RESULT=success" >> $GITHUB_ENV
echo "MSG=Keyman Core ARM64 test succeeded" >> $GITHUB_ENV
- name: Set cancelled
if: needs.core-arm64-test.result == 'cancelled'
if: needs.core-arm64-windows-test.result == 'cancelled'
run: |
echo "RESULT=error" >> $GITHUB_ENV
echo "MSG=Keyman Core ARM64 test cancelled" >> $GITHUB_ENV
- name: Set failure
if: needs.core-arm64-test.result == 'failure'
if: needs.core-arm64-windows-test.result == 'failure'
run: |
echo "RESULT=failure" >> $GITHUB_ENV
echo "MSG=Keyman Core ARM64 test failed" >> $GITHUB_ENV

View file

@ -4,7 +4,7 @@ export const testBuildConfigurations = {
'ios': ['Keyman_iOS_TestPullRequests', 'Keyman_iOS_TestSamplesAndTestProjects'],
'linux': ['KeymanLinux_TestPullRequests', 'Keyman_Linux_Test_Integration', 'Keyman_Common_KPAPI_TestPullRequests_Linux', 'deb-pr-packaging_GitHub'],
'mac': ['Keyman_KeymanMac_PullRequests', 'Keyman_Common_KPAPI_TestPullRequests_macOS'],
'windows': ['KeymanDesktop_TestPullRequests', 'KeymanDesktop_TestPrRenderOnScreenKeyboards', 'Keyman_Common_KPAPI_TestPullRequests_Windows', 'core-arm64-test_GitHub'],
'windows': ['KeymanDesktop_TestPullRequests', 'KeymanDesktop_TestPrRenderOnScreenKeyboards', 'Keyman_Common_KPAPI_TestPullRequests_Windows', 'core-arm64-windows-test_GitHub'],
'web': ['Keymanweb_TestPullRequests', 'Keyman_Common_KPAPI_TestPullRequests_WASM'],
'developer': ['Keyman_Developer_Test', 'npm-publish_GitHub'],

View file

@ -87,7 +87,7 @@ bc_test_android=(KeymanAndroid_TestPullRequests KeymanAndroid_TestSamplesAndTest
bc_test_ios=(Keyman_iOS_TestPullRequests Keyman_iOS_TestSamplesAndTestProjects)
bc_test_linux=(KeymanLinux_TestPullRequests Keyman_Linux_Test_Integration Keyman_Common_KPAPI_TestPullRequests_Linux deb-pr-packaging_GitHub)
bc_test_mac=(Keyman_KeymanMac_PullRequests Keyman_Common_KPAPI_TestPullRequests_macOS)
bc_test_windows=(KeymanDesktop_TestPullRequests KeymanDesktop_TestPrRenderOnScreenKeyboards Keyman_Common_KPAPI_TestPullRequests_Windows core-arm64-test_GitHub)
bc_test_windows=(KeymanDesktop_TestPullRequests KeymanDesktop_TestPrRenderOnScreenKeyboards Keyman_Common_KPAPI_TestPullRequests_Windows core-arm64-windows-test_GitHub)
bc_test_web=(Keymanweb_TestPullRequests Keyman_Common_KPAPI_TestPullRequests_WASM)
bc_test_developer=(Keyman_Developer_Test Keyman_Test_Developer_Mac Keyman_Test_Developer_Linux npm-publish_GitHub)