Skip to content

Your phone, on your command. Gotcha is world's first fully on-device AI copilot for Android that turns natural language into real device actions — safely.

ci: run on self-hosted BeyondMax runner (0 minutes)

Rishabh Bajpai106dcc3ef46a
diff --git a/.github/workflows/chanakya.yml b/.github/workflows/chanakya.yml.disabled
similarity index 100%
rename from .github/workflows/chanakya.yml
rename to .github/workflows/chanakya.yml.disabled
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a9a1aae..1a4bf8d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,12 +1,15 @@
name: CI
-# CI is DISABLED by default to conserve GitHub Actions budget. The automatic
-# triggers (push / pull_request / schedule) are intentionally removed; the
-# nightly full-matrix job no longer runs. The workflow can still be triggered
-# manually via Actions → Run workflow (opt-in, consumes budget), but prefer the
-# equivalent local commands in docs/RUNNING_TESTS.md.
+# CI runs on the self-hosted BeyondMax runner (no GitHub Actions minutes).
+# `build` runs automatically on PRs/pushes to main/development.
+# Instrumented jobs run only on manual workflow_dispatch to avoid
+# queue-blocking the single runner (one job at a time).
on:
+ pull_request:
+ branches: [main, development]
+ push:
+ branches: [main, development]
workflow_dispatch:
concurrency:
@@ -15,7 +18,7 @@ concurrency:
jobs:
build:
- runs-on: ubuntu-latest # TerminalToolTest shells out to POSIX `sh` — do not move to windows/macos
+ runs-on: [self-hosted, Linux, X64] # BeyondMax self-hosted — 0 minutes. TerminalToolTest shells out to POSIX `sh` — do not move to windows/macos
timeout-minutes: 30
# The coverage comment needs pull-requests: write. Without it the jacoco-report
# action fails with "Resource not accessible by integration" — and because that
@@ -97,16 +100,16 @@ jobs:
# GMD remains the local workflow. Device configs mirror the GMD definitions
# in app/build.gradle.kts.
instrumented-smoke:
- runs-on: ubuntu-latest
+ if: github.event_name == 'workflow_dispatch'
+ runs-on: [self-hosted, Linux, X64]
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- # The emulator needs ~7.4 GB free for the userdata partition alone, plus
- # the system image and AVD cache. Drop preinstalled toolchains we never
- # use (~15-25 GB). Do NOT delete /opt/hostedtoolcache wholesale — that's
- # where setup-java installs the JDK.
+ # GitHub-hosted only: BeyondMax already has KVM + free SDK images.
+ # Running the sudo rm -rf cleanup on self-hosted would damage the host.
- name: Free disk space
+ if: runner.environment == 'github-hosted'
run: |
df -h /
sudo rm -rf /usr/share/dotnet /usr/share/swift /opt/ghc \
@@ -116,6 +119,7 @@ jobs:
df -h /
- name: Enable KVM
+ if: runner.environment == 'github-hosted'
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
@@ -142,6 +146,7 @@ jobs:
~/.android/avd/*
~/.android/adb*
/usr/local/lib/android/sdk/system-images/*
+ ~/Android/Sdk/system-images/*
key: avd-34-aosp_atd-pixel_6
- name: Create AVD and generate snapshot for caching
@@ -185,7 +190,8 @@ jobs:
# The full matrix only runs on a manual workflow_dispatch now that the
# nightly schedule is removed.
instrumented-full:
- runs-on: ubuntu-latest
+ if: github.event_name == 'workflow_dispatch'
+ runs-on: [self-hosted, Linux, X64]
timeout-minutes: 60
strategy:
fail-fast: false
@@ -214,7 +220,9 @@ jobs:
- uses: actions/checkout@v4
# See the note on the same step in instrumented-smoke.
+ # GitHub-hosted only — never run the sudo rm -rf cleanup on self-hosted.
- name: Free disk space
+ if: runner.environment == 'github-hosted'
run: |
df -h /
sudo rm -rf /usr/share/dotnet /usr/share/swift /opt/ghc \
@@ -224,6 +232,7 @@ jobs:
df -h /
- name: Enable KVM
+ if: runner.environment == 'github-hosted'
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
@@ -247,6 +256,7 @@ jobs:
~/.android/avd/*
~/.android/adb*
/usr/local/lib/android/sdk/system-images/*
+ ~/Android/Sdk/system-images/*
key: avd-${{ matrix.api-level }}-${{ matrix.target }}-${{ matrix.profile }}
- name: Create AVD and generate snapshot for caching
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index dcf629a..a5407c7 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -29,7 +29,7 @@ concurrency:
jobs:
release:
- runs-on: ubuntu-latest
+ runs-on: [self-hosted, Linux, X64]
timeout-minutes: 30
env:
# What the release asset is called on GitHub - i.e. the filename a user ends
@@ -235,8 +235,9 @@ jobs:
EXPECTED_CERT_SHA256: ${{ vars.RELEASE_CERT_SHA256 }}
run: |
APK=app/build/outputs/apk/release/app-release.apk
- APKSIGNER=$(ls "$ANDROID_HOME"/build-tools/*/apksigner | sort -V | tail -n1)
- AAPT2=$(ls "$ANDROID_HOME"/build-tools/*/aapt2 | sort -V | tail -n1)
+ SDK_ROOT="${ANDROID_HOME:-$HOME/Android/Sdk}"
+ APKSIGNER=$(ls "$SDK_ROOT"/build-tools/*/apksigner | sort -V | tail -n1)
+ AAPT2=$(ls "$SDK_ROOT"/build-tools/*/aapt2 | sort -V | tail -n1)
if [ -z "$EXPECTED_CERT_SHA256" ]; then
echo "::error::RELEASE_CERT_SHA256 repo variable is not set. Get it with: apksigner verify --print-certs <apk>"