OXYGENHUB
# 03f2c0361594 +7 oxygenhub-android / .flow / pipeline.kdl
1.8 KiB · last changed CI: loopback networking, which Gradle needs to start (refs #19) 12 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/cceb10ea42f539bed31c4bbe16e4f49961533f80a2397ca4981afb483a066d0a"
14
    memory-limit "8GiB"
15
    cpu-limit 4
16
    // Loopback only, still offline: Gradle will not start without a
17
    // usable interface for its file-lock listener.
18
    network "loopback"
19
    // Gradle reads dependencies from the image's read-only cache and
20
    // writes its own state under /tmp.
21
    env {
22
        ANDROID_HOME "/opt/android-sdk"
23
        JAVA_HOME "/usr/lib/jvm/java-17-openjdk-amd64"
24
        GRADLE_RO_DEP_CACHE "/opt/gradle-home/caches"
25
        GRADLE_USER_HOME "/tmp/gradle"
26
        CARGO_INCREMENTAL "0"
27
    }
28
}
29
30
job "test" {
31
    sandbox "android"
32
    timeout "60m"
33
    // rust-core (with oxy-core and the runner) for two ABIs is most of the
34
    // build: kept from the last passing run, so only what changed builds.
35
    mount {
36
        source "ephemeral://disk"
37
        target "/src/rust-core/target"
38
        size "20GiB"
39
        cache "rust-core-target"
40
        key "rust-core/Cargo.lock"
41
    }
42
    exec "bash" "scripts/ci.sh"
43
    output {
44
        artifact "junit" {
45
            path "/src/junit.xml"
46
            when "always"
47
        }
48
        artifact "coverage" {
49
            path "/src/coverage.xml"
50
            when "always"
51
        }
52
    }
53
}