This makes the `forUnitTests` artifacts include a .dll for
Windows (JNA's win32-x86-64) to go with the .so for Linux (JNA's
linux-x86-64) and macOS (JNA's darwin).
This uses the MingW 64-bit toolchain (i.e., the Rust target
x86_64-pc-windows-gnu) for libs/ and therefore requires it for
producing the DLL for unit testing against as well. That's
unfortunate because local developers are probably happier building
against MSVC; but it's hard to ship libs/ for _static_ use against
MSVC out of our (Linux Docker-based) automation.
After installing MingW 64 on my Windows laptop, this works fine locally.
This does a bunch of things:
- cross compiles OpenSSL and SQLcipher from host Linux to target macOS
- enables running the `testDebug` targets for the library projects
-- this runs the existing tests for logins against a real SQLcipher DB \o/
The `.a` files are not yet packaged for consumption by local builders;
that'll come next.
There are a number of changes here. The most obvious is that we run a
decision task and build a taskgraph for PRs now. But internally, many
things are ready to generalize to non-FxA Rust Client projects. The
NDK and Rust toolchains are built into a Docker image (with a very
verbose name!) that is shared with Mentat. It's nice! The standalone
toolchains are installed in that image. The image sets:
ANDROID_NDK_HOME=/build/android-ndk
ANDROID_NDK_API_VERSION=26
ANDROID_NDK_TOOLCHAIN_DIR=/build/android-ndk-toolchain
In $ANDROID_NDK_TOOLCHAIN_DIR the toolchains are named like
$ARCH-$ANDROID_NDK_API_VERSION; this allows to cache multiple versions
of the toolchain (if needed). So we have, say
/build/android-ndk-toolchain/arm-26
/build/android-ndk-toolchain/arm64-26
/build/android-ndk-toolchain/x86-26
This configuration is what the `rust-android-gradle` plugin expects.
That plugin will be used for the Android Logins API in this repository.
The Dockerfile is in the Mentat repository right now, but I expect it
to migrate to application-services (or even android-components)
eventually.