ci: optimize Android NDK installation and switch to ubuntu-latest runner

This commit is contained in:
Gemini CLI
2026-05-17 19:39:46 +02:00
parent 146baa50ea
commit f93198c0ca
2 changed files with 9 additions and 5 deletions
+4 -4
View File
@@ -8,7 +8,7 @@ on:
jobs:
check:
name: Full Project Check
runs-on: codeberg-small
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
@@ -36,7 +36,7 @@ jobs:
build-linux:
name: Build Linux Release
runs-on: codeberg-small
runs-on: ubuntu-latest
needs: check
if: github.ref == 'refs/heads/main'
timeout-minutes: 60
@@ -71,7 +71,7 @@ jobs:
deploy-playstore:
name: Build & Deploy to Play Store
runs-on: codeberg-small
runs-on: ubuntu-latest
needs: check
if: github.ref == 'refs/heads/main'
timeout-minutes: 60
@@ -113,7 +113,7 @@ jobs:
publish-website:
name: Publish Website Build History
runs-on: codeberg-small
runs-on: ubuntu-latest
needs: [build-linux, deploy-playstore]
if: |
always() &&
+5 -1
View File
@@ -42,10 +42,14 @@ func (m *Ci) Base() *dagger.Container {
return dag.Container().
From("ghcr.io/cirruslabs/flutter:3.41.6").
WithExec([]string{"apt-get", "update"}).
WithExec([]string{"apt-get", "install", "-y", "clang", "cmake", "ninja-build", "pkg-config", "libgtk-3-dev", "liblzma-dev", "libsecret-1-dev", "libgcrypt20-dev", "libjsoncpp-dev", "sqlite3", "curl", "python3", "iproute2", "netcat-openbsd", "xvfb", "libosmesa6", "libegl1", "lld", "git"}).
// Only install missing dependencies. git, curl, python3 are already in the image.
WithExec([]string{"apt-get", "install", "-y", "clang", "cmake", "ninja-build", "pkg-config", "libgtk-3-dev", "liblzma-dev", "libsecret-1-dev", "libgcrypt20-dev", "libjsoncpp-dev", "sqlite3", "iproute2", "netcat-openbsd", "xvfb", "libosmesa6", "libegl1", "lld"}).
WithMountedCache("/root/.pub-cache", dag.CacheVolume("flutter-pub-cache")).
WithMountedCache("/root/.gradle", dag.CacheVolume("gradle-cache")).
WithMountedCache("/opt/android-sdk-linux/ndk", dag.CacheVolume("android-ndk-cache")).
WithEnvVariable("PUB_CACHE", "/root/.pub-cache").
// Pre-install NDK to avoid slow downloads during the actual build
WithExec([]string{"/bin/sh", "-c", "if [ ! -d /opt/android-sdk-linux/ndk/28.2.13676358 ]; then yes | sdkmanager \"ndk;28.2.13676358\"; fi"}).
WithDirectory("/src", m.Source).
WithWorkdir("/src")
}