Skip to content

Commit

Permalink
ci: fix caching in some CI jobs (#2479)
Browse files Browse the repository at this point in the history
* run the job when trendingmovies sources change or public sentry headers change
* fix: cache keys pointing to hashes of files at invalid paths
  • Loading branch information
armcknight authored Dec 2, 2022
1 parent dd2e101 commit b9c9598
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmarking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
path: |
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app.dSYM
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-${{ hashFiles('Sentry/Sources/**') }}
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-${{ hashFiles('Sources/Sentry/**') }}
- name: Cache iOS-Swift UI Test Runner App build product
id: ios-swift-benchmark-runner-cache
uses: actions/cache@v3
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/profile-data-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ name: Generate Profiling Test Data
on:
schedule:
- cron: '0 */6 * * *' # every 6 hours = 4x/day
pull_request:
paths:
- 'Sources/Sentry/Public/**'
- 'Samples/TrendingMovies/**'

jobs:
build-profile-data-generator-targets:
Expand All @@ -30,7 +34,7 @@ jobs:
path: |
DerivedData/Build/Products/Debug-iphoneos/TrendingMovies.app
DerivedData/Build/Products/Debug-iphoneos/TrendingMovies.app.dSYM
key: trendingmovies-app-cache-key-${{ hashFiles('Samples/TrendingMovies/TrendingMovies/**') }}-${{ hashFiles('Sentry/Sources/**') }}
key: trendingmovies-app-cache-key-${{ hashFiles('Samples/TrendingMovies/TrendingMovies/**') }}-${{ hashFiles('Sources/Sentry/**') }}
- name: Cache ProfileDataGenerator UI Test Runner App build product
id: cache-profiledatagenerator-test-runner-app
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/saucelabs-UI-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
path: |
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app.dSYM
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-Xcode-${{ matrix.xcode }}-${{ hashFiles('Sentry/Sources/**') }}
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-Xcode-${{ matrix.xcode }}-${{ hashFiles('Sources/Sentry/**') }}
- name: Cache iOS-Swift UI Test Runner App build product
id: ios-swift-uitest-runner-cache
uses: actions/cache@v3
Expand Down

0 comments on commit b9c9598

Please sign in to comment.