diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 927cfff..9c1bf93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,7 @@ on: env: CARGO_TERM_COLOR: always + ANDROID_NDK_VERSION: "27.0.12077973" jobs: check: @@ -46,3 +47,28 @@ jobs: run: cargo run --locked -- --demo --json - name: Run fixture CLI run: cargo run --locked -- --mock tests/fixtures/me.json + + android-lib-check: + name: Android library check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Linux GUI dependencies + run: | + sudo apt-get update + sudo apt-get install -y libfontconfig1-dev libxkbcommon-dev + - uses: android-actions/setup-android@v3 + - name: Install Android SDK packages + run: | + sdkmanager \ + "platforms;android-35" \ + "ndk;${ANDROID_NDK_VERSION}" + echo "ANDROID_NDK_HOME=${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}" >> "$GITHUB_ENV" + echo "ANDROID_NDK_ROOT=${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}" >> "$GITHUB_ENV" + echo "CC_aarch64_linux_android=${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android35-clang" >> "$GITHUB_ENV" + echo "AR_aarch64_linux_android=${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" >> "$GITHUB_ENV" + echo "CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android35-clang" >> "$GITHUB_ENV" + - name: Install Rust Android target + run: rustup target add aarch64-linux-android + - name: Check Android-gated library + run: cargo check --locked --features android-gui --target aarch64-linux-android --lib diff --git a/README.md b/README.md index 05419c1..acca391 100644 --- a/README.md +++ b/README.md @@ -378,6 +378,43 @@ See [ROADMAP.md](ROADMAP.md) for the current improvement backlog. - Linux (x86_64, aarch64) - Android/Termux — see [docs/termux.md](docs/termux.md); native Slint Android spike is tracked in [docs/android.md](docs/android.md) +## Optional Jujutsu Workflow + +`jj` is reasonable here only as an optional local workflow on top of the +existing Git repository. It can improve local iteration with operation log, +conflict recovery, and cleaner in-progress history, but it should not replace +the project's canonical GitHub flow. + +Recommended stance: + +- Use `jj` only if a developer or agent already prefers it locally. +- Keep GitHub Issues, branches, PRs, and remote state managed through `git` + + `gh`. +- Do not require `jj` in CI, build scripts, onboarding, or AGENTS workflow. +- Do not add `vcs-jj` or `vcs-core` unless a future automation issue proves + they solve a concrete project problem. + +Minimal issue workflow with `jj`: + +```bash +jj git clone https://github.com/xodapi/vimit.git +cd vimit +gh issue view 138 +git checkout -b issue-138-evaluate-optional-jujutsu-workflow +jj bookmark create issue-138-evaluate-optional-jujutsu-workflow -r @ + +# edit files, then verify the required check +cargo fmt --check + +# when ready, sync the current jj commit to the Git branch and push normally +jj git push --bookmark issue-138-evaluate-optional-jujutsu-workflow +gh pr create --base main --title "docs(dev): evaluate optional Jujutsu workflow" --body "Closes #138" +``` + +If you use `jj`, treat it as a personal productivity layer. The repository +still expects Git-compatible branch names, standard commits, and the same issue +assignment / PR review flow documented in `AGENTS.md`. + ## Tests ```bash diff --git a/README.ru.md b/README.ru.md index 3caa2ec..d345836 100644 --- a/README.ru.md +++ b/README.ru.md @@ -368,6 +368,43 @@ https://github.com/xodapi/vimit/discussions - Linux (x86_64, aarch64) - Android/Termux — см. [docs/termux.md](docs/termux.md); native Slint Android spike описан в [docs/android.md](docs/android.md) +## Optional Jujutsu Workflow + +`jj` здесь уместен только как optional локальный workflow поверх уже +существующего Git-репозитория. Он может сделать локальные итерации удобнее за +счёт operation log, более мягкого восстановления после конфликтов и аккуратной +истории промежуточных изменений, но не должен заменять canonical GitHub flow +проекта. + +Рекомендация по проекту: + +- Использовать `jj` только если разработчику или агенту он уже удобен локально. +- GitHub Issues, ветки, PR и remote state оставлять на `git` + `gh`. +- Не делать `jj` обязательным для CI, build scripts, onboarding или AGENTS workflow. +- Не добавлять `vcs-jj` или `vcs-core`, пока отдельный automation issue не + докажет, что это решает конкретную проблему проекта. + +Минимальный issue workflow с `jj`: + +```bash +jj git clone https://github.com/xodapi/vimit.git +cd vimit +gh issue view 138 +git checkout -b issue-138-evaluate-optional-jujutsu-workflow +jj bookmark create issue-138-evaluate-optional-jujutsu-workflow -r @ + +# правки, затем обязательная проверка +cargo fmt --check + +# когда всё готово, синхронизировать текущий jj commit с Git-веткой и пушить как обычно +jj git push --bookmark issue-138-evaluate-optional-jujutsu-workflow +gh pr create --base main --title "docs(dev): evaluate optional Jujutsu workflow" --body "Closes #138" +``` + +Если использовать `jj`, то только как личный слой удобства поверх Git. Для +репозитория по-прежнему обязательны Git-совместимые имена веток, обычные +коммиты и тот же issue/PR workflow, который описан в `AGENTS.md`. + ## Тесты ```bash diff --git a/docs/android.md b/docs/android.md index 12ba687..389fff4 100644 --- a/docs/android.md +++ b/docs/android.md @@ -90,6 +90,19 @@ work. This is intentionally not a GitHub Release. Release tags and production release assets stay under the existing release workflow. +## CI Android library check + +The main CI workflow installs the `aarch64-linux-android` Rust target and runs: + +```bash +cargo check --locked --features android-gui --target aarch64-linux-android --lib +``` + +This is a fast compile guard for Android-gated Rust code. It does not install +or run the APK, does not require API keys, and does not replace the manual APK +artifact/device test above. Use the `Android Test APK` workflow when a change +needs manifest, packaging, or real-device validation. + ## Agent burn alerts The Android build declares `INTERNET`, `VIBRATE`, and `POST_NOTIFICATIONS`.