Commit graph

769 commits

Author SHA1 Message Date
Marc Durdin
47bfdd341f
Merge pull request #14504 from keymanapp/maint/resources/14502-auto-merge-approve-prep
maint(resources): add build-bot commands to increment-version auto PRs
2025-08-14 09:29:26 +07:00
Marc Durdin
bdbd748d82
Merge pull request #14458 from keymanapp/maint/common/mac-scripts
maint(common): reorganize mac/ios build script includes 🐸
2025-08-12 10:41:35 +07:00
Marc Durdin
3c5bcf6c10
Merge pull request #14452 from keymanapp/maint/common/14448-typescript.inc.sh
maint(common): move typescript script functions into typescript.inc.sh 🐸
2025-08-12 10:41:26 +07:00
Marc Durdin
942b06afdd
Merge pull request #14451 from keymanapp/maint/common/14447-node.inc.sh
maint(common): rename and move node-related script functions into node.inc.sh 🐸
2025-08-12 10:41:18 +07:00
Marc Durdin
a81138c62b
Merge pull request #14449 from keymanapp/maint/common/14065-consolidate-builder-scripts
maint(common): consolidate builder scripts 🐸
2025-08-12 10:41:09 +07:00
Marc Durdin
f95b26ac1f
Merge pull request #14446 from keymanapp/maint/common/14275-rename-and-cleanup-shellHelperFunctions.sh
maint(common): rename shellHelperFunctions.sh to utils.inc.sh 🐸
2025-08-12 10:40:59 +07:00
Marc Durdin
f74ffb6146 maint(resources): add build-bot commands to increment-version auto PRs
Note: this does not remove auto merge from the
auto-merge-keyman-server-pr.yml GHA at this time, because that would
require us to use graphql to mark PRs as auto-merge, and we are not
quite ready to do that. So we'll continue to use the automerge action
for now.

The scope for pull request events has been expanded on
auto-merge-keyman-server-pr.yml so that updates to build status trigger
the automerge as needed.

Fixes: #14502
Build-bot: skip
Test-bot: skip
2025-08-12 05:07:23 +02:00
Marc Durdin
3292c0add7
Merge branch 'docs/resources/14266-clarify-build-bot' into maint/resources/14419-build-sh-style-build-bot 2025-08-07 11:43:17 +07:00
Marc Durdin
e6aa384e07 maint(resources): build.sh-style commands for build-bot
Legacy format will still work, but preferred format is now
`Build-bot: level:platform[,...platform] ...`

Fixes: #14419
Build-bot: build
Test-bot: skip
2025-08-05 19:58:25 +10:00
Marc Durdin
1477ec5095
Merge branch 'maint/common/14448-typescript.inc.sh' into maint/common/mac-scripts 2025-08-05 10:36:10 +07:00
Marc Durdin
f03be501a6 maint(common): reorganize mac/ios build script includes
Move mac-specific build scripts and functions into our established
patterns for scripts under resources/build:

* new mac/mac.inc.sh for mac-specific functions, from mac-utils.inc.sh,
  utils.inc.sh, builder-basic.inc.sh
* move other mac-specific scripts into mac/

Relates-to: #14065
Build-bot: build
Test-bot: skip
2025-08-05 12:57:32 +10:00
Marc Durdin
b42fcb3521
Merge branch 'maint/common/14447-node.inc.sh' into maint/common/14448-typescript.inc.sh 2025-08-05 08:07:33 +07:00
Marc Durdin
e2d865635a
Merge branch 'maint/common/14065-consolidate-builder-scripts' into maint/common/14447-node.inc.sh 2025-08-05 08:07:21 +07:00
Marc Durdin
0bcce97540 maint(common): re-add build-utils.sh in order to pass all builds
The file build-utils.sh can be deleted in a follow-up PR once #14449
hits master.
2025-08-05 10:56:07 +10:00
Marc Durdin
acefdf281a maint(common): move typescript script functions into typescript.inc.sh
Fixes: #14448
Build-bot: build
Test-bot: skip
2025-08-03 07:01:57 +10:00
Marc Durdin
2726050601 maint(common): rename and move node-related script functions into node.inc.sh
Consolidates the node-related script functions into node.inc.sh, as part
of cleaning up the build scripts and making them easier to maintain into
the future.

Fixes: #14447
2025-08-02 13:34:29 +10:00
Marc Durdin
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
65158a0526 maint(common): rename shellHelperFunctions.sh to utils.inc.sh
Adds documentation for various functions, removes unused functions (a
couple of simple, very lightly used functions were unDRYed; these could
go back the other way across all shell scripts if necessary). TODO items
noted for follow-up refactoring.

