Add free disk space action to CI actions (#6212)
* Add free disk space action * Remove 'upload APK for Maestro' step since it's no longer used * Re-enable tool-cache removal * Add the free disk space step to other gradle-related jobs * Use commit SHA * Disable removing `large-packages`
This commit is contained in:
parent
7d412d9461
commit
3a856394f2
10 changed files with 154 additions and 10 deletions
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
|
|
@ -25,6 +25,20 @@ jobs:
|
||||||
group: ${{ github.ref == 'refs/heads/develop' && format('build-develop-{0}-{1}', matrix.variant, github.sha) || format('build-{0}-{1}', matrix.variant, github.ref) }}
|
group: ${{ github.ref == 'refs/heads/develop' && format('build-develop-{0}-{1}', matrix.variant, github.sha) || format('build-{0}-{1}', matrix.variant, github.ref) }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
steps:
|
steps:
|
||||||
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
|
with:
|
||||||
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: true
|
||||||
|
# All of these default to true, but we should only need the 'android' one (and maybe swap-storage?)
|
||||||
|
android: false
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
# This takes way too long to run (~2 minutes) and it saves only ~5.5GB
|
||||||
|
large-packages: false
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
# Ensure we are building the branch and not the branch after being merged on develop
|
# Ensure we are building the branch and not the branch after being merged on develop
|
||||||
|
|
@ -60,16 +74,6 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
app/build/outputs/apk/gplay/debug/*-universal-debug.apk
|
app/build/outputs/apk/gplay/debug/*-universal-debug.apk
|
||||||
app/build/outputs/apk/fdroid/debug/*-universal-debug.apk
|
app/build/outputs/apk/fdroid/debug/*-universal-debug.apk
|
||||||
- name: Upload x86_64 APK for Maestro
|
|
||||||
if: ${{ matrix.variant == 'debug' }}
|
|
||||||
uses: actions/upload-artifact@v6
|
|
||||||
with:
|
|
||||||
name: elementx-apk-maestro
|
|
||||||
path: |
|
|
||||||
app/build/outputs/apk/gplay/debug/app-gplay-x86_64-debug.apk
|
|
||||||
retention-days: 5
|
|
||||||
overwrite: true
|
|
||||||
if-no-files-found: error
|
|
||||||
- uses: rnkdsh/action-upload-diawi@4e1421305be7cfc510d05f47850262eeaf345108 # v1.5.12
|
- uses: rnkdsh/action-upload-diawi@4e1421305be7cfc510d05f47850262eeaf345108 # v1.5.12
|
||||||
id: diawi
|
id: diawi
|
||||||
# Do not fail the whole build if Diawi upload fails
|
# Do not fail the whole build if Diawi upload fails
|
||||||
|
|
|
||||||
14
.github/workflows/build_enterprise.yml
vendored
14
.github/workflows/build_enterprise.yml
vendored
|
|
@ -27,6 +27,20 @@ jobs:
|
||||||
group: ${{ github.ref == 'refs/heads/develop' && format('build-develop-enterprise-{0}-{1}', matrix.variant, github.sha) || format('build-enterprise-{0}-{1}', matrix.variant, github.ref) }}
|
group: ${{ github.ref == 'refs/heads/develop' && format('build-develop-enterprise-{0}-{1}', matrix.variant, github.sha) || format('build-enterprise-{0}-{1}', matrix.variant, github.ref) }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
steps:
|
steps:
|
||||||
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
|
with:
|
||||||
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: true
|
||||||
|
# All of these default to true, but we should only need the 'android' one (and maybe swap-storage?)
|
||||||
|
android: false
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
# This takes way too long to run (~2 minutes) and it saves only ~5.5GB
|
||||||
|
large-packages: false
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
# Ensure we are building the branch and not the branch after being merged on develop
|
# Ensure we are building the branch and not the branch after being merged on develop
|
||||||
|
|
|
||||||
14
.github/workflows/maestro-local.yml
vendored
14
.github/workflows/maestro-local.yml
vendored
|
|
@ -22,6 +22,20 @@ jobs:
|
||||||
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)
|
||||||
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
|
with:
|
||||||
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: true
|
||||||
|
# All of these default to true, but we should only need the 'android' one (and maybe swap-storage?)
|
||||||
|
android: false
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
# This takes way too long to run (~2 minutes) and it saves only ~5.5GB
|
||||||
|
large-packages: false
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
# Ensure we are building the branch and not the branch after being merged on develop
|
# Ensure we are building the branch and not the branch after being merged on develop
|
||||||
|
|
|
||||||
14
.github/workflows/nightly.yml
vendored
14
.github/workflows/nightly.yml
vendored
|
|
@ -16,6 +16,20 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.repository == 'element-hq/element-x-android' }}
|
if: ${{ github.repository == 'element-hq/element-x-android' }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
|
with:
|
||||||
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: true
|
||||||
|
# All of these default to true, but we should only need the 'android' one (and maybe swap-storage?)
|
||||||
|
android: false
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
# This takes way too long to run (~2 minutes) and it saves only ~5.5GB
|
||||||
|
large-packages: false
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- name: Use JDK 21
|
- name: Use JDK 21
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v5
|
||||||
|
|
|
||||||
14
.github/workflows/nightlyReports.yml
vendored
14
.github/workflows/nightlyReports.yml
vendored
|
|
@ -17,6 +17,20 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.repository == 'element-hq/element-x-android' }}
|
if: ${{ github.repository == 'element-hq/element-x-android' }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
|
with:
|
||||||
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: true
|
||||||
|
# All of these default to true, but we should only need the 'android' one (and maybe swap-storage?)
|
||||||
|
android: false
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
# This takes way too long to run (~2 minutes) and it saves only ~5.5GB
|
||||||
|
large-packages: false
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
- name: ⏬ Checkout with LFS
|
- name: ⏬ Checkout with LFS
|
||||||
uses: nschloe/action-cached-lfs-checkout@f46300cd8952454b9f0a21a3d133d4bd5684cfc2 # v1.2.3
|
uses: nschloe/action-cached-lfs-checkout@f46300cd8952454b9f0a21a3d133d4bd5684cfc2 # v1.2.3
|
||||||
|
|
||||||
|
|
|
||||||
14
.github/workflows/quality.yml
vendored
14
.github/workflows/quality.yml
vendored
|
|
@ -17,6 +17,20 @@ jobs:
|
||||||
name: Search for forbidden patterns
|
name: Search for forbidden patterns
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
|
with:
|
||||||
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: true
|
||||||
|
# All of these default to true, but we should only need the 'android' one (and maybe swap-storage?)
|
||||||
|
android: false
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
# This takes way too long to run (~2 minutes) and it saves only ~5.5GB
|
||||||
|
large-packages: false
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- name: Add SSH private keys for submodule repositories
|
- name: Add SSH private keys for submodule repositories
|
||||||
uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
|
uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
|
||||||
|
|
|
||||||
14
.github/workflows/recordScreenshots.yml
vendored
14
.github/workflows/recordScreenshots.yml
vendored
|
|
@ -17,6 +17,20 @@ jobs:
|
||||||
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)
|
||||||
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
|
with:
|
||||||
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: true
|
||||||
|
# All of these default to true, but we should only need the 'android' one (and maybe swap-storage?)
|
||||||
|
android: false
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
# This takes way too long to run (~2 minutes) and it saves only ~5.5GB
|
||||||
|
large-packages: false
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
- name: Remove Record-Screenshots label
|
- name: Remove Record-Screenshots label
|
||||||
if: github.event.label.name == 'Record-Screenshots'
|
if: github.event.label.name == 'Record-Screenshots'
|
||||||
uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0
|
uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0
|
||||||
|
|
|
||||||
28
.github/workflows/release.yml
vendored
28
.github/workflows/release.yml
vendored
|
|
@ -18,6 +18,20 @@ jobs:
|
||||||
group: ${{ format('build-release-main-gplay-{0}', github.sha) }}
|
group: ${{ format('build-release-main-gplay-{0}', github.sha) }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
steps:
|
steps:
|
||||||
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
|
with:
|
||||||
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: true
|
||||||
|
# All of these default to true, but we should only need the 'android' one (and maybe swap-storage?)
|
||||||
|
android: false
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
# This takes way too long to run (~2 minutes) and it saves only ~5.5GB
|
||||||
|
large-packages: false
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- name: Use JDK 21
|
- name: Use JDK 21
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v5
|
||||||
|
|
@ -88,6 +102,20 @@ jobs:
|
||||||
group: ${{ format('build-release-main-fdroid-{0}', github.sha) }}
|
group: ${{ format('build-release-main-fdroid-{0}', github.sha) }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
steps:
|
steps:
|
||||||
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
|
with:
|
||||||
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: true
|
||||||
|
# All of these default to true, but we should only need the 'android' one (and maybe swap-storage?)
|
||||||
|
android: false
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
# This takes way too long to run (~2 minutes) and it saves only ~5.5GB
|
||||||
|
large-packages: false
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- name: Use JDK 21
|
- name: Use JDK 21
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v5
|
||||||
|
|
|
||||||
14
.github/workflows/sonar.yml
vendored
14
.github/workflows/sonar.yml
vendored
|
|
@ -22,6 +22,20 @@ jobs:
|
||||||
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)
|
||||||
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
|
with:
|
||||||
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: true
|
||||||
|
# All of these default to true, but we should only need the 'android' one (and maybe swap-storage?)
|
||||||
|
android: false
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
# This takes way too long to run (~2 minutes) and it saves only ~5.5GB
|
||||||
|
large-packages: false
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
# Ensure we are building the branch and not the branch after being merged on develop
|
# Ensure we are building the branch and not the branch after being merged on develop
|
||||||
|
|
|
||||||
14
.github/workflows/tests.yml
vendored
14
.github/workflows/tests.yml
vendored
|
|
@ -22,6 +22,20 @@ jobs:
|
||||||
group: ${{ github.ref == 'refs/heads/main' && format('unit-tests-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('unit-tests-develop-{0}', github.sha) || format('unit-tests-{0}', github.ref) }}
|
group: ${{ github.ref == 'refs/heads/main' && format('unit-tests-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('unit-tests-develop-{0}', github.sha) || format('unit-tests-{0}', github.ref) }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
steps:
|
steps:
|
||||||
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
|
||||||
|
with:
|
||||||
|
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: true
|
||||||
|
# All of these default to true, but we should only need the 'android' one (and maybe swap-storage?)
|
||||||
|
android: false
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
# This takes way too long to run (~2 minutes) and it saves only ~5.5GB
|
||||||
|
large-packages: false
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
# Increase swapfile size to prevent screenshot tests getting terminated
|
# Increase swapfile size to prevent screenshot tests getting terminated
|
||||||
# https://github.com/actions/runner-images/discussions/7188#discussioncomment-6750749
|
# https://github.com/actions/runner-images/discussions/7188#discussioncomment-6750749
|
||||||
- name: 💽 Increase swapfile size
|
- name: 💽 Increase swapfile size
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue