diff --git a/README.md b/README.md index ccd3b66..11b7970 100644 --- a/README.md +++ b/README.md @@ -57,26 +57,6 @@ jobs: See [Examples](examples.md) -### Rust - Cargo - -``` -- name: Cache cargo registry - uses: actions/cache@preview - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} -- name: Cache cargo index - uses: actions/cache@preview - with: - path: ~/.cargo/git - key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} -- name: Cache cargo build - uses: actions/cache@preview - with: - path: target - key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} -``` - ## Cache Limits Individual caches are limited to 200MB and a repository can have up to 2GB of caches. Once the 2GB limit is reached, older caches will be evicted based on when the cache was last accessed. diff --git a/examples.md b/examples.md index 72779ee..52a68e5 100644 --- a/examples.md +++ b/examples.md @@ -8,6 +8,7 @@ - [Swift, Objective-C - Carthage](#swift-objective-c---carthage) - [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods) - [Ruby - Gem](#ruby---gem) +- [Rust - Cargo](#rust---cargo) ## Node - npm @@ -95,4 +96,24 @@ uses: actions/cache@preview key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gem- -``` \ No newline at end of file +``` + +## Rust - Cargo + +``` +- name: Cache cargo registry + uses: actions/cache@preview + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} +- name: Cache cargo index + uses: actions/cache@preview + with: + path: ~/.cargo/git + key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} +- name: Cache cargo build + uses: actions/cache@preview + with: + path: target + key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} +```