Skip to content

Commit

Permalink
feat: cache cargo files
Browse files Browse the repository at this point in the history
  • Loading branch information
jebrosen committed Dec 14, 2024
1 parent 364923f commit b839bc9
Show file tree
Hide file tree
Showing 3 changed files with 1,234 additions and 691 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,37 @@ on:
branches: [ "main" ]

env:
CARGO_HOME: ${{ github.workspace }}/.cargohome
CARGO_TERM_COLOR: always

jobs:
rocket_oauth2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
path:
- ${{ env.CARGO_HOME }}/registry/index/
- ${{ env.CARGO_HOME }}/registry/cache/
- ${{ env.CARGO_HOME }}/git/db/
- name: Build
run: cargo build --workspace
- name: Run tests
run: cargo test --workspace

rocket_tls_compat_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
path:
- ${{ env.CARGO_HOME }}/registry/index/
- ${{ env.CARGO_HOME }}/registry/cache/
- ${{ env.CARGO_HOME }}/git/db/
- name: Build
run: cd rocket_tls_compat_check && cargo build --workspace
- name: Run tests
Expand Down
Loading

0 comments on commit b839bc9

Please sign in to comment.