feat(ci): add persistent caching for Gradle, Pub, and Android SDK components

This commit is contained in:
streaper2
2026-08-26 22:53:40 +02:00
parent a2f7bfc158
commit 7f1fa2d80b
+10 -3
View File
@@ -19,12 +19,19 @@ jobs:
git config --global --add safe.directory "*"
git clone --depth 1 "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@git.kevlar.cloud/${{ github.repository }}.git" /data/build
- name: 🔨 Compilation de l'APK (Conteneur Flutter / Android SDK)
- name: 🔨 Compilation de l'APK (Conteneur Flutter / Android SDK avec Caches)
run: |
echo "🚀 Démarrage de la compilation Flutter dans Docker..."
# Utilisation du volume partagé /data du conteneur runner
echo "🚀 Démarrage de la compilation Flutter avec Caches persistants..."
mkdir -p /data/caches/gradle /data/caches/pub /data/caches/android-ndk /data/caches/android-cmake /data/caches/android-platforms
# Montage des caches persistants : Gradle, Pub, NDK, CMake et Plateformes Android
docker run --rm \
--volumes-from gitea-act-runner \
-v /data/caches/gradle:/root/.gradle \
-v /data/caches/pub:/root/.pub-cache \
-v /data/caches/android-ndk:/opt/android-sdk-linux/ndk \
-v /data/caches/android-cmake:/opt/android-sdk-linux/cmake \
-v /data/caches/android-platforms:/opt/android-sdk-linux/platforms \
-w /data/build \
ghcr.io/cirruslabs/flutter:stable \
sh -c "git config --global --add safe.directory '*' && flutter pub get && flutter build apk --release"