Android daily build and publish docs #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android daily build and publish docs | |
on: | |
schedule: | |
# 05:00 AM (KST) Mon-Fri | |
- cron: "00 20 * * 0-4" | |
# Allow manually triggering the workflow | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: build | |
id: android-build | |
uses: ./.github/actions/android-build | |
- name: get date | |
if: always() | |
id: get-date | |
run: | | |
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
- name: Release daily build result | |
if: steps.android-build.outputs.result == 'success' | |
uses: ./.github/actions/s3_upload | |
with: | |
source: ${{ github.workspace }}/android_lib/ | |
dest: android/ | |
s3_id: ${{ secrets.AWS_S3_ACCESS_KEY_ID }} | |
s3_key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }} | |
s3_option: --recursive | |
- name: Generate badge | |
run: | | |
pip install pybadges setuptools | |
mkdir -p ~/daily_build | |
if [ '${{ steps.android-build.outputs.result }}' == 'success' ]; then | |
python3 -m pybadges --left-text=test --right-text=success --right-color=green > ~/daily_build/android_build_result.svg | |
else | |
python3 -m pybadges --left-text=test --right-text=failure --right-color=red > ~/daily_build/android_build_result.svg | |
fi | |
- name: update daily result badge | |
uses: ./.github/actions/gitpush | |
with: | |
source: ~/daily_build/android_build_result.svg | |
dest: testresult | |
message: "Update android daily build result." | |
taos_account: ${{ secrets.TAOS_ACCOUNT }} | |
taos_account_token: ${{ secrets.TAOS_ACCOUNT_TOKEN }} | |
- name: Generate javadoc | |
if: steps.android-build.outputs.result == 'success' | |
run: | | |
echo "Generate javadoc, ${{ github.workspace }}" | |
mkdir -p ~/javadoc_dir | |
sed -i "s|@BUILD_ANDROID@|//|" ${{ github.workspace }}/java/android/nnstreamer/src/main/java/org/nnsuite/nnstreamer/*.java | |
javadoc -d ~/javadoc_dir -public -splitindex -Xdoclint:none --ignore-source-errors java/android/nnstreamer/src/main/java/org/nnsuite/nnstreamer/* | |
- name: Publish javatoc to release.nnstreamer.com | |
if: steps.android-build.outputs.result == 'success' | |
uses: ./.github/actions/s3_upload | |
with: | |
source: ~/javadoc_dir/ | |
dest: java_html/ | |
s3_id: ${{ secrets.AWS_S3_ACCESS_KEY_ID }} | |
s3_key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }} | |
s3_option: --recursive |