Skip to content

Commit

Permalink
BIT-58: Add Github Actions workflow for caching dependencies (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-livefront authored Sep 15, 2023
1 parent a463db7 commit 6d0e4dd
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/cache-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Cache Dependencies

on:
push:
branches:
- main

env:
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
MINT_LINK_PATH: .mint/bin
MINT_PATH: .mint/lib

jobs:
cache-dependencies:
name: Cache Dependencies
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- name: Setup Ruby
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
with:
bundler-cache: true
ruby-version: 3.2.2

- name: Cache Mint Packages
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: .mint
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
restore-keys: |
${{ runner.os }}-mint-
- name: Cache SPM Packages
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: build/DerivedData/SourcePackages
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Setup
run: |
brew install mint xcbeautify
./Scripts/bootstrap.sh
- name: Update Xcode Dependencies
run: |
set -o pipefail && \
xcodebuild -resolvePackageDependencies \
-project Bitwarden.xcodeproj \
-clonedSourcePackagesDirPath build/DerivedData/SourcePackages

0 comments on commit 6d0e4dd

Please sign in to comment.