From eebb5da470064f82acc6ac4176498c88b365a7f4 Mon Sep 17 00:00:00 2001 From: davidliu Date: Thu, 12 Feb 2026 23:19:21 +0900 Subject: [PATCH 1/8] Dependency diff github action --- .github/workflows/dependency_diff.yml | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/dependency_diff.yml diff --git a/.github/workflows/dependency_diff.yml b/.github/workflows/dependency_diff.yml new file mode 100644 index 000000000..32d6db9cf --- /dev/null +++ b/.github/workflows/dependency_diff.yml @@ -0,0 +1,43 @@ +name: Generate dependency diff + +on: + pull_request: + +jobs: + generate-diff: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 23 + + - uses: gradle/actions/setup-gradle@v4 + + - id: dependency-diff + name: Generate dependency diff + uses: usefulness/dependency-tree-diff-action@v2 + with: + project: 'livekit-android-sdk' + + - uses: peter-evans/find-comment@v3 + id: find_comment + with: + issue-number: ${{ github.event.pull_request.number }} + body-includes: Dependency diff + + - uses: peter-evans/create-or-update-comment@v4 + if: ${{ steps.dependency-diff.outputs.text-diff != null || steps.find_comment.outputs.comment-id != null }} + with: + body: | + Dependency diff (customize your message here): + ```diff + ${{ steps.dependency-diff.outputs.text-diff }} + ``` + edit-mode: replace + comment-id: ${{ steps.find_comment.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + token: ${{ secrets.GITHUB_TOKEN }} From 0455b21b41f663f985566a781ec6aa69e357aebb Mon Sep 17 00:00:00 2001 From: davidliu Date: Thu, 12 Feb 2026 23:41:45 +0900 Subject: [PATCH 2/8] diffuse action --- .github/workflows/android.yml | 57 ++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 09a719c38..0ac8440a3 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -54,9 +54,50 @@ jobs: git fetch origin main --depth 1 ./gradlew spotlessCheck - - name: Build with Gradle + - name: Build and test with Gradle run: ./gradlew assembleRelease livekit-android-test:testRelease + # Diffuse checking for pull requests + - uses: actions/cache@v4 + if: github.event_name == 'pull_request' + name: Download base source file for diffuse + with: + path: diffuse-source-file + key: diffuse-${{ github.event.pull_request.base.sha }} + + - id: diffuse + uses: usefulness/diffuse-action@v1 + if: github.event_name == 'pull_request' + with: + old-file-path: diffuse-source-file + new-file-path: client-sdk-android/livekit-android-sdk/build/outputs/aar/livekit-android-sdk-release.aar + + # Consuming diffuse action output + + - uses: peter-evans/find-comment@v1 + id: find_comment + if: github.event_name == 'pull_request' + with: + issue-number: ${{ github.event.pull_request.number }} + body-includes: Diffuse output + + - uses: peter-evans/create-or-update-comment@v1 + if: ${{ steps.diffuse.outputs.diff-raw != null || steps.find_comment.outputs.comment-id != null }} + with: + body: | + Diffuse output: + + ${{ steps.diffuse.outputs.diff-gh-comment }} + edit-mode: replace + comment-id: ${{ steps.find_comment.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/upload-artifact@v6 + with: + name: diffuse-output + path: ${{ steps.diffuse.outputs.diff-file }} + # TODO: Figure out appropriate place to run this. Takes ~3 mins, so pretty slow. # # generates coverage-report.md and publishes as checkrun # - name: JaCoCo Code Coverage Report @@ -174,6 +215,20 @@ jobs: if: github.event_name == 'push' && contains(steps.version_name.outputs.version_name,'SNAPSHOT') run: ./gradlew publishReleasePublicationToMavenRepository + # Setting up diffuse artifacts + - name: Setup cache for base source file for diffuse + if: github.event_name == 'push' + uses: actions/cache@v4 + with: + path: diffuse-source-file + key: diffuse-${{ github.sha }} + + # Copy your build artifact under `diffuse-source-file` name which will be saved in cache + - name: Copy diffuse source file + run: cp ./livekit-android-sdk/build/outputs/aar/livekit-android-sdk-release.aar diffuse-source-file + if: github.event_name == 'push' + shell: bash + - name: Repository Dispatch if: github.event_name == 'push' uses: peter-evans/repository-dispatch@v2 From c44b24743492a076178c2cd02bc18bdc1b1f535c Mon Sep 17 00:00:00 2001 From: davidliu Date: Thu, 12 Feb 2026 23:51:15 +0900 Subject: [PATCH 3/8] add permissions to actions --- .github/workflows/android.yml | 4 ++++ .github/workflows/dependency_diff.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 0ac8440a3..9523bd346 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -16,6 +16,10 @@ on: - 'NOTICE' - '.gitignore' +permissions: + contents: read + pull-requests: write + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/dependency_diff.yml b/.github/workflows/dependency_diff.yml index 32d6db9cf..86c740afa 100644 --- a/.github/workflows/dependency_diff.yml +++ b/.github/workflows/dependency_diff.yml @@ -3,6 +3,10 @@ name: Generate dependency diff on: pull_request: +permissions: + contents: read + pull-requests: write + jobs: generate-diff: runs-on: ubuntu-latest From 7a495f27de99ae66f391d0cf0f69234989e68d1c Mon Sep 17 00:00:00 2001 From: davidliu Date: Thu, 12 Feb 2026 23:52:57 +0900 Subject: [PATCH 4/8] update comment action versions --- .github/workflows/android.yml | 4 ++-- .github/workflows/dependency_diff.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 9523bd346..6d26ac4f7 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -78,14 +78,14 @@ jobs: # Consuming diffuse action output - - uses: peter-evans/find-comment@v1 + - uses: peter-evans/find-comment@v4 id: find_comment if: github.event_name == 'pull_request' with: issue-number: ${{ github.event.pull_request.number }} body-includes: Diffuse output - - uses: peter-evans/create-or-update-comment@v1 + - uses: peter-evans/create-or-update-comment@v5 if: ${{ steps.diffuse.outputs.diff-raw != null || steps.find_comment.outputs.comment-id != null }} with: body: | diff --git a/.github/workflows/dependency_diff.yml b/.github/workflows/dependency_diff.yml index 86c740afa..44007c6e3 100644 --- a/.github/workflows/dependency_diff.yml +++ b/.github/workflows/dependency_diff.yml @@ -27,13 +27,13 @@ jobs: with: project: 'livekit-android-sdk' - - uses: peter-evans/find-comment@v3 + - uses: peter-evans/find-comment@v4 id: find_comment with: issue-number: ${{ github.event.pull_request.number }} body-includes: Dependency diff - - uses: peter-evans/create-or-update-comment@v4 + - uses: peter-evans/create-or-update-comment@v5 if: ${{ steps.dependency-diff.outputs.text-diff != null || steps.find_comment.outputs.comment-id != null }} with: body: | From ec4a8a3bad340eae1eb511c214696828025455d0 Mon Sep 17 00:00:00 2001 From: davidliu Date: Fri, 13 Feb 2026 00:07:24 +0900 Subject: [PATCH 5/8] Put diffuse into separate job due to java version diff --- .github/workflows/android.yml | 93 ++++++++++++++++++++--------------- 1 file changed, 54 insertions(+), 39 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 6d26ac4f7..78c84297c 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -61,46 +61,10 @@ jobs: - name: Build and test with Gradle run: ./gradlew assembleRelease livekit-android-test:testRelease - # Diffuse checking for pull requests - - uses: actions/cache@v4 - if: github.event_name == 'pull_request' - name: Download base source file for diffuse - with: - path: diffuse-source-file - key: diffuse-${{ github.event.pull_request.base.sha }} - - - id: diffuse - uses: usefulness/diffuse-action@v1 - if: github.event_name == 'pull_request' + - name: Upload AAR + uses: actions/upload-artifact@v6 with: - old-file-path: diffuse-source-file - new-file-path: client-sdk-android/livekit-android-sdk/build/outputs/aar/livekit-android-sdk-release.aar - - # Consuming diffuse action output - - - uses: peter-evans/find-comment@v4 - id: find_comment - if: github.event_name == 'pull_request' - with: - issue-number: ${{ github.event.pull_request.number }} - body-includes: Diffuse output - - - uses: peter-evans/create-or-update-comment@v5 - if: ${{ steps.diffuse.outputs.diff-raw != null || steps.find_comment.outputs.comment-id != null }} - with: - body: | - Diffuse output: - - ${{ steps.diffuse.outputs.diff-gh-comment }} - edit-mode: replace - comment-id: ${{ steps.find_comment.outputs.comment-id }} - issue-number: ${{ github.event.pull_request.number }} - token: ${{ secrets.GITHUB_TOKEN }} - - - uses: actions/upload-artifact@v6 - with: - name: diffuse-output - path: ${{ steps.diffuse.outputs.diff-file }} + path: client-sdk-android/livekit-android-sdk/build/outputs/aar/livekit-android-sdk-release.aar # TODO: Figure out appropriate place to run this. Takes ~3 mins, so pretty slow. # # generates coverage-report.md and publishes as checkrun @@ -241,3 +205,54 @@ jobs: repository: livekit/e2e-android event-type: client-sdk-android-push client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' + + diffuse: + runs-on: ubuntu-latest + name: Diffuse checker + needs: build + steps: + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 23 + + # Diffuse checking for pull requests + - uses: actions/cache@v4 + if: github.event_name == 'pull_request' + name: Download base source file for diffuse + with: + path: diffuse-source-file + key: diffuse-${{ github.event.pull_request.base.sha }} + + - id: diffuse + uses: usefulness/diffuse-action@v1 + if: github.event_name == 'pull_request' + with: + old-file-path: diffuse-source-file + new-file-path: client-sdk-android/livekit-android-sdk/build/outputs/aar/livekit-android-sdk-release.aar + + # Consuming diffuse action output + + - uses: peter-evans/find-comment@v4 + id: find_comment + if: github.event_name == 'pull_request' + with: + issue-number: ${{ github.event.pull_request.number }} + body-includes: Diffuse output + + - uses: peter-evans/create-or-update-comment@v5 + if: ${{ steps.diffuse.outputs.diff-raw != null || steps.find_comment.outputs.comment-id != null }} + with: + body: | + Diffuse output: + + ${{ steps.diffuse.outputs.diff-gh-comment }} + edit-mode: replace + comment-id: ${{ steps.find_comment.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/upload-artifact@v6 + with: + name: diffuse-output + path: ${{ steps.diffuse.outputs.diff-file }} From f6a4aea1cf6450a6412fb968f061a03907c3fdbf Mon Sep 17 00:00:00 2001 From: davidliu Date: Fri, 13 Feb 2026 00:18:00 +0900 Subject: [PATCH 6/8] Use adopt 17 for actions --- .github/workflows/android.yml | 8 ++++---- .github/workflows/dependency_diff.yml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 78c84297c..e2efeae72 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -34,7 +34,7 @@ jobs: submodules: recursive - name: set up JDK 17 - uses: actions/setup-java@v3.12.0 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'adopt' @@ -211,10 +211,10 @@ jobs: name: Diffuse checker needs: build steps: - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: - distribution: 'temurin' - java-version: 23 + java-version: '17' + distribution: 'adopt' # Diffuse checking for pull requests - uses: actions/cache@v4 diff --git a/.github/workflows/dependency_diff.yml b/.github/workflows/dependency_diff.yml index 44007c6e3..f44c0b7e0 100644 --- a/.github/workflows/dependency_diff.yml +++ b/.github/workflows/dependency_diff.yml @@ -16,8 +16,8 @@ jobs: - uses: actions/setup-java@v4 with: - distribution: 'temurin' - java-version: 23 + distribution: 'adopt' + java-version: 17 - uses: gradle/actions/setup-gradle@v4 From 57a7163096899bf79930c16c539f730881ac5c64 Mon Sep 17 00:00:00 2001 From: davidliu Date: Fri, 13 Feb 2026 00:29:05 +0900 Subject: [PATCH 7/8] name artifact correctly --- .github/workflows/android.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index e2efeae72..a72476112 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -64,6 +64,7 @@ jobs: - name: Upload AAR uses: actions/upload-artifact@v6 with: + name: livekit-android-sdk-release.aar path: client-sdk-android/livekit-android-sdk/build/outputs/aar/livekit-android-sdk-release.aar # TODO: Figure out appropriate place to run this. Takes ~3 mins, so pretty slow. From 57b876eb6ef56b1e00cf42d43bca6e7f52172617 Mon Sep 17 00:00:00 2001 From: davidliu Date: Fri, 13 Feb 2026 00:29:18 +0900 Subject: [PATCH 8/8] clean up job logic --- .github/workflows/android.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index a72476112..e8cb2116d 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -209,6 +209,7 @@ jobs: diffuse: runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} name: Diffuse checker needs: build steps: @@ -219,7 +220,6 @@ jobs: # Diffuse checking for pull requests - uses: actions/cache@v4 - if: github.event_name == 'pull_request' name: Download base source file for diffuse with: path: diffuse-source-file @@ -227,7 +227,6 @@ jobs: - id: diffuse uses: usefulness/diffuse-action@v1 - if: github.event_name == 'pull_request' with: old-file-path: diffuse-source-file new-file-path: client-sdk-android/livekit-android-sdk/build/outputs/aar/livekit-android-sdk-release.aar @@ -236,7 +235,6 @@ jobs: - uses: peter-evans/find-comment@v4 id: find_comment - if: github.event_name == 'pull_request' with: issue-number: ${{ github.event.pull_request.number }} body-includes: Diffuse output