feat: place reader content in the tabletop upper region (R813) #923
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: PR build check | |
| on: | |
| pull_request: | |
| paths: | |
| - '**' | |
| - '!i18n/src/commonMain/moko-resources/**/strings-aniyomi.xml' | |
| - '!i18n/src/commonMain/moko-resources/**/strings.xml' | |
| - '!i18n/src/commonMain/moko-resources/**/plurals-aniyomi.xml' | |
| - '!i18n/src/commonMain/moko-resources/**/plurals.xml' | |
| - 'i18n/src/commonMain/moko-resources/base/strings-aniyomi.xml' | |
| - 'i18n/src/commonMain/moko-resources/base/strings.xml' | |
| - 'i18n/src/commonMain/moko-resources/base/plurals-aniyomi.xml' | |
| - 'i18n/src/commonMain/moko-resources/base/plurals.xml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| classify_pr_changes: | |
| name: Classify PR changes | |
| runs-on: 'ubuntu-24.04' | |
| outputs: | |
| android_changed: ${{ steps.changed.outputs.android_changed }} | |
| steps: | |
| - name: Clone repo | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Classify changed files | |
| id: changed | |
| env: | |
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| run: | | |
| set -euo pipefail | |
| android_changed=false | |
| while IFS= read -r path; do | |
| case "$path" in | |
| docs/**|.github/**|scripts/tests/**|*.md) | |
| ;; | |
| *) | |
| android_changed=true | |
| break | |
| ;; | |
| esac | |
| done < <(git diff --name-only "$BASE_SHA...HEAD") | |
| echo "android_changed=$android_changed" >> "$GITHUB_OUTPUT" | |
| branding_guardrail: | |
| name: Branding guardrail | |
| runs-on: 'ubuntu-24.04' | |
| steps: | |
| - name: Clone repo | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run gate script tests | |
| run: PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s scripts/tests -p 'test_*.py' | |
| - name: Run branding regression guardrail | |
| env: | |
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| run: | | |
| set -euxo pipefail | |
| python3 scripts/check_branding_guardrail.py --base "$BASE_SHA" | |
| - name: Check SqlDelight dependency strategy | |
| run: python3 scripts/check_sqldelight_dependency_strategy.py | |
| - name: Check extension source gateway | |
| run: | | |
| PYTHONDONTWRITEBYTECODE=1 python3 scripts/check_source_gateway.py | |
| - name: Require PR exception section when allowlist grows | |
| env: | |
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| PR_BODY: ${{ github.event.pull_request.body }} | |
| run: | | |
| set -euxo pipefail | |
| added_lines=$(git diff --unified=0 "$BASE_SHA...HEAD" -- scripts/branding_guardrail_allowlist.txt | { grep -E '^\+[^+]' || true; } | wc -l | tr -d ' ') | |
| if [ "$added_lines" -gt 0 ]; then | |
| if ! printf '%s\n' "${PR_BODY:-}" | grep -Eq '^##[[:space:]]+Branding Guardrail Exceptions'; then | |
| echo "Allowlist grew, but PR body is missing '## Branding Guardrail Exceptions'" >&2 | |
| exit 1 | |
| fi | |
| fi | |
| spotless: | |
| name: Check code format | |
| runs-on: 'ubuntu-24.04' | |
| needs: | |
| - classify_pr_changes | |
| if: needs.classify_pr_changes.outputs.android_changed == 'true' | |
| steps: | |
| - name: Clone repo | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Set up JDK | |
| uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 | |
| with: | |
| java-version: 17 | |
| distribution: temurin | |
| - name: Set up gradle | |
| uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 | |
| - name: Check code format | |
| run: ./gradlew spotlessCheck | |
| build: | |
| name: Build app | |
| runs-on: 'ubuntu-24.04' | |
| needs: | |
| - classify_pr_changes | |
| if: needs.classify_pr_changes.outputs.android_changed == 'true' | |
| steps: | |
| - name: Clone repo | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Dependency Review | |
| if: github.repository == 'aniyomiorg/aniyomi' | |
| uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0 | |
| - name: Set up JDK | |
| uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 | |
| with: | |
| java-version: 17 | |
| distribution: temurin | |
| - name: Set up gradle | |
| uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 | |
| with: | |
| cache-read-only: false | |
| - name: Build app | |
| run: ./gradlew assembleStableRelease --build-cache | |
| - name: Verify 16 KB native alignment | |
| run: ./scripts/verify_16kb_apk.sh app/build/outputs/apk/stable/release/app-stable-arm64-v8a-release-unsigned.apk | |
| - name: Verify extension source ABI | |
| run: | | |
| ./scripts/check_release_extension_abi.py \ | |
| app/build/outputs/apk/stable/release/app-stable-arm64-v8a-release-unsigned.apk \ | |
| --baseline app/extension-abi-baseline.txt | |
| - name: Upload APK | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: arm64-v8a-${{ github.sha }} | |
| path: app/build/outputs/apk/stable/release/app-stable-arm64-v8a-release-unsigned.apk | |
| - name: Upload mapping | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: mapping-${{ github.sha }} | |
| path: app/build/outputs/mapping/stableRelease | |
| test: | |
| name: Run unit tests | |
| runs-on: 'ubuntu-24.04' | |
| needs: | |
| - classify_pr_changes | |
| if: needs.classify_pr_changes.outputs.android_changed == 'true' | |
| steps: | |
| - name: Clone repo | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Set up JDK | |
| uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 | |
| with: | |
| java-version: 17 | |
| distribution: temurin | |
| - name: Set up gradle | |
| uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 | |
| with: | |
| cache-read-only: false | |
| - name: Run unit tests | |
| run: ./gradlew :app:testStableDebugUnitTest :data:testDebugUnitTest --build-cache | |
| baseline-profile: | |
| name: Verify baseline profile task and artifact | |
| runs-on: 'ubuntu-24.04' | |
| needs: | |
| - classify_pr_changes | |
| if: needs.classify_pr_changes.outputs.android_changed == 'true' | |
| steps: | |
| - name: Clone repo | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Set up JDK | |
| uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 | |
| with: | |
| java-version: 17 | |
| distribution: temurin | |
| - name: Set up gradle | |
| uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 | |
| - name: Verify generateBaselineProfile task is wired | |
| run: ./gradlew :app:generateBaselineProfile --dry-run | |
| - name: Verify baseline-prof.txt artifact is committed and non-empty | |
| run: | | |
| ARTIFACT="app/src/main/baseline-prof.txt" | |
| if [ ! -f "$ARTIFACT" ]; then | |
| echo "ERROR: $ARTIFACT not found — run :app:generateBaselineProfile and commit the result" | |
| exit 1 | |
| fi | |
| if [ ! -s "$ARTIFACT" ]; then | |
| echo "ERROR: $ARTIFACT is empty — regenerate with :app:generateBaselineProfile" | |
| exit 1 | |
| fi | |
| echo "baseline-prof.txt present ($(wc -l < "$ARTIFACT") lines)" |