Skip to content

Commit cf5b2d9

Browse files
committed
Merge branch 'change/web/remove-old-alignment-and-transform-tokenization' into change/web/remove-tracker-analyze-state
2 parents df7fec0 + 0b34fde commit cf5b2d9

File tree

217 files changed

+8698
-1999
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+8698
-1999
lines changed

.github/workflows/api-verification.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
GIT_BRANCH: ${{ steps.environment_step.outputs.GIT_BRANCH }}
2424
GIT_BASE_BRANCH: ${{ steps.environment_step.outputs.GIT_BASE_BRANCH }}
2525
GIT_USER: ${{ steps.environment_step.outputs.GIT_USER }}
26+
SKIP_API_CHECK: ${{ steps.environment_step.outputs.SKIP_API_CHECK }}
2627

2728
steps:
2829
- name: Restore artifacts
@@ -40,7 +41,7 @@ jobs:
4041
4142
- name: Set pending status on PR builds
4243
id: set_status
43-
if: steps.environment_step.outputs.IS_TEST_BUILD == 'true'
44+
if: steps.environment_step.outputs.IS_TEST_BUILD == 'true' && steps.environment_step.outputs.SKIP_API_CHECK != 'true'
4445
shell: bash
4546
run: |
4647
gh api \
@@ -53,6 +54,7 @@ jobs:
5354
-f context="$STATUS_CONTEXT"
5455
5556
- name: Checkout
57+
if: steps.environment_step.outputs.SKIP_API_CHECK != 'true'
5658
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
5759
with:
5860
ref: '${{ steps.environment_step.outputs.GIT_SHA }}'
@@ -61,11 +63,13 @@ jobs:
6163
path: ${{ github.workspace }}/keyman/
6264

6365
- name: Install devscripts
66+
if: steps.environment_step.outputs.SKIP_API_CHECK != 'true'
6467
uses: ./keyman/.github/actions/apt-install
6568
with:
6669
packages: devscripts equivs
6770

6871
- name: "Verify API for libkeymancore*.so (${{ steps.environment_step.outputs.GIT_BRANCH }}, branch ${{ steps.environment_step.outputs.GIT_BASE_BRANCH }}, by ${{ steps.environment_step.outputs.GIT_USER }})"
72+
if: steps.environment_step.outputs.SKIP_API_CHECK != 'true'
6973
run: |
7074
echo "Verify API for libkeymancore*.so (${{ steps.environment_step.outputs.GIT_BRANCH }}, branch ${{ steps.environment_step.outputs.GIT_BASE_BRANCH }}, by ${{ steps.environment_step.outputs.GIT_USER }}):" >> $GITHUB_STEP_SUMMARY
7175
@@ -79,17 +83,17 @@ jobs:
7983
verify 2>> $GITHUB_STEP_SUMMARY
8084
8185
- name: Archive .symbols file
86+
if: steps.environment_step.outputs.SKIP_API_CHECK != 'true' && always()
8287
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
8388
with:
8489
name: libkeymancore.symbols
8590
path: ${{ github.workspace }}/keyman/linux/debian/tmp/DEBIAN/symbols
86-
if: always()
8791

8892
set_status:
8993
name: Set result status on PR builds
9094
needs: [api_verification]
9195
runs-on: ubuntu-latest
92-
if: ${{ always() && needs.api_verification.outputs.IS_TEST_BUILD == 'true' }}
96+
if: ${{ always() && needs.api_verification.outputs.IS_TEST_BUILD == 'true' && needs.api_verification.outputs.SKIP_API_CHECK != 'true' }}
9397
steps:
9498
- name: Set success
9599
if: needs.api_verification.result == 'success'
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# This workflow runs the build, test and publish steps for the
2+
# Keyman build Docker images.
3+
# It is triggered by a schedule and repository_dispatch event.
4+
5+
name: "Docker images: Build, publish and test "
6+
run-name: "Docker images: Build, publish and test (branch ${{ github.ref_name }} on ${{ github.event_name }}/${{ github.event.action }} by ${{ github.actor }})"
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
on:
12+
schedule:
13+
#run every Fri, 3 pm UTC
14+
- cron: '0 15 * * 5'
15+
16+
repository_dispatch:
17+
types: ['build-test-publish-docker:*']
18+
19+
env:
20+
REGISTRY: ghcr.io
21+
USERNAME: "${{ github.actor }}"
22+
PASSWORD: "${{ secrets.KEYMAN_SERVER_REPO_ACCESS_PAT }}"
23+
24+
jobs:
25+
26+
message:
27+
name: Print message
28+
runs-on: ubuntu-latest
29+
if: ${{ github.event.act }}
30+
31+
steps:
32+
- name: Print message
33+
id: print-message
34+
run: |
35+
echo "Docker images: Build, publish and test (branch ${{ github.ref_name }} on ${{ github.event_name }}/${{ github.event.action }} by ${{ github.actor }})"
36+
37+
build:
38+
name: Build Docker images
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
- name: Checkout repository
43+
id: checkout
44+
uses: actions/checkout@v4
45+
- name: Build Docker images
46+
id: build
47+
run: |
48+
if [ -z "${{ env.USERNAME }}" ]; then
49+
resources/docker-images/build.sh build: --registry ${{ env.REGISTRY }}
50+
else
51+
echo ${{ env.PASSWORD }} | resources/docker-images/build.sh build: --registry ${{ env.REGISTRY }} --username ${{ env.USERNAME }}
52+
fi
53+
- name: Publish Docker images
54+
id: publish
55+
run: |
56+
if [ -z "${{ env.USERNAME }}" ]; then
57+
resources/docker-images/build.sh publish: --registry ${{ env.REGISTRY }}
58+
else
59+
echo ${{ env.PASSWORD }} | resources/docker-images/build.sh publish: --registry ${{ env.REGISTRY }} --username ${{ env.USERNAME }}
60+
fi
61+
62+
test:
63+
name: Test Docker images
64+
runs-on: ubuntu-latest
65+
needs: build
66+
67+
steps:
68+
- name: Checkout repository
69+
id: checkout
70+
uses: actions/checkout@v4
71+
72+
- name: Test Docker images
73+
id: test
74+
run: |
75+
if [ -z "${{ env.USERNAME }}" ]; then
76+
resources/docker-images/build.sh test: --registry ${{ env.REGISTRY }}
77+
else
78+
echo ${{ env.PASSWORD }} | resources/docker-images/build.sh test: --registry ${{ env.REGISTRY }} --username ${{ env.USERNAME }}
79+
fi

.github/workflows/cleanup-ghcr.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This workflow removes all untagged Docker images from the
2+
# GitHub Container Registry.
3+
# It is triggered by a schedule event or a manual workflow dispatch event.
4+
5+
name: "Docker images: Cleanup GitHub Container Registry"
6+
run-name: "Docker images: Cleanup GitHub Container Registry (branch ${{ github.ref_name }} on ${{ github.event_name }} by ${{ github.actor }})"
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
on:
12+
13+
schedule:
14+
#run every Fri, 6 pm UTC
15+
- cron: '0 18 * * 5' #
16+
17+
workflow_dispatch:
18+
19+
20+
jobs:
21+
message:
22+
name: Print message
23+
runs-on: ubuntu-latest
24+
if: ${{ github.event.act }}
25+
26+
steps:
27+
- name: Print message
28+
id: print-message
29+
run: |
30+
echo "Docker images: Cleanup GitHub Container Registry (branch ${{ github.ref_name }} on ${{ github.event_name }} by ${{ github.actor }})"
31+
32+
cleanup-images:
33+
name: Cleanup GitHub Container Registry images
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- name: Removing all untagged images from GitHub Container Registry
38+
id: cleanup-ghcr
39+
uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16
40+
with:
41+
dry-run: false
42+
expand-packages: true
43+
packages: keyman-*-ci
44+
delete-untagged: true
45+
token: ${{ secrets.KEYMAN_SERVER_REPO_ACCESS_PAT }}

