mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 16:22:49 +00:00
ci: run the heavy Gradle jobs on the self-hosted runners
Requires the Android SDK in the runner image. Also gates the disk-cleanup step to hosted runners, where it would otherwise strip the host.
This commit is contained in:
@@ -21,7 +21,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build APKs
|
name: Build APKs
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, Linux, X64]
|
||||||
permissions:
|
permissions:
|
||||||
# A job-level block replaces the workflow-level one, so contents:read has to be
|
# A job-level block replaces the workflow-level one, so contents:read has to be
|
||||||
# repeated here or checkout fails on this private fork.
|
# repeated here or checkout fails on this private fork.
|
||||||
@@ -38,6 +38,9 @@ jobs:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
steps:
|
steps:
|
||||||
- name: Free Disk Space (Ubuntu)
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
# Only meaningful on GitHub's throwaway VMs. On a persistent self-hosted runner this
|
||||||
|
# would delete dotnet/haskell/docker images from the host on every run.
|
||||||
|
if: runner.environment == 'github-hosted'
|
||||||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
with:
|
with:
|
||||||
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build Enterprise APKs
|
name: Build Enterprise APKs
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, Linux, X64]
|
||||||
# Skip in forks
|
# Skip in forks
|
||||||
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'element-hq/element-x-android' }}
|
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'element-hq/element-x-android' }}
|
||||||
strategy:
|
strategy:
|
||||||
@@ -34,6 +34,9 @@ jobs:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
steps:
|
steps:
|
||||||
- name: Free Disk Space (Ubuntu)
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
# Only meaningful on GitHub's throwaway VMs. On a persistent self-hosted runner this
|
||||||
|
# would delete dotnet/haskell/docker images from the host on every run.
|
||||||
|
if: runner.environment == 'github-hosted'
|
||||||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
with:
|
with:
|
||||||
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
|||||||
@@ -23,12 +23,15 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build-apk:
|
build-apk:
|
||||||
name: Build APK
|
name: Build APK
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, Linux, X64]
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ format('maestro-build-{0}', github.ref) }}
|
group: ${{ format('maestro-build-{0}', github.ref) }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
steps:
|
steps:
|
||||||
- name: Free Disk Space (Ubuntu)
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
# Only meaningful on GitHub's throwaway VMs. On a persistent self-hosted runner this
|
||||||
|
# would delete dotnet/haskell/docker images from the host on every run.
|
||||||
|
if: runner.environment == 'github-hosted'
|
||||||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
with:
|
with:
|
||||||
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Free Disk Space (Ubuntu)
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
# Only meaningful on GitHub's throwaway VMs. On a persistent self-hosted runner this
|
||||||
|
# would delete dotnet/haskell/docker images from the host on every run.
|
||||||
|
if: runner.environment == 'github-hosted'
|
||||||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
with:
|
with:
|
||||||
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
@@ -67,7 +70,7 @@ jobs:
|
|||||||
|
|
||||||
checkDependencies:
|
checkDependencies:
|
||||||
name: Search for invalid dependencies
|
name: Search for invalid dependencies
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, Linux, X64]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
with:
|
with:
|
||||||
@@ -91,7 +94,7 @@ jobs:
|
|||||||
# Code checks
|
# Code checks
|
||||||
konsist:
|
konsist:
|
||||||
name: Konsist tests
|
name: Konsist tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, Linux, X64]
|
||||||
# Allow all jobs on main and develop. Just one per PR.
|
# Allow all jobs on main and develop. Just one per PR.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.ref == 'refs/heads/main' && format('check-konsist-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('check-konsist-develop-{0}', github.sha) || format('check-konsist-{0}', github.ref) }}
|
group: ${{ github.ref == 'refs/heads/main' && format('check-konsist-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('check-konsist-develop-{0}', github.sha) || format('check-konsist-{0}', github.ref) }}
|
||||||
@@ -132,7 +135,7 @@ jobs:
|
|||||||
|
|
||||||
compose:
|
compose:
|
||||||
name: Compose tests
|
name: Compose tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, Linux, X64]
|
||||||
# Allow all jobs on main and develop. Just one per PR.
|
# Allow all jobs on main and develop. Just one per PR.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.ref == 'refs/heads/main' && format('check-compose-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('check-compose-develop-{0}', github.sha) || format('check-compose-{0}', github.ref) }}
|
group: ${{ github.ref == 'refs/heads/main' && format('check-compose-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('check-compose-develop-{0}', github.sha) || format('check-compose-{0}', github.ref) }}
|
||||||
@@ -166,7 +169,7 @@ jobs:
|
|||||||
|
|
||||||
lint:
|
lint:
|
||||||
name: Android lint check
|
name: Android lint check
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, Linux, X64]
|
||||||
# Allow all jobs on main and develop. Just one per PR.
|
# Allow all jobs on main and develop. Just one per PR.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.ref == 'refs/heads/main' && format('check-lint-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('check-lint-develop-{0}', github.sha) || format('check-lint-{0}', github.ref) }}
|
group: ${{ github.ref == 'refs/heads/main' && format('check-lint-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('check-lint-develop-{0}', github.sha) || format('check-lint-{0}', github.ref) }}
|
||||||
@@ -211,7 +214,7 @@ jobs:
|
|||||||
|
|
||||||
detekt:
|
detekt:
|
||||||
name: Detekt checks
|
name: Detekt checks
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, Linux, X64]
|
||||||
# Allow all jobs on main and develop. Just one per PR.
|
# Allow all jobs on main and develop. Just one per PR.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.ref == 'refs/heads/main' && format('check-detekt-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('check-detekt-develop-{0}', github.sha) || format('check-detekt-{0}', github.ref) }}
|
group: ${{ github.ref == 'refs/heads/main' && format('check-detekt-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('check-detekt-develop-{0}', github.sha) || format('check-detekt-{0}', github.ref) }}
|
||||||
@@ -252,7 +255,7 @@ jobs:
|
|||||||
|
|
||||||
ktlint:
|
ktlint:
|
||||||
name: Ktlint checks
|
name: Ktlint checks
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, Linux, X64]
|
||||||
# Allow all jobs on main and develop. Just one per PR.
|
# Allow all jobs on main and develop. Just one per PR.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.ref == 'refs/heads/main' && format('check-ktlint-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('check-ktlint-develop-{0}', github.sha) || format('check-ktlint-{0}', github.ref) }}
|
group: ${{ github.ref == 'refs/heads/main' && format('check-ktlint-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('check-ktlint-develop-{0}', github.sha) || format('check-ktlint-{0}', github.ref) }}
|
||||||
|
|||||||
@@ -23,11 +23,14 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
contents: write
|
contents: write
|
||||||
name: Record screenshots on branch ${{ github.event.pull_request.head.ref || github.ref_name }}
|
name: Record screenshots on branch ${{ github.event.pull_request.head.ref || github.ref_name }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, Linux, X64]
|
||||||
if: github.event_name == 'workflow_dispatch' || github.event.label.name == 'Record-Screenshots'
|
if: github.event_name == 'workflow_dispatch' || github.event.label.name == 'Record-Screenshots'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Free Disk Space (Ubuntu)
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
# Only meaningful on GitHub's throwaway VMs. On a persistent self-hosted runner this
|
||||||
|
# would delete dotnet/haskell/docker images from the host on every run.
|
||||||
|
if: runner.environment == 'github-hosted'
|
||||||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
with:
|
with:
|
||||||
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
|||||||
@@ -22,13 +22,16 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
sonar:
|
sonar:
|
||||||
name: Sonar Quality Checks
|
name: Sonar Quality Checks
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, Linux, X64]
|
||||||
# Allow all jobs on main and develop. Just one per PR.
|
# Allow all jobs on main and develop. Just one per PR.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ format('sonar-{0}', github.ref) }}
|
group: ${{ format('sonar-{0}', github.ref) }}
|
||||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Free Disk Space (Ubuntu)
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
# Only meaningful on GitHub's throwaway VMs. On a persistent self-hosted runner this
|
||||||
|
# would delete dotnet/haskell/docker images from the host on every run.
|
||||||
|
if: runner.environment == 'github-hosted'
|
||||||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
with:
|
with:
|
||||||
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
name: Runs unit tests
|
name: Runs unit tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, Linux, X64]
|
||||||
|
|
||||||
# Allow all jobs on main and develop. Just one per PR.
|
# Allow all jobs on main and develop. Just one per PR.
|
||||||
concurrency:
|
concurrency:
|
||||||
@@ -29,6 +29,9 @@ jobs:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
steps:
|
steps:
|
||||||
- name: Free Disk Space (Ubuntu)
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
# Only meaningful on GitHub's throwaway VMs. On a persistent self-hosted runner this
|
||||||
|
# would delete dotnet/haskell/docker images from the host on every run.
|
||||||
|
if: runner.environment == 'github-hosted'
|
||||||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
with:
|
with:
|
||||||
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
|||||||
Reference in New Issue
Block a user