Fixes: #14275
Relates-to: #14269
Build-bot: build all
Test-bot: skip
2025-08-02 06:58:40 +10:00
Marc Durdin
808b6557d6 maint(common): use cpp_std=c++17 in meson project default_options
We attempted to set the C++ version in standard.meson.build, but this
does not work well as the option name varies by platform, and it also
triggers a warning in meson. This fix moves the setting into each
meson.build project() default_options. As there are only a handful
of these, the maintenance burden is not high.

Fixes: #14432
Relates-to: #14355
Build-bot: build
Test-bot: skip
2025-08-01 10:23:57 +10:00
Darcy Wong
3a041f568e
Merge pull request #14385 from keymanapp/chore/common/update-min-versions-19
docs(common): Document minimum version of Chrome 95.0 for Android
2025-07-24 05:52:40 +07:00
Eberhard Beilharz
0f9d4e488a
Merge pull request #14347 from keymanapp/maint/linux/13464_emscripten
If the `$EMSCRIPTEN_BASE` dir is missing (which usually points to `emsdk/upstream/emscripten`), but we have the `emsdk` root directory with `emsdk/emsdk`, we can have everything we need to install the desired emscripten version.

Issue #13464 describes an error where the `upstream/emscripten` directory was missing - probably because the build got interrupted while installing emscripten. This change fixes this.

Fixes: #13464
2025-07-23 16:15:13 +02:00
Eberhard Beilharz
7732520e68
Merge pull request #14346 from keymanapp/maint/common/locate_emscr_tests 2025-07-23 15:59:23 +02:00
Eberhard Beilharz
71af4a9636
chore(windows): Merge branch 'master' into maint/windows/addzip 2025-07-22 17:29:56 +02:00
Eberhard Beilharz
fba8797fd2
Merge pull request #14387 from keymanapp/maint/common/fixzip
Previously `add_zip_files` didn't work if the zip filename was not specified as first parameter. This change allows it to come after flags.

This will fix web release and other builds.
2025-07-22 17:16:18 +02:00
Eberhard Beilharz
96dc8e0db7
Merge pull request #14386 from keymanapp/test/common/ziptests
Some cleanup and better use of functionality of testing framework.
2025-07-22 17:15:16 +02:00
Eberhard Beilharz
1fe8b893c6
chore(common): Merge branch 'master' into maint/common/locate_emscr_tests 2025-07-22 16:49:54 +02:00
Eberhard Beilharz
39b1da2940
Merge pull request #14382 from keymanapp/maint/common/jqstandalone
`jq.inc.sh` gets also used in some scripts that don't source our builder scripts, e.g. in git hooks. This means that `builder_is_windows` is not defined. This change replaces the call of that function with a slightly modified version of the previous implementation.

Follow-up-of: #14324
2025-07-22 15:14:49 +02:00
Eberhard Beilharz
d9e788d20d
maint(common): address code review comments
- update doc in the function header
- add unit tests to show that flags are allowed anywhere now
2025-07-22 15:08:07 +02:00
Eberhard Beilharz
e7ce49a295
maint(common): fix add_zip_files if flags come before zip filename
Previously `add_zip_files` didn't work if the zip filename was not
specified as first parameter. This change allows it to come after flags.

This will fix web release builds.

Test-bot: skip
2025-07-22 10:48:27 +02:00
Eberhard Beilharz
cb6e62531e
test(common): improve zip tests
Some cleanup and better use of functionality of testing framework.
2025-07-22 10:46:35 +02:00
Eberhard Beilharz
61d30ae0b7
Merge pull request #14380 from keymanapp/refactor/common/ziptests
This makes of the testing framework added in #14345 and also renames the tests to better separate the parts of the test name.
2025-07-22 09:55:49 +02:00
Darcy Wong
1e2b533e61 docs(common): Document minimum version of Chrome 95.0 for Android 2025-07-22 08:51:55 +07:00
Eberhard Beilharz
87d6e1273f
maint(common): fix use of jq.inc.sh in git hooks
`jq.inc.sh` gets also used in some scripts that don't source our
builder scripts, e.g. in git hooks. This means that `builder_is_windows`
is not defined. This change replaces the call of that function with
a slightly modified version of the previous implementation.

