openharmony-build

Automate OpenHarmony builds from source with log verification and error analysis.

14|8|Updated Oct 29, 2024
One-click install
npx skills add https://github.com/openharmony/arkui_ace_engine --skill openharmony-build
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openharmony-build
Source: https://github.com/openharmony/arkui_ace_engine/tree/main/.claude/skills/openharmony-build
Command: npx skills add https://github.com/openharmony/arkui_ace_engine --skill openharmony-build

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill reduces the time and complexity of building the OpenHarmony codebase by orchestrating root discovery, build execution, and post-build analysis, ensuring consistent results.

Core Features & Use Cases

  • Full build orchestration: navigates to the OpenHarmony root, runs the standard build command, and uses caching for faster iterations.
  • Target flexibility: supports building the complete system or specific targets like ace_engine, ace_engine_test, unittest, and ohos-sdk.
  • Diagnostics and guidance: analyzes logs with dedicated scripts and directs users to the primary logs in out/<product>/build.log.

Quick Start

Navigate to the OpenHarmony root and trigger a full build with caching: ./build.sh --export-para PYCACHE_ENABLE:true --product-name rk3568 --ccache After completion, verify via out/rk3568/build.log and run: .claude/skills/openharmony-build/scripts/analyze_build_error.sh rk3568

Frequently Asked Questions about openharmony-build

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate OpenHarmony builds from source end-to-end?

Automate OpenHarmony builds by orchestrating root discovery via the .gn marker, executing standard build commands with caching, and verifying results through out/{product}/build.log.

Can I build specific targets like ace_engine or ohos-sdk instead of the full OpenHarmony system?

Yes, you can build specific OpenHarmony targets including ace_engine, ace_engine_test, unittest, and ohos-sdk, or execute a full system build depending on your development needs.

What's the best way to analyze OpenHarmony build failures and errors?

Analyze OpenHarmony build failures by running the dedicated analyze_build_error.sh script against the primary log located at out/{product}/build.log to extract and diagnose errors.

Does OpenHarmony build automation support fast-rebuild options for quicker iterations?

Yes, fast-rebuild options are supported for OpenHarmony builds, and you can enable PYCACHE_ENABLE and ccache during build execution to significantly speed up iterative compilation.

Why do I need the .gn marker file to run an OpenHarmony build?

The .gn marker file is required to accurately locate the OpenHarmony root directory, ensuring that the build execution and environment setup operate within the correct source code structure.

Where can I find the primary build logs after compiling OpenHarmony?

The primary OpenHarmony build logs are enforced at out/{product}/build.log, such as out/rk3568/build.log, which you should verify and use for post-build failure analysis.