From f6fcf35cf8a3e36e6027ce494966774a10926db4 Mon Sep 17 00:00:00 2001 From: Antoine Piron Date: Wed, 10 Jun 2026 10:29:06 +0200 Subject: [PATCH] fix(ci): add caching + remove unnecessary expo-cli install to fix 30m timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Cache pnpm store, Android NDK (28.2.13676358, ~1.5 GB), and Gradle - Skip sdkmanager NDK install on cache hit - Remove global expo-cli install (already in devDeps as @expo/cli) - Increase timeout 30m → 60m for first cold build Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release.yml | 40 ++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5598734..cda7357 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: jobs: build: runs-on: ubuntu-latest - timeout-minutes: 30 + timeout-minutes: 60 steps: - uses: actions/checkout@v4 @@ -27,22 +27,52 @@ jobs: with: version: 9 + - name: Get pnpm store path + id: pnpm-cache + shell: bash + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT + + - name: Cache pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + - name: Install dependencies working-directory: artifacts/postiz-mobile run: pnpm install --no-frozen-lockfile - - name: Install Expo CLI - run: pnpm add -g expo-cli@latest || true - - name: Set up Android SDK uses: android-actions/setup-android@v3 - name: Accept Android SDK licenses run: yes | sdkmanager --licenses || true + - name: Cache Android NDK + id: ndk-cache + uses: actions/cache@v4 + with: + path: /usr/local/lib/android/sdk/ndk/28.2.13676358 + key: ndk-28.2.13676358-v1 + - name: Install SDK components run: | - sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0" "ndk;28.2.13676358" + sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0" + if [ "${{ steps.ndk-cache.outputs.cache-hit }}" != "true" ]; then + sdkmanager "ndk;28.2.13676358" + fi + + - name: Cache Gradle + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('artifacts/postiz-mobile/package.json') }} + restore-keys: | + ${{ runner.os }}-gradle- - name: Decode keystore run: |