OXYGENHUB
# 4c0d52760d2f oxygenhub-android / .flow / pipeline.kdl
1.7 KiB · last changed Pin the Android image 6605d6c0: Firebase's messaging library in its Gradle cache, for the alerts (refs #16) 9 days ago source blame history raw
1
// The OxygenHub Android app's pipeline (OxygenFlow, #19). Every push runs
2
// the unit tests with coverage and a debug build in OxygenFlow's Android
3
// image, with no network: the JDK, the Android SDK and NDK, Gradle,
4
// cargo-ndk, rust-core's crates and the app's Gradle dependencies are all
5
// in the image (oxygenflow/images/android). Rebuild and re-pin it when the
6
// app's SDK, Gradle or dependency versions change, or rust-core's
7
// Cargo.lock does. Locally, ./gradlew :app:createDebugUnitTestCoverageReport
8
// runs the same tests.
9
schema-version 1
10
11
sandbox "android" {
12
    runtime "microvm"
13
    rootfs "cas://blob/6605d6c0b87e32667bb0b19ec473e76e7139a9f1cfa6cb36a03e773eee5af06c"
14
    memory-limit "8GiB"
15
    cpu-limit 4
16
    network "isolated"
17
    // Gradle reads dependencies from the image's read-only cache and
18
    // writes its own state under /tmp.
19
    env {
20
        ANDROID_HOME "/opt/android-sdk"
21
        JAVA_HOME "/usr/lib/jvm/java-17-openjdk-amd64"
22
        GRADLE_RO_DEP_CACHE "/opt/gradle-home/caches"
23
        GRADLE_USER_HOME "/tmp/gradle"
24
        CARGO_INCREMENTAL "0"
25
    }
26
}
27
28
job "test" {
29
    sandbox "android"
30
    timeout "60m"
31
    // rust-core (with oxy-core and the runner) for two ABIs is most of the
32
    // build: kept from the last passing run, so only what changed builds.
33
    mount {
34
        source "ephemeral://disk"
35
        target "/src/rust-core/target"
36
        size "20GiB"
37
        cache "rust-core-target"
38
        key "rust-core/Cargo.lock"
39
    }
40
    exec "bash" "scripts/ci.sh"
41
    output {
42
        artifact "junit" {
43
            path "/src/junit.xml"
44
            when "always"
45
        }
46
        artifact "coverage" {
47
            path "/src/coverage.xml"
48
            when "always"
49
        }
50
    }
51
}