OXYGENHUB
# 7045183e3d2c oxygenhub-android / .flow / pipeline.kdl
1.4 KiB · last changed Android: Initial Jetpack Compose scaffold 1 month ago source blame history raw
1
schema-version 1
2
3
// The OxygenFlow Android build image: Java, Android SDK, and Rust toolchain
4
// for building the JNI/uniffi core. Needs to be built and pinned in oxygenflow/images.
5
sandbox "android" {
6
    runtime "microvm"
7
    rootfs "cas://blob/0000000000000000000000000000000000000000000000000000000000000000" // TODO: Replace with actual Android image hash
8
    memory-limit "8GiB"
9
    cpu-limit 4
10
    network "isolated"
11
    env {
12
        GRADLE_USER_HOME "/src/.gradle"
13
        ANDROID_HOME "/opt/android-sdk"
14
    }
15
}
16
17
sandbox "android-small" {
18
    runtime "microvm"
19
    rootfs "cas://blob/0000000000000000000000000000000000000000000000000000000000000000" // TODO: Replace with actual Android image hash
20
    memory-limit "2GiB"
21
    cpu-limit 1
22
    network "isolated"
23
}
24
25
job "lint" {
26
    sandbox "android-small"
27
    exec "sh" "-c" "echo '=== 🧹 Running ktlint ===' && ./gradlew ktlintCheck"
28
}
29
30
job "build" {
31
    sandbox "android"
32
    depends-on "lint"
33
    mount {
34
        source "ephemeral://disk"
35
        target "/src/app/build"
36
        size "24GiB"
37
    }
38
    exec "sh" "-c" "echo '=== 🧱 Building Debug APK ===' && ./gradlew assembleDebug"
39
    
40
    output {
41
        artifact "app-debug" {
42
            path "/src/app/build/outputs/apk/debug/app-debug.apk"
43
        }
44
    }
45
}
46
47
job "functional-tests" {
48
    sandbox "android"
49
    depends-on "build"
50
    exec "sh" "-c" "echo '=== 🧪 Running Unit & UI Tests ===' && ./gradlew testDebugUnitTest"
51
}