Merge pull request #4 from tryptz/claude/oneplus15-feature-issues-hjetjb #16
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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - uses: gradle/actions/setup-gradle@v4 | |
| - name: Run ktlint | |
| run: ./gradlew ktlintCheck || true | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| # Must match ndkVersion / externalNativeBuild.cmake.version in | |
| # app/build.gradle.kts, otherwise AGP fails to resolve the NDK. | |
| - name: Install NDK and CMake | |
| run: echo y | sdkmanager "ndk;29.0.14206865" "cmake;3.22.1" | |
| - name: Clone native dependencies | |
| run: | | |
| cd app/src/main/jni | |
| git clone --depth 1 https://github.com/ggml-org/llama.cpp.git llama_cpp | |
| git clone --depth 1 https://github.com/bellard/quickjs.git quickjs | |
| - uses: gradle/actions/setup-gradle@v4 | |
| - name: Build debug APK | |
| run: ./gradlew assembleDebug | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-debug | |
| path: app/build/outputs/apk/debug/app-debug.apk | |
| test: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - uses: gradle/actions/setup-gradle@v4 | |
| - name: Run unit tests | |
| run: ./gradlew test |