Commit graph

414 commits

Author SHA1 Message Date
Marc Durdin
57087e4cca
Merge pull request #8587 from keymanapp/fix/common/7310-npm-publish-needs-to-hardcode-dep-versions
fix(common): consolidate npm publishing
2023-04-13 18:08:30 +10:00
Marc Durdin
10a59f789d fix(common): support npm pack and consolidate npm publishing
Fixes #8586.

All npm publish actions in the repository are now run as part of the
Developer release build, hosted at present by kmc, until we setup a
higher-level build script to do it.

Adds a 'pack' action which mirrors 'publish' for all npm packages.

Removes unnecessary dev dependencies of models-templates and
models-wordbreakers from kmc-model.

Web Release build CI step has been updated to check for presence of
.build-builder.
2023-04-12 11:55:31 +07:00
Marc Durdin
8f48c59bdb fix(common): set dependency versions when publishing npm packages
Fixes #7310.
2023-04-12 10:59:16 +07:00
jahorton
ccbc1b3b51 fix(ios): fixes xcode-triggered debug, run builds by defining missing env var 2023-04-11 09:05:50 +07:00
Marc Durdin
27ce5a6f83
Merge pull request #8567 from keymanapp/docs/8542-build-utils-dependency-clarification
docs: clarify dependency meanings in build-utils
2023-04-10 14:16:56 +10:00
Darcy Wong
d2cacd58f3
Merge pull request #8543 from keymanapp/chore/android/java-11
chore(android): Update projects to use Java 11
2023-04-10 09:20:02 +07:00
Marc Durdin
95b7cb62b4 docs: clarify dependency meanings in build-utils
Relates to #8542.
2023-04-10 08:57:48 +07:00
Darcy Wong
c7e65409a3 fix(android): Move set_java_home to build-utils 2023-03-31 13:07:35 +07:00
Marc Durdin
2a871c8165 chore(developer): publish all required npm modules 2023-03-27 11:36:21 +07:00
Marc Durdin
062b947363 chore: Merge branch 'feature-kmcompx' into chore/merge-master-into-feature-kmcompx-a17s9 2023-03-23 10:08:59 +07:00
Marc Durdin
549a8e009e chore(common): define BUILDER_CONFIGURATION env var 2023-03-23 09:21:55 +07:00
Marc Durdin
48bc338f26 chore: Merge branch 'feature-kmcompx' into chore/kmcompx-master-merge-a17s9 2023-03-21 13:51:25 +07:00
Marc Durdin
7cd6b00946 chore(common): prevent multiple npm ci runs in child scripts
Fixes #8471.

Ensures that `npm take-forever` (aka `npm ci`, `npm install`) only runs
once during a parent/child build script run.

Note that this also works even where build scripts manually call other
build scripts (e.g. input-processor as it is currently calling kmc
build manually) -- though this is not a recommended practice.
2023-03-21 11:08:22 +07:00
Marc Durdin
d1c8061b5f chore: Merge branch 'feature-kmcompx' into chore/merge-master-into-kmcompx 2023-03-16 12:29:17 +07:00
Marc Durdin
5eee05f16f chore(common): add common test build configurations 2023-03-14 12:40:42 +07:00
Marc Durdin
534bd2a54b
Merge pull request #8416 from keymanapp/chore/common/build-script-performance
chore(common): build script performance improvements
2023-03-14 15:41:32 +11:00
Marc Durdin
3302abaf73 chore(common): use builder_trim instead of trim, _builder_trim 2023-03-13 09:53:43 +07:00
Marc Durdin
350808bd5d chore(common): fixup tests and various typo tweaks
When running tests, discovered a number of typos in builder.inc.sh.

Also fixup pathing for builder include for all scripts under resources/
to ensure that we can maximize performance.
2023-03-13 09:43:09 +07:00
Marc Durdin
eb344c235f chore(linux): fixup build-utils ref in gha workflow 2023-03-13 08:43:50 +07:00
Marc Durdin
f41922d749 docs: build-utils standard environment 2023-03-13 08:30:38 +07:00
Marc Durdin
92ed99c4d6 chore(common): build script performance improvements
Improves build script performance by:
* using built-ins wherever possible (e.g. string splitting)
* eliminating redundant code
* using absolute (to $KEYMAN_ROOT) rather than relative paths to avoid realpath
* removing unnecessary `npm run` calls

BEFORE                         | AFTER
-------------------------------|----------------------
time ./core/build.sh --help    |
real    0m2.116s               | real    0m0.874s
user    0m0.578s               | user    0m0.198s
sys     0m0.984s               | sys     0m0.289s
-------------------------------|----------------------
time ./web/build.sh --help     |
real    0m3.523s               | real    0m0.757s
user    0m1.166s               | user    0m0.320s
sys     0m2.273s               | sys     0m0.455s
-------------------------------|----------------------
time ./web/build.sh -d         |
real    1m34.750s              | real    0m59.974s
user    0m9.721s               | user    0m6.284s
sys     0m19.652s              | sys     0m13.202s

