Skip to content

AndroidX Biometric #170

AndroidX Biometric

AndroidX Biometric #170

name: AndroidX Biometric
on:
schedule:
# Every Sunday at 9.00am
- cron: "0 9 * * 0"
workflow_dispatch:
env:
DEVELOCITY_URL: "https://ge.solutions-team.gradle.com"
GIT_REPO: "https://github.com/androidx/androidx"
TASKS: "buildOnServer zipTestConfigsWithApks test"
PROJECT_DIR: "playground-projects/biometric-playground"
ARGS: "-x lint -Dorg.gradle.dependency.verification=off"
jobs:
Experiment:
strategy:
fail-fast: false
matrix:
include:
- experimentId: 1
- experimentId: 2
- experimentId: 3
runs-on: ubuntu-latest
steps:
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: "8"
distribution: "temurin"
- name: Set tools jar path
run: |
echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV
echo "JAVA_TOOLS_JAR=$JAVA_HOME/lib/tools.jar" >> $GITHUB_ENV
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "temurin"
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Download latest version of the validation scripts
uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/download@actions-stable
with:
token: ${{ secrets.GITHUB_TOKEN }}
# MergeResources and DataBindingGenBaseClassesTask are not cache relocatable when resourceDirsOutsideRootProjectDir is not empty
# https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:build-system/gradle-core/src/main/java/com/android/build/gradle/tasks/MergeResources.kt;l=164?q=MergeResources
# This is the case here as androidx/biometric project has its root dir set to androidx/playground-projects/biometric-playground
- name: Adjust git hook to temporarily disable caching for MergeResources and DataBindingGenBaseClassesTask on biometric:integration-tests
run: |
mkdir ~/git-hooks
echo -e 'echo "\nproject.getTasks().withType(com.android.build.gradle.tasks.MergeResources).configureEach { outputs.doNotCacheIf(\"MergeResources is not cache relocatable when resourceDirsOutsideRootProjectDir is not empty\") { true } }" >> biometric/integration-tests/testapp/build.gradle\n' > ~/git-hooks/post-checkout
echo -e 'echo "\nproject.getTasks().withType(com.android.build.gradle.internal.tasks.databinding.DataBindingGenBaseClassesTask).configureEach { outputs.doNotCacheIf(\"DataBindingGenBaseClassesTask is not cache relocatable when resourceDirsOutsideRootProjectDir is not empty\") { true } }" >> biometric/integration-tests/testapp/build.gradle\n' >> ~/git-hooks/post-checkout
chmod +x ~/git-hooks/post-checkout
git config --global core.hooksPath ~/git-hooks
if: matrix.experimentId == 3
- name: Run experiment 1
uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-1@actions-stable
env:
DEVELOCITY_ACCESS_KEY: "${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}"
with:
gitRepo: ${{ env.GIT_REPO }}
tasks: ${{ env.TASKS }}
args: ${{ env.ARGS }}
projectDir: ${{ env.PROJECT_DIR }}
develocityUrl: ${{ env.DEVELOCITY_URL }}
if: matrix.experimentId == 1
- name: Run experiment 2
uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-2@actions-stable
env:
DEVELOCITY_ACCESS_KEY: "${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}"
with:
gitRepo: ${{ env.GIT_REPO }}
tasks: ${{ env.TASKS }}
args: ${{ env.ARGS }}
projectDir: ${{ env.PROJECT_DIR }}
develocityUrl: ${{ env.DEVELOCITY_URL }}
failIfNotFullyCacheable: false
if: matrix.experimentId == 2
- name: Run experiment 3
uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable
env:
DEVELOCITY_ACCESS_KEY: "${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}"
with:
gitRepo: ${{ env.GIT_REPO }}
tasks: ${{ env.TASKS }}
args: ${{ env.ARGS }}
projectDir: ${{ env.PROJECT_DIR }}
develocityUrl: ${{ env.DEVELOCITY_URL }}
failIfNotFullyCacheable: false
if: matrix.experimentId == 3