Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caching to CI #358

Merged
merged 1 commit into from
Oct 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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