Android Device Farm Symbol Collection #5959
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: Android Device Farm Symbol Collection | |
on: | |
workflow_dispatch: # Manual trigger | |
schedule: | |
# Every 10 minutes on Sundays | |
- cron: '*/10 * * * 0' # Must match step below | |
# Every 10 minutes on Saturdays | |
- cron: '*/10 * * * 6' # Must match step below | |
# Every 10th minute passed every hour from 3 through 5 (03:00 AM UTC, 6 PM PST) on every day-of-week from Monday through Friday | |
- cron: '*/10 3-5 * * 1-5' # Must match step below | |
concurrency: | |
group: android-symbol-upload-device-farm | |
cancel-in-progress: false | |
jobs: | |
run-symbol-upload: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Set Sentry Cronjob Slug - Sunday | |
if: github.event.schedule=='*/10 * * * 0' | |
run: | | |
echo "CRON_JOB_NAME=device-farm-symbol-collection-sunday" >> $GITHUB_ENV | |
- name: Set Sentry Cronjob Slug - Saturday | |
if: github.event.schedule=='*/10 * * * 6' | |
run: | | |
echo "CRON_JOB_NAME=device-farm-symbol-collection-saturday" >> $GITHUB_ENV | |
- name: Set Sentry Cronjob Slug - Weekday night | |
if: github.event.schedule=='*/10 3-5 * * 1-5' | |
run: | | |
echo "CRON_JOB_NAME=device-farm-symbol-collection-weekday-night" >> $GITHUB_ENV | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9.0.200 | |
- name: Restore .cache folder | |
uses: actions/cache@v4 | |
with: | |
path: .cache | |
key: cache-dir-${{ github.workflow }}-${{ github.run_id }} | |
restore-keys: | | |
cache-dir-${{ github.workflow }} | |
- name: Download the Android app if there's a new version | |
env: | |
GITHUB_SHA: ${{ github.sha }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
pwsh ./scripts/download-latest-android-apk.ps1 | |
- name: Save .cache folder | |
uses: actions/cache@v4 | |
with: | |
path: .cache | |
key: cache-dir-${{ github.workflow }}-${{ github.run_id }} | |
- name: Invoke Runner | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | |
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | |
run: | | |
dotnet run --project src/SymbolCollector.Runner/SymbolCollector.Runner.csproj -c Release /p:TreatWarningsAsErrors=false | |
- name: Upload .cache as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cache-folder | |
path: .cache | |
retention-days: 7 |