docs: readme added gifs to be resized #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright (c) 2026 @Natfii. All rights reserved. | |
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| RUST_BACKTRACE: 1 | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| rust-lint-test: | |
| name: Rust Lint & Test | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: zeroclaw-android | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| zeroclaw-android/target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('zeroclaw-android/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - name: Clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: Rustfmt | |
| run: cargo fmt --check | |
| - name: Test | |
| run: cargo test --quiet | |
| - name: Cargo Deny | |
| uses: EmbarkStudios/cargo-deny-action@v2 | |
| with: | |
| manifest-path: zeroclaw-android/Cargo.toml | |
| kotlin-lint: | |
| name: Kotlin Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Cache Gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts', 'gradle/libs.versions.toml') }} | |
| restore-keys: ${{ runner.os }}-gradle- | |
| - name: Spotless Check | |
| run: ./gradlew spotlessCheck | |
| - name: Detekt | |
| run: ./gradlew detekt | |
| kotlin-test: | |
| name: Kotlin Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-linux-android, x86_64-linux-android | |
| - name: Install cargo-ndk | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-ndk | |
| - uses: android-actions/setup-android@v3 | |
| - name: Install NDK | |
| run: sdkmanager "ndk;27.0.12077973" | |
| - name: Cache Gradle & Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| zeroclaw-android/target | |
| key: ${{ runner.os }}-kotlin-test-${{ hashFiles('zeroclaw-android/Cargo.lock', '**/*.gradle.kts') }} | |
| restore-keys: ${{ runner.os }}-kotlin-test- | |
| - name: Unit Tests | |
| run: ./gradlew testDebugUnitTest | |
| release-apk: | |
| name: Release APK | |
| needs: [rust-lint-test, kotlin-lint, kotlin-test] | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-linux-android, x86_64-linux-android | |
| - name: Install cargo-ndk | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-ndk | |
| - uses: android-actions/setup-android@v3 | |
| - name: Install NDK | |
| run: sdkmanager "ndk;27.0.12077973" | |
| - name: Cache Gradle & Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| zeroclaw-android/target | |
| key: ${{ runner.os }}-release-${{ hashFiles('zeroclaw-android/Cargo.lock', '**/*.gradle.kts') }} | |
| restore-keys: ${{ runner.os }}-release- | |
| - name: Decode keystore | |
| if: env.RELEASE_KEYSTORE_BASE64 != '' | |
| env: | |
| RELEASE_KEYSTORE_BASE64: ${{ secrets.RELEASE_KEYSTORE_BASE64 }} | |
| run: echo "$RELEASE_KEYSTORE_BASE64" | base64 -d > ${{ github.workspace }}/release.keystore | |
| - name: Build release APK | |
| env: | |
| ZEROAI_RELEASE_STORE_FILE: ${{ github.workspace }}/release.keystore | |
| ZEROAI_RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }} | |
| ZeroAI_StorePassword: ${{ secrets.RELEASE_STORE_PASSWORD }} | |
| ZeroAI_KeyPassword: ${{ secrets.RELEASE_KEY_PASSWORD }} | |
| run: ./gradlew assembleRelease | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: zeroai-release-${{ github.ref_name }} | |
| path: app/build/outputs/apk/release/*.apk | |
| if-no-files-found: error | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: app/build/outputs/apk/release/*.apk | |
| generate_release_notes: true |