Refactored Earthfile to improve caching

Targets have been parallelized so that initial push of the container cache should build the whole build a little quicker, plus the container should now use the cache for more of the build and so speed up normal builds to just the compilation and test of the code that has changed

The `build_cache` target now builds a `build-cache:latest` container that is stored in the GitLab project Container Registry, and then used (if it exists) by the `test_build` target.  The `build_cache` task runs under 3 conditions, 1. the container does not exist, 2. if scheduled, 3. if run manually from the Pipelines page in the GitLab interface.

It is recommended that the build is set up to run on a weekly schedule via the `Pipeline schedules` page in GitLab with the schedule of `0 2 * * 6`.
This commit is contained in:
Δ ǀ Ξ ȼ
2023-10-31 11:17:13 +00:00
parent ff56634667
commit d38f3cb42f
9 changed files with 153 additions and 79 deletions

View File

@@ -11,6 +11,7 @@ edition = "2021"
[lib]
# staticlib for iOS tests, cydlib for android tests, rlib for everything else
crate-type = ["cdylib", "staticlib", "rlib"]
path = "src/lib.rs"
[features]
default = ["rt-tokio"]