Get SAIR running in your CI pipeline in under 15 minutes.
SAIR has three components: the Orchestrator (hosted by us), the Proxy and DeviceSource (run on your infrastructure). DeviceSource runs on the machine with USB devices; the Proxy can run on the same host or elsewhere on your network. All CI runners share the same Proxy. Your CI pipeline calls sair-acquire to lock a device, runs tests with stock adb, and calls sair-release when done.
DeviceSource must run on the machine with USB-connected devices. The Proxy can run on the same host or any reachable machine on your network. DeviceSource discovers devices and pushes them to the Proxy, which coordinates locks with the Orchestrator. All your CI runners share the same Proxy.
# Install SAIR tools
curl -fsSL https://raw.githubusercontent.com/compscidr/sair/main/install.sh | bash
# Start a dedicated ADB server on a non-default port
adb kill-server
adb -P 5038 start-server
# Start the Proxy and DeviceSource
export SAIR_API_KEY="your-api-key"
sair-proxy &
sair-device-source
The sair-acquire and sair-release tools are installed globally via the install script. Add this step to your CI workflow.
curl -fsSL https://raw.githubusercontent.com/compscidr/sair/main/install.sh | bash
Add device acquisition around your existing test step. Your connectedCheck command stays exactly the same.
# .github/workflows/test.yml
steps:
# ... your build steps ...
- name: Install SAIR tools
run: curl -fsSL https://raw.githubusercontent.com/compscidr/sair/main/install.sh | bash
- name: Acquire device lock
run: sair-acquire | sed 's/^export //' >> $GITHUB_ENV
- name: Run instrumented tests
run: ./gradlew connectedCheck
- name: Release device lock
if: always() && env.SAIR_LOCK_ID != ''
run: sair-release
| Variable | Description | Default |
|---|---|---|
| SAIR_API_KEY | Your API key for authentication | dev-key-123 |
| SAIR_PROXY_URL | ADB Proxy HTTP API endpoint | http://localhost:8550 |
After a successful acquisition, these environment variables are set:
| Variable | Description |
|---|---|
| SAIR_LOCK_ID | Lock identifier (used by sair-release) |
| SAIR_SERIALS | Comma-separated list of acquired device serials |
| ANDROID_ADB_SERVER_PORT | Scoped ADB port (stock adb reads this automatically) |
| ANDROID_SERIAL | First serial (only set when a single device is acquired) |