[ci] Use container with Android SDK

Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
x7z4w
2025-07-13 09:36:30 +00:00
parent 1a241121c4
commit 09de87fd29
11 changed files with 30 additions and 46 deletions

View File

@@ -32,13 +32,12 @@ on:
- track_generator/** - track_generator/**
- xcode/** - xcode/**
env:
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
jobs: jobs:
android-google-beta: android-google-beta:
name: Android Google Beta name: Android Google Beta
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: runmymind/docker-android-sdk:latest
environment: beta environment: beta
steps: steps:
- name: Install build tools and dependencies - name: Install build tools and dependencies

View File

@@ -11,7 +11,7 @@ on:
jobs: jobs:
android-check-metadata: android-check-metadata:
name: Check app metadata name: Check app metadata
runs-on: ubuntu-latest runs-on: codeberg-tiny
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@@ -34,13 +34,12 @@ on:
- track_generator/** - track_generator/**
- xcode/** - xcode/**
env:
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
jobs: jobs:
lint: lint:
name: Android Lint name: Android Lint
runs-on: ubuntu-latest runs-on: codeberg-tiny
container:
image: runmymind/docker-android-sdk:latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -59,6 +58,8 @@ jobs:
android-check: android-check:
name: Build Android Debug name: Build Android Debug
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: runmymind/docker-android-sdk:latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

View File

@@ -4,12 +4,9 @@ on:
schedule: schedule:
- cron: '0 5 * * 0' # Once per week at 05:00 UTC - cron: '0 5 * * 0' # Once per week at 05:00 UTC
env:
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
jobs: jobs:
precondition: precondition:
runs-on: ubuntu-latest runs-on: codeberg-tiny
name: Check preconditions name: Check preconditions
steps: steps:
- name: Checkout sources - name: Checkout sources
@@ -34,6 +31,8 @@ jobs:
android-google-beta: android-google-beta:
name: Android Google Beta name: Android Google Beta
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: runmymind/docker-android-sdk:latest
needs: precondition needs: precondition
if: ${{ needs.precondition.outputs.updated != '' }} if: ${{ needs.precondition.outputs.updated != '' }}
environment: beta environment: beta

View File

@@ -2,13 +2,12 @@ name: Android Release Metadata
on: on:
workflow_dispatch: # Manual trigger workflow_dispatch: # Manual trigger
env:
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
jobs: jobs:
android-release-metadata: android-release-metadata:
name: Upload Google Play metadata name: Upload Google Play metadata
runs-on: ubuntu-latest runs-on: codeberg-tiny
container:
image: runmymind/docker-android-sdk:latest
environment: production environment: production
steps: steps:
- name: Checkout sources - name: Checkout sources

View File

@@ -5,12 +5,13 @@ on:
env: env:
RELEASE_NOTES: android/app/src/google/play/release-notes/en-US/default.txt RELEASE_NOTES: android/app/src/google/play/release-notes/en-US/default.txt
FDROID_VERSION: android/app/src/fdroid/play/version.yaml FDROID_VERSION: android/app/src/fdroid/play/version.yaml
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
jobs: jobs:
tag: tag:
name: Tag name: Tag
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: runmymind/docker-android-sdk:latest
environment: production environment: production
steps: steps:
- name: Checkout sources - name: Checkout sources

View File

@@ -3,20 +3,20 @@ on:
workflow_dispatch: # Manual trigger workflow_dispatch: # Manual trigger
pull_request: pull_request:
paths: paths:
- packaging/app.organicmaps.desktop.metainfo.xml - packaging/app.comaps.desktop.metainfo.xml
- .forgejo/workflows/appstream-check.yaml # Run check on self change - .forgejo/workflows/appstream-check.yaml # Run check on self change
jobs: jobs:
validate-appstream: validate-appstream:
name: Validate appstream metadata xml name: Validate appstream metadata xml
runs-on: ubuntu-24.04 runs-on: codeberg-tiny
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 1 fetch-depth: 1
sparse-checkout: | sparse-checkout: |
packaging/app.organicmaps.desktop.metainfo.xml packaging/app.comaps.desktop.metainfo.xml
- name: Install appstream validator and flatpak Builder - name: Install appstream validator and flatpak Builder
shell: bash shell: bash
@@ -29,8 +29,8 @@ jobs:
- name: Lint appstream data with flatpak Builder - name: Lint appstream data with flatpak Builder
shell: bash shell: bash
run: flatpak run --command=flatpak-builder-lint org.flatpak.Builder appstream packaging/app.organicmaps.desktop.metainfo.xml run: flatpak run --command=flatpak-builder-lint org.flatpak.Builder appstream packaging/app.comaps.desktop.metainfo.xml
- name: Run appstreamcli in pedantic mode - name: Run appstreamcli in pedantic mode
shell: bash shell: bash
run: flatpak run --command=appstreamcli org.flatpak.Builder validate --pedantic packaging/app.organicmaps.desktop.metainfo.xml run: flatpak run --command=appstreamcli org.flatpak.Builder validate --pedantic packaging/app.comaps.desktop.metainfo.xml

View File

@@ -33,7 +33,7 @@ concurrency:
jobs: jobs:
should-run-check: should-run-check:
name: Should run coverage name: Should run coverage
runs-on: ubuntu-24.04 runs-on: codeberg-tiny
outputs: outputs:
run-from-pr: ${{ steps.run-from-pr.outputs.run-from-pr }} run-from-pr: ${{ steps.run-from-pr.outputs.run-from-pr }}
manually-triggered: ${{ steps.manually-triggered.outputs.manually-triggered }} manually-triggered: ${{ steps.manually-triggered.outputs.manually-triggered }}
@@ -59,14 +59,9 @@ jobs:
coverage: coverage:
needs: should-run-check needs: should-run-check
name: Generate coverage report name: Generate coverage report
runs-on: ubuntu-24.04 runs-on: ubuntu-latest
if: ${{ needs.should-run-check.outputs.run-from-pr == 'true' || needs.should-run-check.outputs.manually-triggered == 'true'}} if: ${{ needs.should-run-check.outputs.run-from-pr == 'true' || needs.should-run-check.outputs.manually-triggered == 'true'}}
steps: steps:
- name: Free disk space by removing .NET, Android and Haskell
shell: bash
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:

View File

@@ -3,20 +3,20 @@ on:
workflow_dispatch: # Manual trigger workflow_dispatch: # Manual trigger
pull_request: pull_request:
paths: paths:
- qt/res/app.organicmaps.desktop.desktop - qt/res/app.comaps.desktop.desktop
- .forgejo/workflows/desktop-file-check.yaml # Run check on self change - .forgejo/workflows/desktop-file-check.yaml # Run check on self change
jobs: jobs:
validate-desktop-file: validate-desktop-file:
name: Validate .desktop file name: Validate .desktop file
runs-on: ubuntu-24.04 runs-on: codeberg-tiny
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 1 fetch-depth: 1
sparse-checkout: | sparse-checkout: |
qt/res/app.organicmaps.desktop.desktop qt/res/app.comaps.desktop.desktop
- name: Install desktop-file-validate tool - name: Install desktop-file-validate tool
shell: bash shell: bash
@@ -27,4 +27,4 @@ jobs:
- name: Validate desktop file - name: Validate desktop file
shell: bash shell: bash
run: desktop-file-validate qt/res/app.organicmaps.desktop.desktop && echo "Successfully validated .desktop file" run: desktop-file-validate qt/res/app.comaps.desktop.desktop && echo "Successfully validated .desktop file"

View File

@@ -10,7 +10,7 @@ on:
jobs: jobs:
ios-check-metadata: ios-check-metadata:
name: Check app metadata name: Check app metadata
runs-on: ubuntu-latest runs-on: codeberg-tiny
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@@ -31,18 +31,13 @@ on:
jobs: jobs:
linux-no-unity: linux-no-unity:
name: Linux no unity build name: Linux no unity build
runs-on: ubuntu-24.04 runs-on: ubuntu-latest
# Cancels previous jobs if the same branch or PR was updated again. # Cancels previous jobs if the same branch or PR was updated again.
concurrency: concurrency:
group: ${{ github.workflow }}-no-unity-${{ github.event.pull_request.number || github.ref }} group: ${{ github.workflow }}-no-unity-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true cancel-in-progress: true
steps: steps:
- name: Free disk space by removing .NET, Android and Haskell
shell: bash
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@@ -95,7 +90,7 @@ jobs:
linux-matrix: linux-matrix:
name: Linux builds and tests name: Linux builds and tests
runs-on: ubuntu-24.04 runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -107,11 +102,6 @@ jobs:
cancel-in-progress: true cancel-in-progress: true
steps: steps:
- name: Free disk space by removing .NET, Android and Haskell
shell: bash
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@v4