Cache for the deploying pipeline

This commit is contained in:
Mingshen Sun 2020-12-30 15:17:42 -08:00
parent 0fd520452e
commit a8aae6d539

View file

@ -13,16 +13,49 @@ jobs:
channel: ['beta', 'release'] channel: ['beta', 'release']
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install packages - name: Installing packages
run: | run: |
brew install libtool automake cmake carthage go@1.14 swiftlint swiftformat brew install libtool automake cmake carthage go@1.14 swiftlint swiftformat
gem install bundler gem install bundler
- name: Prepare dependencies - uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: actions/cache@v2
id: carthage-cache
with:
path: Carthage
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
restore-keys: |
${{ runner.os }}-carthage-
- uses: actions/cache@v2
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- uses: actions/cache@v2
id: gopenpgp-cache
with:
path: go
key: ${{ runner.os }}-gopenpgp-${{ hashFiles('**/gopenpgp_build.sh') }}
restore-keys: |
${{ runner.os }}-gopenpgp-
- name: Bundle Install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Cocoapods
run: bundle exec pod install
- name: Carthage
if: steps.carthage-cache.outputs.cache-hit != 'true'
run: ./scripts/wcarthage bootstrap --platform iOS --no-use-binaries --cache-builds
- name: GopenPGP
if: steps.gopenpgp-cache.outputs.cache-hit != 'true'
run: | run: |
export PATH="/usr/local/opt/go@1.14/bin:$PATH" export PATH="/usr/local/opt/go@1.14/bin:$PATH"
bundle install
bundle exec pod install
./scripts/wcarthage bootstrap --platform iOS
./scripts/gopenpgp_build.sh ./scripts/gopenpgp_build.sh
- name: Test - name: Test
run: bundle exec fastlane test run: bundle exec fastlane test