Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Android build tests #2569

Closed
wants to merge 2 commits into from
Closed
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
18 changes: 15 additions & 3 deletions .github/workflows/android-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -40,6 +39,15 @@ jobs:
- name: Set ANDROID_NDK
run: echo "ANDROID_NDK=$ANDROID_HOME/ndk-bundle" >> $GITHUB_ENV

- name: Disk Cleanup
run: |
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
sudo rm -rf ~/.cache

- name: Prune Docker system
run: docker system prune -f --volumes

- name: Install root node dependencies
run: yarn

Expand Down Expand Up @@ -90,13 +98,17 @@ jobs:
# Build Android app in specified directories using matrix
- name: Build Android app
working-directory: ${{ matrix.directory }}/android
run: ./gradlew assembleDebug
run: ./gradlew assembleDebug --daemon --build-cache --parallel --max-workers=2

# Cache apk for both directories
- name: Cache apk
uses: actions/cache/save@v3
uses: actions/cache@v3
env:
cache-name: cache-apk
with:
path: ${{ matrix.directory }}/android/app/build/outputs/apk/debug/app-debug.apk
key: apk-${{ github.sha }}

# Clean up after the build to free up space
- name: Clean up build directories
run: rm -rf ${{ matrix.directory }}/android/app/build
Loading