Follow-up-of: #14324
Build-bot: skip
Test-bot: skip
2025-07-21 18:16:51 +02:00
Eberhard Beilharz
68031e7b78
maint(common): address code review comments 2025-07-21 17:33:08 +02:00
Eberhard Beilharz
67a7c69324
refactor(common): use test framework for zip tests
This makes of the testing framework added in #14345 and also renames
the tests to better separate the parts of the test name.

Build-bot: skip
Test-bot: skip
2025-07-21 16:50:49 +02:00
Eberhard Beilharz
1ed4af1f7f
test(common): add unit test for reporting test failures
I added a unit test as part of #14345 but then forgot to commit it.

Follow-up-of: #14345
Build-bot: skip
Test-bot: skip
2025-07-21 16:44:07 +02:00
Eberhard Beilharz
4a2cf53fbc
maint(windows): replace use of wzzip with add_zip_files
This makes use of the new functionality refactored in the previous
commit by replacing the use of the `wzzip` function with `add_zip_files`.

Test-bot: skip
2025-07-21 10:26:31 +02:00
Eberhard Beilharz
501c666d7d
maint(windows): consider GO_FAST env variable
This changes makes use of the logic that used to be in `win/zip.inc.sh`:
if the environment variable `GO_FAST` is set to 1, we use a low
compression level, resulting in faster builds. If it is set to 0 we
use maximum compression, resulting in slower builds. If `GO_FAST` is
not set we don't specify the compression level and rely on the defaults.

Test-bot: skip
2025-07-21 10:26:30 +02:00
Eberhard Beilharz
51ca604b47
chore(common): Merge remote-tracking branch 'origin/master' into maint/common/14109_isOsFuncs 2025-07-21 09:20:12 +02:00
Eberhard Beilharz
dc83c013e5
Merge pull request #14345 from keymanapp/maint/resources/testframework 2025-07-21 09:17:37 +02:00
Eberhard Beilharz
a53b5a4ab3
maint(common): address code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-07-21 09:11:58 +02:00
Eberhard Beilharz
ff275c6196
Merge pull request #14355 from keymanapp/maint/common/12526_c++17
Note that the ICU subprojects still explicitly specify C++17 since they are maintained outside of Keyman and so shouldn't be tied to the Keyman compiler version requirement.

Fixes: #12526
2025-07-21 08:36:36 +02:00
Eberhard Beilharz
fe62983cb4
Merge pull request #14352 from keymanapp/maint/common/dierelative
`7z` and `zip` behave differently if adding files that are not in the current directory. For files with relative paths, zip will add them relative to the current directory which is not what we want and can cause problems for the user. Therefore this change disallows files that are not in the current directory and aborts the build.
2025-07-21 08:35:54 +02:00
Eberhard Beilharz
aceb74c4aa
maint(resources): address code review comments
- return number of failed tests from `run_tests`
- add unit test for `run_tests`
- some cleanup
2025-07-18 20:23:33 +02:00
Eberhard Beilharz
faa521d82c
maint(common): set C++17 in standard.meson.build
Note that the ICU subprojects still explicitly specify C++17 since they
are maintained outside of Keyman and so shouldn't be tied to the Keyman
compiler version requirement.

Fixes: #12526
Test-bot: skip
2025-07-18 14:04:11 +02:00
Eberhard Beilharz
235b3c526e
refactor(resources): remove shellcheck warnings 2025-07-17 17:03:46 +02:00
Eberhard Beilharz
33f77656de
Merge pull request #14333 from keymanapp/maint/common/zipfunc
This change adds support for the `-xr!wildcard` parameter to the `add_zip_files` function, e.g. `-xr!build.sh` will exclude all `build.sh` files from the archive. This is an alternative to adding a file list.

Also add unit tests for `zip.inc.sh`.
2025-07-15 09:37:33 +02:00
Eberhard Beilharz
39bff3e504
maint(common): fail build if adding relative file to zip
`7z` and `zip` behave differently if adding files that are not in the
current directory. For files with relative paths, zip will add them
relative to the current directory which is not what we want and can
cause problems for the user. Therefore this change disallows files that
are not in the current directory and aborts the build.
2025-07-14 15:21:10 +02:00
Eberhard Beilharz
a1452d6ab8
maint(common): add simple unit testing framework for bash
Build-bot: skip
Test-bot: skip
2025-07-14 14:43:40 +02:00
Eberhard Beilharz
9be6128377
maint(resources): clarify description
Addresses code review comment.
2025-07-14 11:12:49 +02:00