@@ -47,6 +47,114 @@ jobs:
4747 - name : Protocol tests
4848 run : cargo test -p cake-core --test protocol
4949
50+ build-android :
51+ name : Build (Android aarch64)
52+ runs-on : ubuntu-latest
53+ permissions :
54+ contents : read
55+ env :
56+ ANDROID_NDK_VERSION : r27c
57+ steps :
58+ - uses : actions/checkout@v4
59+
60+ - name : Install Rust
61+ uses : dtolnay/rust-toolchain@stable
62+ with :
63+ targets : aarch64-linux-android
64+ components : clippy
65+
66+ - name : Set up Android NDK ${{ env.ANDROID_NDK_VERSION }}
67+ id : setup-ndk
68+ uses : nttld/setup-ndk@v1
69+ with :
70+ ndk-version : ${{ env.ANDROID_NDK_VERSION }}
71+ add-to-path : false
72+
73+ - name : Cache cargo registry & build
74+ uses : actions/cache@v4
75+ with :
76+ path : |
77+ ~/.cargo/registry
78+ ~/.cargo/git
79+ target
80+ key : android-cargo-${{ hashFiles('**/Cargo.lock') }}
81+ restore-keys : android-cargo-
82+
83+ - name : Cache cargo-ndk binary
84+ id : cache-cargo-ndk
85+ uses : actions/cache@v4
86+ with :
87+ path : ~/.cargo/bin/cargo-ndk
88+ key : cargo-ndk-bin-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
89+
90+ - name : Install cargo-ndk
91+ if : steps.cache-cargo-ndk.outputs.cache-hit != 'true'
92+ run : cargo install cargo-ndk --locked
93+
94+ - name : Build cake-mobile (Android aarch64)
95+ env :
96+ ANDROID_NDK_HOME : ${{ steps.setup-ndk.outputs.ndk-path }}
97+ run : cargo ndk -t aarch64-linux-android build -p cake-mobile
98+
99+ - name : Clippy (cake-core + cake-mobile, Android)
100+ env :
101+ ANDROID_NDK_HOME : ${{ steps.setup-ndk.outputs.ndk-path }}
102+ run : cargo ndk -t aarch64-linux-android clippy -p cake-core --lib --no-default-features --features "llama,qwen2,qwen3_5" -p cake-mobile -- -D warnings
103+
104+ - name : Compile tests (cake-core lib, Android)
105+ env :
106+ ANDROID_NDK_HOME : ${{ steps.setup-ndk.outputs.ndk-path }}
107+ run : cargo ndk -t aarch64-linux-android test -p cake-core --lib --no-default-features --features "llama,qwen2,qwen3_5,qwen3,qwen3_moe,qwen3_5_moe,phi4,mistral,gemma3,falcon3,olmo2,exaone4,flux,vibevoice,luxtts" --no-run
108+
109+ - name : Compile tests (cake-core unit, Android)
110+ env :
111+ ANDROID_NDK_HOME : ${{ steps.setup-ndk.outputs.ndk-path }}
112+ run : cargo ndk -t aarch64-linux-android test -p cake-core --test unit --no-default-features --features "llama,qwen2,qwen3_5,qwen3,qwen3_moe,qwen3_5_moe,phi4,mistral,gemma3,falcon3,olmo2,exaone4,flux,vibevoice,luxtts" --no-run
113+
114+ - name : Compile tests (cake-core protocol, Android)
115+ env :
116+ ANDROID_NDK_HOME : ${{ steps.setup-ndk.outputs.ndk-path }}
117+ run : cargo ndk -t aarch64-linux-android test -p cake-core --test protocol --no-default-features --features "llama,qwen2,qwen3_5,qwen3,qwen3_moe,qwen3_5_moe,phi4,mistral,gemma3,falcon3,olmo2,exaone4,flux,vibevoice,luxtts" --no-run
118+
119+ build-ios :
120+ name : Build (iOS arm64)
121+ runs-on : macos-latest
122+ permissions :
123+ contents : read
124+ steps :
125+ - uses : actions/checkout@v4
126+
127+ - name : Install Rust
128+ uses : dtolnay/rust-toolchain@stable
129+ with :
130+ targets : aarch64-apple-ios
131+ components : clippy
132+
133+ - name : Cache cargo registry & build
134+ uses : actions/cache@v4
135+ with :
136+ path : |
137+ ~/.cargo/registry
138+ ~/.cargo/git
139+ target
140+ key : ios-cargo-${{ hashFiles('**/Cargo.lock') }}
141+ restore-keys : ios-cargo-
142+
143+ - name : Build cake-mobile (iOS arm64)
144+ run : cargo build --target=aarch64-apple-ios -p cake-mobile --features metal
145+
146+ - name : Clippy (cake-core + cake-mobile, iOS)
147+ run : cargo clippy --target=aarch64-apple-ios -p cake-core --lib --no-default-features --features "llama,qwen2,qwen3_5,metal" -p cake-mobile --features metal -- -D warnings
148+
149+ - name : Compile tests (cake-core lib, iOS)
150+ run : cargo test --target=aarch64-apple-ios -p cake-core --lib --no-default-features --features "llama,qwen2,qwen3_5,qwen3,qwen3_moe,qwen3_5_moe,phi4,mistral,gemma3,falcon3,olmo2,exaone4,flux,vibevoice,luxtts,metal" --no-run
151+
152+ - name : Compile tests (cake-core unit, iOS)
153+ run : cargo test --target=aarch64-apple-ios -p cake-core --test unit --no-default-features --features "llama,qwen2,qwen3_5,qwen3,qwen3_moe,qwen3_5_moe,phi4,mistral,gemma3,falcon3,olmo2,exaone4,flux,vibevoice,luxtts,metal" --no-run
154+
155+ - name : Compile tests (cake-core protocol, iOS)
156+ run : cargo test --target=aarch64-apple-ios -p cake-core --test protocol --no-default-features --features "llama,qwen2,qwen3_5,qwen3,qwen3_moe,qwen3_5_moe,phi4,mistral,gemma3,falcon3,olmo2,exaone4,flux,vibevoice,luxtts,metal" --no-run
157+
50158 clippy :
51159 name : Clippy
52160 runs-on : ubuntu-latest
0 commit comments