Skip to main content

Introducing CI/CD for AOSP based projects

· 3 min read
CI/CD
CI/CD
HexDroid

We're thrilled to announce the launch of dedicated CI/CD features in HexDroid, specifically designed to tackle the unique complexities of building AOSP-based projects!

Building AOSP often involves managing multiple repositories, complex build configurations, and device-specific variations. Traditional CI/CD systems can struggle with these demands, often requiring extensive scripting and maintenance. HexDroid CI/CD simplifies this entire process with native support for AOSP workflows.

Our new aosp step provides a powerful, declarative approach to automate your AOSP builds, tests, and releases, reducing boilerplate and improving the reliability of your pipelines.

Key Features​

Declarative aosp Step​

At the heart of our AOSP support is the aosp step. Configure your entire AOSP build process: from syncing sources and setting up the build environment (lunch) to executing build commands and even publishing OTA releases.
All within a single, easy-to-understand YAML structure. No complex scripting required!

  • Simplified Configuration: Define manifest URLs, revisions, lunch targets, build variants, and commands declaratively.
  • Automatic Build Expansion: Specify multiple build_variant or release_config values, and HexDroid automatically creates build executions for each combination.
  • Integrated OTA Releases: Define and distribute OTA updates directly within the aosp step using HexDroid Update Management.
# Example: Simple aosp step
steps:
- aosp:
manifest:
url: https://android.googlesource.com/platform/manifest
revision: main
lunch:
product_name: aosp_cf_x86_64_phone
build_variant:
- userdebug
- eng
build:
commands:
- m installclean
- m dist
# Optional: Define OTA release directly here
release:
# ... release configuration ...

AOSP Optimized Agents​

HexDroid provides specialized build agents pre-configured with optimal hardware specifications for AOSP builds.

While our optimized agents provide the best out-of-box experience, you can also run builds on your own infrastructure using self-hosted agents.

This flexibility allows you to:

  • Utilize existing build infrastructure
  • Meet specific security or compliance requirements
  • Customize hardware configurations
  • Access private networks or resources

Setting up self-hosted agents is straightforward with our agent installation package.

Multi-Repository Handling​

AOSP development often involves changes across multiple Git repositories. HexDroid CI/CD is built to handle this. When validating pull requests impacting multiple projects, you can use a temporary manifest branch pointing to your feature branches. HexDroid automatically uses this manifest, ensuring your cross-repository changes are built and tested together before merging.

Build Environment Control​

While the aosp step manages the standard and process by default, you can opt out and use your own custom build scripts if needed.

Triggers​

Automate your pipelines based on various events:

  • Pull Requests: Trigger builds automatically when PRs are opened or updated. Developers can also manually trigger builds by commenting on the PR: [CI CHECK]
  • Cron Scheduling: Set up nightly or periodic builds for continuous integration and testing using standard cron syntax.
  • Push Events: Trigger pipelines on pushes to specific branches or repositories.

Get Started​

Dive into our documentation to set up your first AOSP CI/CD pipeline: