Skip to content

perf(gdrive): optimize trip log exports with columnar JSON #1723

perf(gdrive): optimize trip log exports with columnar JSON

perf(gdrive): optimize trip log exports with columnar JSON #1723

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches: [ "main", "master", "feat/*", "fix/*" ]
tags: [ "v*" ]
pull_request:
branches: [ "main", "master", "feat/*", "fix/*" ]
jobs:
build:
runs-on: ubuntu-latest
env:
HAS_SECRETS: ${{ secrets.SIGNING_KEYSTORE != '' }}
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- name: Decode Firebase API Key (Production)
if: env.HAS_SECRETS == 'true'
run: echo "${{ secrets.GOOGLE_SERVICE_FILE }}" | base64 -di > "app/google-services.json"
- name: Create Dummy Firebase File (For Fork PRs)
if: env.HAS_SECRETS == 'false'
run: |
echo '{"project_info":{"project_number":"0","project_id":"dummy"},"client":[{"client_info":{"mobilesdk_app_id":"1:0:android:0","android_client_info":{"package_name":"'$(grep "applicationId" app/build.gradle | awk '{print $2}' | tr -d '"' | tr -d "'")'"}},"api_key":[{"current_key":"dummy"}]}]}' > "app/google-services.json"
- name: Decode keystore
if: env.HAS_SECRETS == 'true'
run: |
mkdir -p "${{ runner.temp }}/keystore"
echo "${{ secrets.SIGNING_KEYSTORE }}" | base64 -di > "${{ runner.temp }}/keystore/release_keystore.jks"
- name: Run Check
env:
ANDROID_RELEASE_KEYSTORE: "${{ runner.temp }}/keystore/release_keystore.jks"
ANDROID_RELEASE_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
ANDROID_RELEASE_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
ANDROID_RELEASE_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
run: |
if [ "${{ env.HAS_SECRETS }}" == "true" ]; then
sh ./gradlew check
else
sh ./gradlew lintDebug testDebugUnitTest
fi
- name: Android Integration Tests
uses: reactivecircus/android-emulator-runner@v2
if: ${{ false }}
env:
ANDROID_RELEASE_KEYSTORE: "${{ runner.temp }}/keystore/release_keystore.jks"
ANDROID_RELEASE_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
ANDROID_RELEASE_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
ANDROID_RELEASE_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
with:
api-level: 29
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: |
if [ "${{ env.HAS_SECRETS }}" == "true" ]; then
sh ./gradlew connectedGiuliaDebugAndroidTest
else
sh ./gradlew connectedDebugAndroidTest
fi
- name: Build Flavours
if: env.HAS_SECRETS == 'true'
env:
ANDROID_RELEASE_KEYSTORE: "${{ runner.temp }}/keystore/release_keystore.jks"
ANDROID_RELEASE_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
ANDROID_RELEASE_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
ANDROID_RELEASE_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
run: |
sh ./gradlew app:bundleGiulia app:bundleGiuliaAA
sh ./gradlew app:assembleGiulia app:assembleGiuliaAA
- name: Create Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') && env.HAS_SECRETS == 'true'
with:
files: app/build/outputs/apk/**/release/*.apk
name: Release ${{ github.ref_name }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}