Skip to content

Commit

Permalink
Add caching to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sagebind committed Oct 24, 2021
1 parent 2cc2604 commit cdca15c
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,40 @@ jobs:
with:
submodules: true

- run: |
- name: Install system dependencies
run: |
sudo apt update
sudo apt install -y libkrb5-dev
if: matrix.os == 'ubuntu-latest'

- uses: actions-rs/toolchain@v1
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: "1.46.0"
default: true

- run: cargo test --features ${{ env.FEATURES }},spnego,unstable-interceptors
- name: Update Cargo.lock
run: cargo update

- name: Cache Cargo dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-
- name: Run tests
run: cargo test --features ${{ env.FEATURES }},spnego,unstable-interceptors

- run: cargo run --release --example simple
- name: Run example program
run: cargo run --release --example simple

analyze:
runs-on: ubuntu-latest
Expand All @@ -55,6 +75,22 @@ jobs:
components: clippy
default: true

- name: Update Cargo.lock
run: cargo update

- name: Cache Cargo dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-
- name: Check Clippy lints
uses: actions-rs/clippy-check@v1
with:
Expand Down

0 comments on commit cdca15c

Please sign in to comment.