LibLocale was split off from LibUnicode a couple years ago to reduce the
number of applications on SerenityOS that depend on CLDR data. Now that
we use ICU, both LibUnicode and LibLocale are actually linking in this
data. And since vcpkg gives us static libraries, both libraries are over
30MB in size.
This patch reverts the separation and merges LibLocale into LibUnicode
again. We now have just one library that includes the ICU data.
Further, this will let LibUnicode share the locale cache that previously
would only exist in LibLocale.
Most users will be building with Xcode Clang on macOS anyway, as our
build scripts default to the system compiler if it's new enough. We
already have an upstream Clang-based workflow on Linux, so we won't lose
any compiler coverage by switching to Apple Clang on macOS.
This should help us avoid build breakages like #186.
This changes the Sanitizer configs to build all the vcpkg dependencies
with our specified CFLAGS and CXXFLAGS for ASAN and UBSAN.
Unfortunately, we can't yet enable actually compiling them with
sanitizers enabled, because this causes test failures that need to be
investigated.
Unlike in Serenity, let's just run this job once per PR rather than on
every job. This lets us install fewer dependencies on the build-and-test
pipelines.
Turns out vcpkg does not yet support Universal binaries. While they are
working on it, lets produce arm64 binaries only for now to unblock the
pipeline.
Rather than removing LibLocale entirely, we will use it as a wrapper
around ICU (which has some C-like interfaces, and uses UTF-16 for its
string types). Using ICU will provide better web compatibility overall,
and will let us implement features we were previously unable to (e.g.
Intl.Collator requires data that is not in the JSON export of the CLDR).
And hook it into ladybird.sh for convenience. The script will set up
PATH and other environment variables automatically.
On CI, vcpkg is theoretically already installed on Linux machines, but
not with the right environment variables, and not on macOS. So this also
makes CI use this script to bootstrap vcpkg.
We're now getting errors on CI due to gcc-13 being missing. We can
probably be smarter about what packages we install, depending on the
workflow being run. But let's first unblock CI.
The error we get is a bit strange and inconsistent. Some CI runners seem
to already have gcc-13 installed. Others don't and can't find the gcc-13
package without the test Ubuntu toolchain PPA.
Now both /bin/zcat and /bin/gunzip are symlinks to /bin/gzip, and we
essentially running it in decompression mode through these symlinks.
This ensures we don't maintain 2 versions of code to decompress Gzipped
data anymore, and handle the use case of gzipped-streaming input only
once in the codebase.
Static analysis is great, but these workflows have not worked in a long
time, and no one was looking at the results. Our PVS Studio license and
our Sonar Cloud token have expired. Remove the workflows (at least for
now) so we don't waste CI runners and cache space. If someone is
motivated to revive these, they can revert this commit.
On the macOS 14 runners on GitHub actions, attempting to play audio (by
way of AudioOutputUnitStart) will open a pop-up asking for microphone
permission. This prevents any calling test to hang until they error out
with MACH_SEND_TIMED_OUT. This works around the issue by explicitly
enabling microphone access to all applications.
Just calling it "cmake" doesn't really describe what it is for, and a
future commit will add a lagom.yml. So let's call this serenity.yml to
make it clear that it tests SerenityOS itself.
This also renames the workflow, and updates some matrix orderings, to be
easier to distinguish between this job and the upcoming lagom.yml,