@keymanapp-test-bot skip
2023-03-13 07:18:09 +07:00
Darcy Wong
45c4e6aca9
Merge pull request #8386 from keymanapp/refactor/common/build-help
refactor(common): Make build-help into helper functions
2023-03-10 14:41:10 +07:00
Darcy Wong
3ef331a87e refactor(common): Update to build_help_html params 2023-03-10 12:49:37 +07:00
Darcy Wong
413e77e2ae fix(common): Start adjusting parameters 2023-03-10 10:07:47 +07:00
Darcy Wong
247dab8fc3
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-03-10 09:40:28 +07:00
Marc Durdin
660e98a430 feat(common): support single target for a dependency
Fixes #8397.
2023-03-09 14:54:27 +07:00
Marc Durdin
ef80f0f6b5 chore(developer): shared meson config for kmcmplib 2023-03-09 12:14:15 +07:00
Marc Durdin
691dc8e618 chore(core): split flags into standard.meson.build 2023-03-09 11:34:54 +07:00
Darcy Wong
6c2126431f refactor(common): Make build-help into helper functions 2023-03-08 11:42:13 +07:00
Darcy Wong
099900ea51 feat(common): builder.inc.sh inheritable options
Appending a `+` to a builder option will automatically pass that option to child scripts.

Applying #8371 to master branch and @darcywong00 will then re-apply to #7407
2023-03-08 10:33:35 +07:00
Marc Durdin
00017350d3 chore(common): clean up --debug usage in build scripts
Fixes #8373.

Note that the core functionality requested in #8373 is already in place;
this commit just does some cleanup to make this easier to maintain in
the future:

* Uses `builder_is_debug_build` function to test for debug build
  (instead of `builder_has_option --debug`, which would also work but
  using the other function avoids typo issues with the option name).

* Renames `$_builder_debug` to `$_builder_debug_internal` to reduce
  naming confusion

* Documents `$builder_debug`, `builder_is_debug_build`, and clarifies
  usage of `--debug` option.

* Logs command line for dep builds (we could hide this in the future,
  but it certainly doesn't hurt for now!)
2023-03-08 05:40:40 +07:00
Marc Durdin
334c316fd3
Merge pull request #8357 from keymanapp/chore/common/remove-vswhere
chore(common): remove vswhere
2023-03-07 19:02:38 +11:00
Marc Durdin
a02d48047c
Merge pull request #8344 from keymanapp/chore/common/cleanup-builder-echo
chore(common): cleanup build.inc.sh echo
2023-03-07 19:02:29 +11:00
Marc Durdin
f1985ad7a5
chore: address review comments 2023-03-07 09:54:22 +11:00
Marc Durdin
af4b2536bc chore(common): remove vswhere
With #8287, we no longer use a local copy of vswhere.exe but instead
rely on a standard location for it from the Visual Studio installer.
2023-03-03 04:50:25 +07:00
Marc Durdin
b543b3f341
Update resources/build/npm-publish.inc.sh
Co-authored-by: Darcy Wong <darcy_wong@sil.org>
2023-03-02 16:43:24 +11:00
Marc Durdin
ddc447c7e7 fix(common): fixup npm publish 2023-03-02 12:33:18 +07:00
Marc Durdin
3c3dcd8c93 chore(common): update builder docs for builder_describe_internal_dependency 2023-03-01 14:02:42 +07:00
Marc Durdin
269265c1f3 chore(common): update builder docs for builder_describe_internal_dependency 2023-03-01 14:00:11 +07:00
Marc Durdin
572bd74783 fix(common): builder: skip dependency build for clean action
We should not attempt to build dependencies when running `clean`. Note:
if your `clean` action requires dependencies, then something is very,
very wrong and you should fix that!
2023-03-01 08:26:30 +07:00
Marc Durdin
b809a60936
Merge pull request #7054 from keymanapp/feature-ldml
epic: LDML keyboard support 🙀
2023-02-28 20:38:00 +11:00
Marc Durdin
e6ea381aba chore(common): fix child build error handling
Fixes #8322.

This issue was arising due to subshells masking the exit code.

set -e is not really to be trusted.
2023-02-27 15:09:42 +07:00
Marc Durdin
38603e8421
Merge pull request #8279 from keymanapp/chore/core/cleanup-meson-build
chore(core): cleanup meson build
2023-02-23 13:28:02 +11:00
Marc Durdin
e71d8d3d6d chore: fail to builder_die 2023-02-23 09:13:14 +07:00
Marc Durdin
9eb472579c chore: Merge branch 'feature-ldml' into chore/merge-master-to-feature-ldml-A17S7-2 2023-02-23 08:05:31 +07:00
Marc Durdin
b968bcfdfd
Merge branch 'feature-ldml' into chore/core/cleanup-meson-build 2023-02-23 08:49:56 +11:00
Marc Durdin
ce864ea923 chore: update standard script prolog to use builtin instead of dirname 2023-02-22 11:04:15 +07:00
Marc Durdin
b0804dd2a4 chore: use builtin instead of dirname for perf 2023-02-22 10:59:11 +07:00
Marc Durdin
463c7ff907 chore: remove greadlink from standard script prolog 2023-02-22 10:43:06 +07:00
Marc Durdin
3005a82a8f chore: update docs and non-standard readlink refs 2023-02-22 10:41:54 +07:00