diff --git a/.github/workflows/build-and-release-apks.yml b/.github/workflows/build-and-release-apks.yml new file mode 100644 index 000000000..a4c12ed15 --- /dev/null +++ b/.github/workflows/build-and-release-apks.yml @@ -0,0 +1,67 @@ +name: Build and Release APKs + +on: + release: + types: [published] + workflow_dispatch: + +jobs: + build-and-upload: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Setup Bazel + uses: bazel-contrib/setup-bazel@0.8.5 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }} + repository-cache: true + + - name: Build AndroidX Test m2repository + run: | + bazel build :axt_m2repository + + - name: Extract APKs from m2repository + run: | + unzip -o bazel-bin/axt_m2repository.zip -d extracted/ + + - name: Create output directory + run: mkdir -p apk-outputs + + - name: Copy APKs to output directory + run: | + # Copy test services APK + cp extracted/repository/androidx/test/services/test-services/1.7.0-alpha01/test-services-1.7.0-alpha01.apk apk-outputs/android-test-services.apk + + # Copy orchestrator APK + cp extracted/repository/androidx/test/orchestrator/1.7.0-alpha01/orchestrator-1.7.0-alpha01.apk apk-outputs/android-test-orchestrator.apk + + ls -la apk-outputs/ + + - name: Upload APKs to Release + if: github.event_name == 'release' + uses: softprops/action-gh-release@v2 + with: + files: | + apk-outputs/android-test-orchestrator.apk + apk-outputs/android-test-services.apk + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + + - name: Upload APKs as Artifacts (for workflow_dispatch) + if: github.event_name == 'workflow_dispatch' + uses: actions/upload-artifact@v4 + with: + name: android-test-apks + path: | + apk-outputs/android-test-orchestrator.apk + apk-outputs/android-test-services.apk diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 000000000..c708d3f61 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,26 @@ +# Claude Code Project Configuration + +This is a Bazel-based Android testing framework project. + +## Build System +- **Primary Build Tool**: Bazel (using `bazelisk` command) +- **Language**: Java/Kotlin for Android +- **Project Type**: Android library/testing framework + +## Key Commands +- **Build all**: `bazel build :axt_m2repository` +- **Build specific targets**: `bazel build //path/to/target` +- **Run tests**: `bazel test //path/to/test:target` + +## Project Structure +- Uses Bazel BUILD files throughout the project +- Main repository build creates m2repository with all artifacts +- APKs are generated through the maven repository build process + +## Important Build Targets +- `:axt_m2repository` - Builds the complete maven repository with all artifacts +- `//services:test_services` - Android Test Services APK +- `//runner/android_test_orchestrator/stubapp:stubapp` - Test Orchestrator APK + +## Installation Script +- `build_and_install.sh` - Builds and installs orchestrator and services APKs locally \ No newline at end of file