From 48e8f0479b090cb760b207686e6ce0a8a9f3c18c Mon Sep 17 00:00:00 2001 From: Swen van Zanten Date: Mon, 5 Jul 2021 11:46:48 +0200 Subject: [PATCH] update cache handeling --- .github/workflows/android.yml | 10 ++++++++-- .github/workflows/ios.yml | 15 +++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 4833e98..4cd88d8 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -12,8 +12,14 @@ jobs: - name: Cache modules uses: actions/cache@v2 with: - path: ${{ github.workspace }}/node_modules - key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} + path: | + ${{ github.workspace }}/node_modules + ${{ github.workspace }}/android/.gradle/caches + ${{ github.workspace }}/android/.gradle/wrapper + key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', '**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-yarn- + ${{ runner.os }}-gradle- - name: Use Node.js uses: actions/setup-node@v2 with: diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 3ccec4b..ac4dd81 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -4,16 +4,23 @@ on: [push, pull_request] jobs: build: - runs-on: macOS-latest + runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v2 + - name: Setup BuildCache + uses: mikehardy/buildcache-action@v1 - name: Cache modules uses: actions/cache@v2 with: - path: ${{ github.workspace }}/node_modules - key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} + path: | + ${{ github.workspace }}/node_modules + ${{ github.workspace }}/ios/Pods + key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', '**/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + ${{ runner.os }}-pods- - name: Use Node.js uses: actions/setup-node@v2 with: @@ -47,7 +54,7 @@ jobs: deploy: if: startsWith(github.ref, 'refs/tags/') needs: build - runs-on: macOS-latest + runs-on: macos-latest steps: - name: Download Release Artifact