Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Android CI

on:
push:
branches: [ "AddyVeerendra-patch-1" ]
pull_request:
branches: [ "AddyVeerendra-patch-1" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 18
uses: actions/setup-java@v4
with:
java-version: '18'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Capture environment info
run: |
mkdir -p artifacts/env
java -version 2> artifacts/env/java-version.txt
./gradlew -v > artifacts/env/gradle-version.txt
uname -a > artifacts/env/uname.txt
env | sort > artifacts/env/environment.txt

- name: Build with Gradle
run: |
mkdir -p artifacts/logs
./gradlew build --info --stacktrace 2>&1 | tee artifacts/logs/gradle-build.log

- name: Collect Gradle reports
run: |
mkdir -p artifacts/reports
if [ -d build/reports ]; then
cp -r build/reports artifacts/reports/
fi
if [ -d build/test-results ]; then
cp -r build/test-results artifacts/reports/
fi

- name: Upload build artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: android-build-${{ github.run_id }}-${{ github.sha }}
path: artifacts/
retention-days: 10

- name: Download a Build Artifact
uses: actions/[email protected]
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
# lint/reports/

# artifacts folder
artifacts/
1 change: 1 addition & 0 deletions artifacts/ARTIFACTS.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://docs.github.com/en/actions/concepts/workflows-and-actions/workflow-artifacts