Add a host check for build.bat and run the architecture tests
that match the host. for the meson builds from build.h
for now just skip the arm64 tests.
Meson 1.1 changed the name of the options file from `meson_options.txt`
to `meson.options`. Currently we're stuck with Meson 1.0 as minimum
Meson version because we still support Ubuntu 22.04 Jammy, but on some
machines a newer version of meson gets installed which causes the
options to be ignored.
The first attempt to simply symlink or copy `meson_options.txt` to
`meson.options` failed because git on Windows doesn't support symlinks
by default, and Meson complains if it finds two options files (#15127).
Fortunately not having an options file is only a problem for Core where
we have one option in the options file that defaults to true. The solution
implemented in this change is to always pass the option to Meson.
Test-bot: skip
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
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
By default we add the `--werror` option to meson builds. This might cause
problems when compiling with a different compiler, so this option adds
the `--no-werror` option to our build scripts. This enables integrators
to compile with other compiler versions.
Fixes: #13970
Test-bot: skip
Use a shared function standard_meson_build to prep the
resources/meson.build folder for consistency. A future cleanup would be
to use meson-utils.inc.sh for all meson build scripts.
* Adds `VERSION_WITH_TAG` variable to standard.meson.build
* Consistently uses `file('VERSION.md')` to retrieve version number
Note that VERSION_WITH_TAG is not yet used but should be used for
version tagged files later.
Note: there is a bit of potential confusion about the difference between
/resources/builder.inc.sh (the full implementation for builder scripts),
and /resources/build/builder.inc.sh (the source script that builder
scripts should always use).
This allows us to make assumptions that will always be true for builder
scripts that may not be true for other scripts, such as setting base
folder.
Fixes#11324.
* Always `cd "$THIS_SCRIPT_PATH"`
* Remove unnecessary `cd` from all build.sh
* Remove unnecessary `set -eu` from all build.sh (and `# set -x`)
* Replace old build-utils.sh incantation in a few build.sh scripts
Now allows any of the following. Quote marks are significant for
multiple tests with `-t`:
```bash
core/build.sh test:wasm --no-deps -- state-api debug-api
core/build.sh test:wasm --no-deps -- "state-api debug-api"
core/build.sh test:wasm --no-deps -t "state-api debug-api"
core/build.sh test:wasm --no-deps --test "state-api debug-api"
```
The `-t` / `--test` option takes a single string parameter which is
passed on to `meson test`, whereas the `--` "end of parameters" marker
allows arbitrary remaining parameters to be passed on to `meson test`.
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
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!)
This updates our meson min version on Windows to 1.0, which means that
we can avoid having Visual Studio on the path, as meson can find it
anyway. With this change, we can eliminate the batch-wrapper for the
build, significantly improving build performance and simplifying the
scripts.
This also adds a change to disable tests for dependency builds of core,
along with the `--no-tests` command line option for doing builds without
tests.
Minor cleanup includes eliminating various warnings from meson.build
files, and standardizing WASM cross-platform build options for Windows.