From fb7f7ec1d99f4e7a4b0f3d2731faa47625ba9908 Mon Sep 17 00:00:00 2001 From: Oscar Franco Date: Sun, 22 Dec 2024 12:17:25 +0100 Subject: [PATCH] Get rid of turbo cache steps --- .github/workflows/ci.yml | 186 --------------------------------------- 1 file changed, 186 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f57c63..220d12c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,66 +14,6 @@ jobs: - name: Typecheck files run: yarn typecheck - # build-android: - # runs-on: ubuntu-latest - # env: - # TURBO_CACHE_DIR: .turbo/android - # steps: - # - name: Checkout - # uses: actions/checkout@v4 - - # - name: Turn off addons - # run: | - # node ./scripts/turnOffEverything.js - - # - name: Setup - # uses: ./.github/actions/setup - - # - name: Cache turborepo for Android - # uses: actions/cache@v4 - # with: - # path: ${{ env.TURBO_CACHE_DIR }} - # key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }} - # restore-keys: | - # ${{ runner.os }}-turborepo-android- - - # - name: Check turborepo cache for Android - # run: | - # TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:android:release --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:android:release').cache.status") - - # if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - # echo "turbo_cache_hit=1" >> $GITHUB_ENV - # fi - - # - name: Install JDK - # if: env.turbo_cache_hit != 1 - # uses: actions/setup-java@v3 - # with: - # distribution: 'zulu' - # java-version: '17' - - # - name: Finalize Android SDK - # if: env.turbo_cache_hit != 1 - # run: | - # /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null" - - # - name: Cache Gradle - # if: env.turbo_cache_hit != 1 - # uses: actions/cache@v4 - # with: - # path: | - # ~/.gradle/wrapper - # ~/.gradle/caches - # key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }} - # restore-keys: | - # ${{ runner.os }}-gradle- - - # - name: Build example for Android - # env: - # JAVA_OPTS: '-XX:MaxHeapSize=6g' - # run: | - # yarn turbo run run:android:release --cache-dir="${{ env.TURBO_CACHE_DIR }}" - test-android: runs-on: ubuntu-latest env: @@ -89,22 +29,6 @@ jobs: - name: Setup uses: ./.github/actions/setup - - name: Cache turborepo for Android - uses: actions/cache@v4 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-android- - - - name: Check turborepo cache for Android - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:android:release --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:android:release').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - name: Install JDK if: env.turbo_cache_hit != 1 uses: actions/setup-java@v3 @@ -146,13 +70,6 @@ jobs: adb wait-for-device adb shell input keyevent 82 ./scripts/test-android.sh - - # - name: Build example for Android - # env: - # JAVA_OPTS: '-XX:MaxHeapSize=6g' - # run: | - # yarn turbo run android --cache-dir="${{ env.TURBO_CACHE_DIR }}" - test-ios: runs-on: macos-latest env: @@ -173,22 +90,6 @@ jobs: cd example bundle install - - name: Cache turborepo for iOS - uses: actions/cache@v4 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-ios- - - - name: Check turborepo cache for iOS - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:ios').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - name: Cache cocoapods if: env.turbo_cache_hit != 1 id: cocoapods-cache @@ -201,17 +102,12 @@ jobs: ${{ runner.os }}-cocoapods- - name: Install cocoapods - # if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' run: | cd example/ios bundle exec pod install env: NO_FLIPPER: 1 - # - name: Build example for iOS - # run: | - # yarn turbo run run:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" - - name: run tests run: | ./scripts/test-ios.sh @@ -236,22 +132,6 @@ jobs: cd example bundle install - - name: Cache turborepo for iOS - uses: actions/cache@v4 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-ios- - - - name: Check turborepo cache for iOS - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:ios').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - name: Cache cocoapods if: env.turbo_cache_hit != 1 id: cocoapods-cache @@ -264,7 +144,6 @@ jobs: ${{ runner.os }}-cocoapods- - name: Install cocoapods - # if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' run: | cd example/ios bundle exec pod install @@ -295,22 +174,6 @@ jobs: cd example bundle install - - name: Cache turborepo for iOS - uses: actions/cache@v4 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-ios- - - - name: Check turborepo cache for iOS - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:ios').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - name: Cache cocoapods if: env.turbo_cache_hit != 1 id: cocoapods-cache @@ -353,22 +216,6 @@ jobs: cd example bundle install - - name: Cache turborepo for iOS - uses: actions/cache@v4 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-ios- - - - name: Check turborepo cache for iOS - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:ios').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - name: Cache cocoapods if: env.turbo_cache_hit != 1 id: cocoapods-cache @@ -381,7 +228,6 @@ jobs: ${{ runner.os }}-cocoapods- - name: Install cocoapods - # if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' run: | cd example/ios bundle exec pod install @@ -407,22 +253,6 @@ jobs: - name: Setup uses: ./.github/actions/setup - - name: Cache turborepo for Android - uses: actions/cache@v4 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-android- - - - name: Check turborepo cache for Android - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:android:release --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:android:release').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - name: Install JDK if: env.turbo_cache_hit != 1 uses: actions/setup-java@v3 @@ -477,22 +307,6 @@ jobs: - name: Setup uses: ./.github/actions/setup - - name: Cache turborepo for Android - uses: actions/cache@v4 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-android- - - - name: Check turborepo cache for Android - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:android:release --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:android:release').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - name: Install JDK if: env.turbo_cache_hit != 1 uses: actions/setup-java@v3