.github/workflows/deb-packaging.README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ You can manually trigger a deb-packaging action on GitHub, e.g. to test changes:
1818
\"baseBranch\": \"master\",
1919
\"baseRef\": \"$(git rev-parse refs/heads/master^)\",
2020
\"user\": \"${USER}\",
21-
\"isTestBuild\": \"true\"}" \
21+
\"isTestBuild\": \"true\",
22+
\"force\": \"true\"}" \
2223
https://api.github.com/repos/<yourgithubname>/keyman/dispatches
2324
```
2425

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

.github/workflows/deb-packaging.yml

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
# baseRef: The ref of the previous commit. For a PR the same as `baseBranch`.
2424
# user: The user that triggered the build or created the PR
2525
# isTestBuild: false for Releases, otherwise true
26+
# skipApiCheck: true to skip the API check, otherwise false
2627

2728
env:
2829
COLOR_GREEN: "\e[32m"
@@ -34,7 +35,7 @@ env:
3435
jobs:
3536
sourcepackage:
3637
name: Build source package
37-
if: github.repository == 'keymanapp/keyman'
38+
if: github.repository == 'keymanapp/keyman' || github.event.client_payload.force
3839
runs-on: ubuntu-24.04
3940
outputs:
4041
KEYMAN_VERSION: ${{ steps.version_step.outputs.KEYMAN_VERSION }}
@@ -184,28 +185,36 @@ jobs:
184185
runs-on: ubuntu-latest
185186

186187
steps:
187-
# - name: Download Artifacts
188-
# uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
189-
# with:
190-
# path: artifacts
191-
# merge-multiple: true
192-
193-
# - name: Install dependencies
194-
# run: |
195-
# sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y install autopkgtest qemu-system qemu-utils autodep8 genisoimage python3-distro-info
196-
197-
# - name: Build test image
198-
# run: |
199-
# cd "${GITHUB_WORKSPACE}/artifacts"
200-
# autopkgtest-buildvm-ubuntu-cloud -v --release=jammy
201-
202-
# - name: Run tests
203-
# run: |
204-
# cd "${GITHUB_WORKSPACE}/artifacts"
205-
# autopkgtest -B *.deb keyman_*.dsc -- qemu autopkgtest-jammy-amd64.img
206-
- name: Ignore
188+
- name: Download Source Artifacts
189+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
190+
with:
191+
name: keyman-srcpkg
192+
path: artifacts
193+
194+
- name: Download Binary Artifacts
195+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
196+
with:
197+
path: artifacts
198+
pattern: keyman-binarypkgs-*
199+
merge-multiple: true
200+
201+
- name: Install dependencies
202+
run: |
203+
sudo apt update
204+
sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y install autopkgtest qemu-system qemu-utils autodep8 genisoimage python3-distro-info
205+
206+
- name: Build test image
207+
run: |
208+
cd "${GITHUB_WORKSPACE}/artifacts"
209+
sudo chown ${USER} /dev/kvm
210+
autopkgtest-buildvm-ubuntu-cloud -v --release=$(lsb_release -c -s)
211+
212+
- name: Run tests
207213
run: |
208-
echo "Ignored for now - until working solution is in place (#13777)"
214+
# Tests are defined in linux/debian/tests/test-build
215+
cd "${GITHUB_WORKSPACE}/artifacts"
216+
DIST="$(lsb_release -c -s)"
217+
autopkgtest -B *${DIST}*.deb keyman_*.dsc -- qemu autopkgtest-${DIST}-amd64.img
209218
210219
deb_signing:
211220
name: Sign source and binary packages
@@ -332,6 +341,7 @@ jobs:
332341
echo "GIT_BRANCH=${{ github.event.client_payload.branch }}" >> artifacts/env
333342
echo "GIT_BASE_BRANCH=${{ github.event.client_payload.baseBranch }}" >> artifacts/env
334343
echo "GIT_USER=${{ github.event.client_payload.user }}" >> artifacts/env
344+
echo "SKIP_API_CHECK=${{ github.event.client_payload.skipApiCheck }}" >> artifacts/env
335345
336346
- name: Cache artifacts
337347
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3

0 commit comments

Comments
 (0)