Switch to python venv
to support new macos-latest
and beta ubuntu runners
#367
Workflow file for this run
This file contains 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
on: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
jobs: | |
test-apk: | |
runs-on: ubuntu-latest | |
needs: | |
- fetch-test-apk-old | |
- fetch-test-apk-new | |
name: Run diffuse action (part 1) | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: old-apk | |
- uses: actions/download-artifact@v4 | |
with: | |
name: new-apk | |
- id: diffuse | |
uses: ./ | |
with: | |
old-file-path: old-apk.apk | |
new-file-path: new-apk.apk | |
debug: true | |
- uses: peter-evans/find-comment@v3 | |
id: find_comment | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body-includes: diffuse-smoke-test-1 | |
- uses: peter-evans/create-or-update-comment@v4 | |
with: | |
body: | | |
### diffuse-smoke-test-1 | |
`size-old-bytes`: ${{ steps.diffuse.outputs.size-old-bytes }} | |
`size-old-text`: ${{ steps.diffuse.outputs.size-old-text }} | |
`size-new-bytes`: ${{ steps.diffuse.outputs.size-new-bytes }} | |
`size-new-text`: ${{ steps.diffuse.outputs.size-new-text }} | |
`size-diff-comment_style_1`: ${{ steps.diffuse.outputs.size-diff-comment_style_1 }} | |
`steps.diffuse.outputs.diff-gh-comment:` | |
${{ steps.diffuse.outputs.diff-gh-comment }} | |
`steps.diffuse.outputs.summary` | |
``` | |
${{ steps.diffuse.outputs.summary }} | |
``` | |
`steps.diffuse.outputs.manifest` | |
``` | |
${{ steps.diffuse.outputs.manifest }} | |
``` | |
`steps.diffuse.outputs.dex` | |
``` | |
${{ steps.diffuse.outputs.dex }} | |
``` | |
`steps.diffuse.outputs.diff-gh-comment-all-collapsed` | |
${{ steps.diffuse.outputs.diff-gh-comment-all-collapsed }} | |
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@v4 | |
with: | |
name: diffuse-output-1 | |
path: ${{ steps.diffuse.outputs.diff-file }} | |
test-apk-2: | |
runs-on: ubuntu-latest | |
needs: | |
- fetch-test-apk-very-old | |
- fetch-test-apk-new | |
name: Run diffuse action (part 2) | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: very-old-apk | |
- uses: actions/download-artifact@v4 | |
with: | |
name: new-apk | |
- run: ls -al | |
- id: diffuse | |
uses: ./ | |
with: | |
old-file-path: very-old-apk.apk | |
new-file-path: new-apk.apk | |
debug: true | |
- uses: peter-evans/find-comment@v3 | |
id: find_comment | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body-includes: diffuse-smoke-test-2 | |
- uses: peter-evans/create-or-update-comment@v4 | |
with: | |
body: | | |
### diffuse-smoke-test-2 | |
`size-old-bytes`: ${{ steps.diffuse.outputs.size-old-bytes }} | |
`size-old-text`: ${{ steps.diffuse.outputs.size-old-text }} | |
`size-new-bytes`: ${{ steps.diffuse.outputs.size-new-bytes }} | |
`size-new-text`: ${{ steps.diffuse.outputs.size-new-text }} | |
`size-diff-comment_style_1`: ${{ steps.diffuse.outputs.size-diff-comment_style_1 }} | |
`steps.diffuse.outputs.diff-gh-comment-no-dex:` | |
${{ steps.diffuse.outputs.diff-gh-comment-no-dex }} | |
`steps.diffuse.outputs.summary` | |
``` | |
${{ steps.diffuse.outputs.summary }} | |
``` | |
`steps.diffuse.outputs.manifest` | |
``` | |
${{ steps.diffuse.outputs.manifest }} | |
``` | |
`steps.diffuse.outputs.dex` | |
``` | |
${{ steps.diffuse.outputs.dex }} | |
``` | |
`steps.diffuse.outputs.diff-gh-comment-no-dex-all-collapsed` | |
${{ steps.diffuse.outputs.diff-gh-comment-no-dex-all-collapsed }} | |
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@v4 | |
with: | |
name: diffuse-output-2 | |
path: ${{ steps.diffuse.outputs.diff-file }} | |
fetch-test-apk-very-old: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get very old version of Android Auto app for test purposes | |
run: wget "https://github.com/usefulness/storage/raw/master/android-auto-very-old.apk" -O very-old-apk.apk | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: very-old-apk | |
path: very-old-apk.apk | |
retention-days: 1 | |
fetch-test-apk-old: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get old version of Android Auto app for test purposes | |
run: wget "https://github.com/usefulness/storage/raw/master/android-auto-old.apk" -O old-apk.apk | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: very-old-apk | |
path: very-old-apk.apk | |
retention-days: 1 | |
fetch-test-apk-new: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get new version of Android Auto app for test purposes | |
run: wget "https://github.com/usefulness/storage/raw/master/android-auto-new.apk" -O new-apk.apk | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: new-apk | |
path: new-apk.apk | |
retention-days: 1 | |
smoke-test: | |
runs-on: ${{ matrix.os }} | |
needs: | |
- fetch-test-apk-very-old | |
- fetch-test-apk-new | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest, ubuntu-24.04 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: very-old-apk | |
- uses: actions/download-artifact@v4 | |
with: | |
name: new-apk | |
- run: ls -al | |
- id: diffuse-custom-repo-hardcoded | |
uses: ./ | |
with: | |
old-file-path: very-old-apk.apk | |
new-file-path: new-apk.apk | |
lib-version: 0.3.0 | |
diffuse-repo: JakeWharton/diffuse | |
debug: true | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: diffuse-custom-repo-hardcoded-${{ matrix.os }} | |
path: ${{ steps.diffuse-custom-repo-hardcoded.outputs.diff-file }} | |
- id: diffuse-custom-repo-latest | |
uses: ./ | |
with: | |
old-file-path: very-old-apk.apk | |
new-file-path: new-apk.apk | |
lib-version: latest | |
diffuse-repo: JakeWharton/diffuse | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: diffuse-custom-repo-latest-${{ matrix.os }} | |
path: ${{ steps.diffuse-custom-repo-latest.outputs.diff-file }} | |