Add workflows to automatically update screenshots
These are also now tracked with git-lfs
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
fastlane/metadata/**/images/**/*.png filter=lfs diff=lfs merge=lfs -text
|
||||
205
.github/workflows/screenshots.yml
vendored
Normal file
@@ -0,0 +1,205 @@
|
||||
name: Update screenshots
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
# screenshots_apple:
|
||||
# name: 'Apple'
|
||||
# runs-on: macos-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
#
|
||||
# - name: Common flutter setup
|
||||
# uses: ./.github/actions/flutter-common
|
||||
#
|
||||
# - name: Install CocoaPods
|
||||
# run: |
|
||||
# cd ios
|
||||
# pod install || true
|
||||
# cd ..
|
||||
#
|
||||
# - name: Boot iOS simulator
|
||||
# id: boot
|
||||
# run: |
|
||||
# SIMULATOR=$(xcrun simctl list devices available | awk -F '[()]' '/iPhone 17/{print $2; exit}')
|
||||
# SIMULATOR=${SIMULATOR:-$(xcrun simctl list devices available | awk -F '[()]' '/iPhone/{print $2; exit}')}
|
||||
# echo "SIMULATOR=$SIMULATOR" >> $GITHUB_ENV
|
||||
# xcrun simctl boot "$SIMULATOR" || true
|
||||
# open -a Simulator || true
|
||||
# n=0; until xcrun simctl bootstatus "$SIMULATOR" -b || [ $n -ge 60 ]; do sleep 1; n=$((n+1)); done
|
||||
#
|
||||
# - name: Generate screenshots on iOS simulator
|
||||
# run: |
|
||||
# flutter drive --driver=test_driver/screenshot_driver.dart --target=integration_test/make_screenshots_test.dart --dart-define=DEVICE_TYPE=iOSPhoneBig -d "$SIMULATOR"
|
||||
#
|
||||
# - name: Upload screenshots artifacts
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: screenshots-ios
|
||||
# path: fastlane/metadata/ios/**/images/iPhone 6.9/*.png
|
||||
|
||||
screenshots_android:
|
||||
name: 'Android - ${{ matrix.device.name }}'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
device:
|
||||
- name: "Phone"
|
||||
profile: pixel_7_pro
|
||||
device_type: androidPhone
|
||||
folder: phoneScreenshots
|
||||
- name: "Tablet 7in"
|
||||
profile: 7in WSVGA (Tablet)
|
||||
device_type: androidTabletSmall
|
||||
folder: sevenInchScreenshots
|
||||
- name: "Tablet 10in"
|
||||
profile: pixel_tablet
|
||||
device_type: androidTabletBig
|
||||
folder: tenInchScreenshots
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Common flutter setup
|
||||
uses: ./.github/actions/flutter-common
|
||||
|
||||
- name: Enable KVM
|
||||
run: |
|
||||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger --name-match=kvm
|
||||
|
||||
- name: Accept Android SDK licenses
|
||||
run: yes | sdkmanager --licenses || true
|
||||
|
||||
# Free up disk space on the runner. List taken from
|
||||
# https://github.com/flathub-infra/vorarbeiter/blob/main/.github/workflows/build.yml
|
||||
#
|
||||
# If needed, consult the list of available software for other candidates to remove:
|
||||
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
|
||||
- name: Free up disk space
|
||||
run: |
|
||||
sudo swapoff -a || true
|
||||
sudo rm -rf /opt/ghc /usr/local/.ghcup || true
|
||||
sudo rm -rf /opt/hostedtoolcache/CodeQL || true
|
||||
sudo rm -rf /opt/hostedtoolcache/PyPy
|
||||
sudo rm -rf /usr/local/julia* /usr/share/java /usr/share/kotlinc
|
||||
sudo rm -rf /opt/hostedtoolcache/go /opt/az /opt/microsoft /opt/pipx
|
||||
sudo rm -rf /usr/share/miniconda /home/runner/.rustup /home/packer/.rustup /home/runneradmin/.rustup
|
||||
sudo rm -rf /etc/skel/.rustup /opt/hostedtoolcache/node /opt/google-cloud-sdk
|
||||
sudo rm -rf /usr/share/az_* /opt/google /usr/lib/firefox /usr/local/aws-*
|
||||
sudo rm -rf /usr/libexec/gcc /opt/actionarchivecache /opt/hostedtoolcache/Ruby
|
||||
sudo rm -rf /var/lib/mysql /usr/local/n
|
||||
sudo rm -rf /swapfile || true
|
||||
sudo rm -rf /usr/share/dotnet /usr/share/swift
|
||||
sudo rm -rf /usr/local/share/boost /usr/local/share/powershell
|
||||
sudo rm -rf /usr/lib/google-cloud-sdk
|
||||
sudo rm -rf /usr/local/graalvm /usr/local/share/chromium
|
||||
sudo rm -rf /usr/local/lib/node_modules
|
||||
sudo rm -rf /usr/lib/dotnet /usr/lib/php /usr/share/mysql
|
||||
sudo rm -rf /usr/lib/llvm-*
|
||||
sudo rm -rf /usr/lib/mono
|
||||
sudo apt-get clean || true
|
||||
sudo rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# TMP -------------------->
|
||||
- name: Gradle cache
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: AVD cache
|
||||
uses: actions/cache@v4
|
||||
id: avd-cache
|
||||
with:
|
||||
path: |
|
||||
~/.android/avd/*
|
||||
~/.android/adb*
|
||||
key: avd-api-36
|
||||
|
||||
- name: Run on Android emulator
|
||||
if: steps.avd-cache.outputs.cache-hit != 'true'
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
with:
|
||||
api-level: 36
|
||||
target: google_apis
|
||||
arch: x86_64
|
||||
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||
profile: ${{ matrix.device.profile }}
|
||||
script: echo "Generated AVD snapshot for caching."
|
||||
# <-------------------- TMP
|
||||
|
||||
- name: Generate screenshots
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
with:
|
||||
api-level: 36
|
||||
target: google_apis
|
||||
arch: x86_64
|
||||
profile: ${{ matrix.device.profile }}
|
||||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||
disable-animations: true
|
||||
script: |
|
||||
|
||||
# Values for rotation
|
||||
# 0 for portrait (0°)
|
||||
# 1 for landscape (90°)
|
||||
# 2 for portrait reversed (180°)
|
||||
# 3 for landscape reversed (270°)
|
||||
|
||||
# turn off auto rotation and rotate to portrait mode
|
||||
#adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0
|
||||
#adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:0
|
||||
|
||||
echo "Device settings:"
|
||||
adb shell settings put system accelerometer_rotation 0
|
||||
adb shell settings put system user_rotation 0
|
||||
|
||||
sleep 5
|
||||
|
||||
adb shell settings get system accelerometer_rotation
|
||||
adb shell settings get system user_rotation
|
||||
|
||||
# Make the screenshots
|
||||
flutter drive --driver=test_driver/screenshot_driver.dart --target=integration_test/make_screenshots_test.dart --dart-define=DEVICE_TYPE=${{ matrix.device.device_type }}
|
||||
|
||||
- name: Upload screenshots artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: screenshots-android-${{ matrix.device.folder }}
|
||||
path: fastlane/metadata/android/**/images/${{ matrix.device.folder }}/*.png
|
||||
|
||||
# commit_screenshots:
|
||||
# name: 'Commit and push'
|
||||
# needs:
|
||||
# - screenshots_apple
|
||||
# - screenshots_android
|
||||
#
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
#
|
||||
# - name: Download all screenshot artifacts
|
||||
# uses: actions/download-artifact@v4
|
||||
# with:
|
||||
# path: screenshots
|
||||
#
|
||||
# - name: Merge artifacts into fastlane/metadata
|
||||
# run: |
|
||||
# set -euo pipefail
|
||||
# rsync --archive --checksum --itemize-changes "screenshots/screenshots-android-phoneScreenshots/" fastlane/metadata/android/
|
||||
# rsync --archive --checksum --itemize-changes "screenshots/screenshots-android-sevenInchScreenshots/" fastlane/metadata/android/
|
||||
# rsync --archive --checksum --itemize-changes "screenshots/screenshots-android-tenInchScreenshots/" fastlane/metadata/android/
|
||||
# rsync --archive --checksum --itemize-changes "screenshots/screenshots-ios/" fastlane/metadata/ios/
|
||||
#
|
||||
# - name: Commit screenshots to repository
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# run: |
|
||||
# git config user.name "github-actions[bot]"
|
||||
# git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
# git status
|
||||
# git add fastlane/metadata/android fastlane/metadata/ios || true
|
||||
# if git diff --staged --quiet; then
|
||||
# echo "No new/changed screenshots to commit."
|
||||
# else
|
||||
# BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
# # git commit -m "Update screenshots"
|
||||
# # git push origin HEAD:"${BRANCH}"
|
||||
# fi
|
||||
|
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 176 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 178 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 208 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 169 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 130 B |