Skip to content

Commit

Permalink
[nrf noup] add workflow for building Android release packages
Browse files Browse the repository at this point in the history
Add a manually triggered workflow for building Android
CHIPTool release packages for all the supported platforms:
arm, arm64 and x64.
  • Loading branch information
Damian-Nordic committed Jul 26, 2021
1 parent 762a204 commit 8c06cbb
Showing 1 changed file with 89 additions and 0 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/release_android.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Release Android packages

on:
workflow_dispatch:
inputs:
releaseTag:
description: Release Tag
required: true

jobs:
android:
name: Build Android
timeout-minutes: 60

runs-on: ubuntu-latest

env:
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64/

container:
image: connectedhomeip/chip-build-android:latest
volumes:
- "/tmp/log_output:/tmp/test_logs"
- "/tmp/output_binaries:/tmp/output_binaries"

steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: "${{ github.event.inputs.releaseTag }}"
submodules: true
- name: Bootstrap
timeout-minutes: 10
run: scripts/build/gn_bootstrap.sh
- name: Build arm CHIPTool
timeout-minutes: 10
env:
BUILD_TYPE: android_arm
TARGET_CPU: arm
run: |
./scripts/examples/android_app.sh
yes | "$ANDROID_HOME"/tools/bin/sdkmanager --licenses
cd src/android/CHIPTool
./gradlew build
cp app/build/outputs/apk/release/app-release-unsigned.apk /tmp/output_binaries/chiptool-arm.apk
- name: Build arm64 CHIPTool
timeout-minutes: 10
env:
BUILD_TYPE: android_arm64
TARGET_CPU: arm64
run: |
./scripts/examples/android_app.sh
yes | "$ANDROID_HOME"/tools/bin/sdkmanager --licenses
cd src/android/CHIPTool
./gradlew build
cp app/build/outputs/apk/release/app-release-unsigned.apk /tmp/output_binaries/chiptool-arm64.apk
- name: Build x64 CHIPTool
timeout-minutes: 10
env:
BUILD_TYPE: android_x64
TARGET_CPU: x64
run: |
./scripts/examples/android_app.sh
yes | "$ANDROID_HOME"/tools/bin/sdkmanager --licenses
cd src/android/CHIPTool
./gradlew build
cp app/build/outputs/apk/release/app-release-unsigned.apk /tmp/output_binaries/chiptool-x64.apk
- name: Publish packages
uses: softprops/action-gh-release@v1
with:
files: /tmp/output_binaries/chiptool-*.apk
fail_on_unmatched_files: true
tag_name: "${{ github.event.inputs.releaseTag }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 8c06cbb

Please sign in to comment.