mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
ci: rely on the runner image for the Android SDK
Drops the setup-android step from the release job and gates the swapfile resize, which needs a hosted runner image and passwordless sudo.
This commit is contained in:
@@ -183,18 +183,14 @@ jobs:
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
|
||||
# The self-hosted runner image has no Android SDK (unlike GitHub-hosted
|
||||
# ubuntu-latest), so install it here.
|
||||
# - platform: follows COMPILE_SDK in plugins/src/main/kotlin/Versions.kt.
|
||||
# Platform packages are minor-versioned, so compileSdk 37 is android-37.0.
|
||||
# - build-tools: nothing sets buildToolsVersion, so AGP picks its own
|
||||
# default (SdkConstants.CURRENT_BUILD_TOOLS_VERSION). Bump it when AGP is
|
||||
# upgraded, not when Versions.kt changes.
|
||||
- name: Set up Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
with:
|
||||
packages: 'platforms;android-37.0 build-tools;36.0.0'
|
||||
|
||||
# The Android SDK now comes from the self-hosted runner image, so there is no
|
||||
# setup-android step here. The image must provide it AND export ANDROID_HOME to
|
||||
# the job environment — Gradle fails with "SDK location not found" otherwise.
|
||||
# The image also has to carry the platform matching COMPILE_SDK in
|
||||
# plugins/src/main/kotlin/Versions.kt (platform packages are minor-versioned, so
|
||||
# compileSdk 37 means android-37.0) and the build-tools version AGP defaults to
|
||||
# (SdkConstants.CURRENT_BUILD_TOOLS_VERSION), since nothing sets buildToolsVersion
|
||||
# here. Both need refreshing in the image when AGP or COMPILE_SDK moves.
|
||||
- name: Configure gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
|
||||
@@ -48,6 +48,9 @@ jobs:
|
||||
# Increase swapfile size to prevent screenshot tests getting terminated
|
||||
# https://github.com/actions/runner-images/discussions/7188#discussioncomment-6750749
|
||||
- name: 💽 Increase swapfile size
|
||||
# /mnt/swapfile is a GitHub runner-image path and this needs passwordless sudo,
|
||||
# so it only applies to the hosted VMs.
|
||||
if: runner.environment == 'github-hosted'
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo fallocate -l 8G /mnt/swapfile
|
||||
|
||||
Reference in New Issue
Block a user