Skip to content

AxionAOSP/AxionOS_Builders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AxionOS Build System 🚀

Python License Platform

A high-performance CI/CD pipeline for building AxionOS and other Android ROMs. This system bridges GitHub Actions with a Telegram bot interface, allowing for remote-controlled build management, surgical artifact detection, and real-time monitoring.


📂 Repository Structure

🏗️ builder/

Contains the core build logic executed on the self-hosted runner.

  • build.sh / sync.sh: Core AOSP sync and compilation scripts. Now includes a robust blocking loop to ensure the ROM ZIP is ready before finalizing.
  • tmux_runner.sh: Orchestrates the build within a persistent tmux session. Uses pipe-pane for high-performance, real-time log streaming with zero CPU overhead.
  • reporter.py: Background monitoring tool. Uses surgical log parsing (Package Complete:) to identify artifacts with 100% accuracy.
  • quota_manager.py: Enforces daily build limits and updates user data via the GitHub API.
  • utils/telegram.py: Shared utility for Telegram API interactions.

🤖 telegram-bot/

The control center for the entire system.

  • main.py: Entry point for the Telegram bot. Now includes structured logging with a clean terminal interface.
  • handlers/: Modularized command logic.
    • github.py: Build triggers, automatic manifest discovery, and queue management.
    • admin.py: User management, chat authorization, channel redirection, and broadcast tools.
  • utils.py: Helper functions for bot operations and Redis interactions.

🚀 Key Features

  • Smart Manifest Discovery: Just run /build <codename>. The bot automatically pulls the manifest from the AxionAOSP/device_manifests repository.
  • Zero-Overhead Monitoring: Real-time progress bars and log summaries streamed via high-performance I/O.
  • Channel Redirection: Redirect build notifications and artifact reports to a dedicated Telegram channel.
  • Surgical Artifact Detection: Extracts the exact output path from build logs to ensure the correct files are uploaded every time.
  • Broadcast System: Owner-only /announce command to communicate with all maintainers across all approved groups and channels.
  • Dynamic Authorization: Easily approve or disapprove groups by ID or directly within the chat.

🤖 Bot Commands

👤 User Commands

Command Description
/build <device> [url] Start a new build (Auto-finds manifest or uses optional URL).
/status [device] Show real-time ROM build progress.
/queue View the current GitHub Actions workflow queue.
/history View the last 5 build attempts.
/health Monitor server disk, RAM, and runner status.
/quota Check remaining daily build limits.
/listuser List all authorized maintainers.
/guide View detailed build options and manifest templates.

🛡️ Admin Commands

Command Description
/approvechat [ID] Authorize a group for bot usage.
/disapprovechat [ID] Remove a group from the authorized list.
/listchats View all authorized groups and the current output channel.
/adduser <user> [role] Whitelist a new maintainer (Admin/User).
/removeuser <ID> Remove a user from the database.
/setrole <role> <user> Update a user's permissions and limits.
/setchannel <ID> Redirect all build notifications to a specific channel.
/save Force a manual sync of the Redis state to the GitHub DB.
/cancel <RunID> Cancel an active GitHub workflow run.

👑 Owner Commands

Command Description
/announce <msg> Broadcast an official announcement to all groups and the main channel.
/sync Force a manual sync of the GitHub DB to the Redis cache.
/addquota <user> <lim> Set a custom daily build limit for a specific user.

📸 Preview

Build Setup Menu

The /build command triggers an interactive menu to customize your build:

  • Type: Toggle build type (user, userdebug, eng).
  • GMS: Choose variant (Core, Pico, Vanilla).
  • Clean: Toggle mka clean before building.
  • Target: Dynamically redirects to your main channel if configured.

Artifact Delivery

Once a build is complete, you get a premium delivery card:

  • 💿 DOWNLOAD ROM ZIP: Primary artifact link.
  • 📥 IMAGE ARTIFACTS: Boot, Recovery, and Vendor images grouped for a clean UI.
  • 📄 OTA JSON: Direct link to the generated release metadata.

🖥️ Monitoring & Debugging

Live Logs

The bot saves structured logs to telegram-bot/bot.log while maintaining a clean, human-readable terminal output. Monitor them in real-time:

tail -f telegram-bot/bot.log

Persistent Console

Monitor the raw build environment from the server:

TMUX= tmux attach -t axion_build

About

AxionOS Build CI using GitHub Actions and Telegram API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors