Fix HE-AAC transcoding with decoded PCM format #699
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: APK Diff | |
| on: | |
| pull_request: | |
| permissions: | |
| contents: read # to fetch code (actions/checkout) | |
| pull-requests: write # to comment on PR | |
| env: | |
| NDK_VERSION: '28.0.13004108' | |
| jobs: | |
| assemble-base: | |
| if: ${{ github.repository != 'signalapp/Signal-Android' }} | |
| runs-on: ubuntu-latest-8-cores | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| # gh api repos/actions/checkout/commits/v6 --jq '.sha' | |
| with: | |
| submodules: true | |
| ref: ${{ github.event.pull_request.base.sha }} | |
| - name: set up JDK 21 | |
| uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 | |
| # gh api repos/actions/setup-java/commits/v5 --jq '.sha' | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6 | |
| # gh api repos/gradle/actions/commits/v6 --jq '.sha' | |
| with: | |
| # PR-only workflow: always read from the cache, never write. | |
| cache-read-only: true | |
| # Required to read the Gradle configuration cache persisted by 8.** builds. | |
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
| - name: Install NDK | |
| run: echo "y" | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --install "ndk;${{ env.NDK_VERSION }}" | |
| - name: Validate Gradle Wrapper | |
| uses: gradle/actions/wrapper-validation@3f131e8634966bd73d06cc69884922b02e6faf92 # v6 | |
| # gh api repos/gradle/actions/commits/v6 --jq '.sha' | |
| - name: Cache base apk | |
| id: cache-base | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5 | |
| # gh api repos/actions/cache/commits/v5 --jq '.sha' | |
| with: | |
| path: diffuse-base.apk | |
| key: diffuse-${{ github.event.pull_request.base.sha }} | |
| - name: Build with Gradle | |
| if: steps.cache-base.outputs.cache-hit != 'true' | |
| run: ./gradlew assemblePlayProdRelease | |
| - name: Copy base apk | |
| if: steps.cache-base.outputs.cache-hit != 'true' | |
| run: mv app/build/outputs/apk/playProd/release/*arm64*.apk diffuse-base.apk | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| # gh api repos/actions/checkout/commits/v6 --jq '.sha' | |
| with: | |
| submodules: true | |
| clean: 'false' | |
| - name: Build with Gradle | |
| run: ./gradlew assemblePlayProdRelease | |
| - name: Copy PR apk | |
| run: mv app/build/outputs/apk/playProd/release/*arm64*.apk diffuse-new.apk | |
| - id: diffuse | |
| uses: usefulness/diffuse-action@41995fe8ff6be0a8847e63bdc5a4679c704b455c # v1 | |
| # gh api repos/usefulness/diffuse-action/commits/v1 --jq '.sha' | |
| with: | |
| old-file-path: diffuse-base.apk | |
| new-file-path: diffuse-new.apk | |
| - uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4 | |
| # gh api repos/peter-evans/find-comment/commits/v4 --jq '.sha' | |
| id: find-comment | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body-includes: Diffuse output | |
| - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 | |
| # gh api repos/peter-evans/create-or-update-comment/commits/v5 --jq '.sha' | |
| 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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| # gh api repos/actions/upload-artifact/commits/v7 --jq '.sha' | |
| with: | |
| name: diffuse-output | |
| path: ${{ steps.diffuse.outputs.diff-file }} |