Merge pull request #1295 from MessageKit/fixCache

Fix caching for CI #trivial
This commit is contained in:
Austin Wright
2020-03-20 10:15:39 -04:00
committed by GitHub
4 changed files with 22 additions and 12 deletions
+10 -6
View File
@@ -13,15 +13,19 @@ jobs:
uses: actions/cache@v1
with:
path: Example/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Example/Podfile.lock') }}
key: ${{ runner.os }}-example-${{ env.cache-name }}-pods-${{ hashFiles('**/Example/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Cache SPM
${{ runner.os }}-example-${{ env.cache-name }}-pods-
${{ runner.os }}-example-${{ env.cache-name }}-
${{ runner.os }}-example-
- name: Cache Gems
uses: actions/cache@v1
with:
path: .build
key: ${{ runner.os }}-gems-${{ hashFiles('**/Example/Gemfile.lock') }}
path: vendor/bundle
key: ${{ runner.os }}-example-${{ env.cache-name }}-gems-${{ hashFiles('**/Example/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
${{ runner.os }}-example-${{ env.cache-name }}-gems-
${{ runner.os }}-example-${{ env.cache-name }}-
${{ runner.os }}-example-
- name: Build and run example project
run: ./GitHubActions/build.sh example
+4 -2
View File
@@ -13,8 +13,10 @@ jobs:
uses: actions/cache@v1
with:
path: Carthage
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
key: ${{ runner.os }}-framework-${{ env.cache-name }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
restore-keys: |
${{ runner.os }}-carthage-
${{ runner.os }}-framework-${{ env.cache-name }}-carthage-
${{ runner.os }}-framework-${{ env.cache-name }}-
${{ runner.os }}-framework-
- name: Build framework
run: ./GitHubActions/build.sh framework
+4 -2
View File
@@ -13,8 +13,10 @@ jobs:
uses: actions/cache@v1
with:
path: Carthage
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
key: ${{ runner.os }}-tests-${{ env.cache-name }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
restore-keys: |
${{ runner.os }}-carthage-
${{ runner.os }}-tests-${{ env.cache-name }}-carthage-
${{ runner.os }}-tests-${{ env.cache-name }}-
${{ runner.os }}-tests-
- name: Build and run tests
run: ./GitHubActions/build.sh tests
+4 -2
View File
@@ -13,9 +13,11 @@ jobs:
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
key: ${{ runner.os }}-danger-${{ env.cache-name }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
${{ runner.os }}-danger-${{ env.cache-name }}-gems-
${{ runner.os }}-danger-${{ env.cache-name }}-
${{ runner.os }}-danger-
- name: Run build script
run: gem install bundler && bundle install && bundle exec danger --fail-on-errors=true
env: