diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index efa56caa..8142d870 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -207,11 +207,44 @@ jobs: event-type: client-sdk-android-push client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' + diffuse_prep: + name: Diffuse prep (base AAR cache) + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + outputs: + base_aar_cache_hit: ${{ steps.diffuse_base_lookup.outputs.cache-hit }} + steps: + - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + id: diffuse_base_lookup + with: + path: client-sdk-android/diffuse-source-file + key: diffuse-${{ github.event.pull_request.base.sha }} + lookup-only: true + + - uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 + if: steps.diffuse_base_lookup.outputs.cache-hit != 'true' && github.event.pull_request.head.repo.full_name == github.repository + id: find_comment_cache_miss + with: + issue-number: ${{ github.event.pull_request.number }} + body-includes: Diffuse output + + - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 + if: steps.diffuse_base_lookup.outputs.cache-hit != 'true' && github.event.pull_request.head.repo.full_name == github.repository + with: + body: | + Diffuse output: + + Base AAR cache miss. Please run the build job on main to generate the base AAR. + edit-mode: replace + comment-id: ${{ steps.find_comment_cache_miss.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + token: ${{ secrets.GITHUB_TOKEN }} + diffuse: runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} + if: ${{ github.event_name == 'pull_request' && needs.diffuse_prep.outputs.base_aar_cache_hit == 'true' }} name: Diffuse checker - needs: build + needs: [build, diffuse_prep] steps: - uses: actions/setup-java@v4 with: diff --git a/gradle.properties b/gradle.properties index a7886f1e..dd614d7d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -62,3 +62,8 @@ RELEASE_SIGNING_ENABLED=true livekitUrl= livekitApiKey= livekitApiSecret= + +org.gradle.configuration-cache=true +kotlin.incremental=true +org.gradle.configureondemand=true +org.gradle.daemon=true