use build cache on macos and windows too

This commit is contained in:
Rob Ede 2020-12-27 22:08:22 +00:00
parent cf7974ada5
commit 63b5da0450
No known key found for this signature in database
GPG Key ID: C2A3B36E841A91E6
3 changed files with 50 additions and 1 deletions

View File

@ -42,7 +42,6 @@ jobs:
~/.cargo/git ~/.cargo/git
~/.cargo/bin ~/.cargo/bin
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-trimmed-${{ hashFiles('**/Cargo.lock') }} key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build - name: Cache cargo build
uses: actions/cache@v2 uses: actions/cache@v2
with: with:

View File

@ -29,6 +29,24 @@ jobs:
profile: minimal profile: minimal
override: true override: true
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
- name: Cache cargo dirs
uses: actions/cache@v2
with:
path:
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: check build - name: check build
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
@ -42,3 +60,10 @@ jobs:
args: --all --all-features --no-fail-fast -- --nocapture args: --all --all-features --no-fail-fast -- --nocapture
--skip=test_h2_content_length --skip=test_h2_content_length
--skip=test_reading_deflate_encoding_large_random_rustls --skip=test_reading_deflate_encoding_large_random_rustls
- name: Clear the cargo caches
run: |
rustup update stable
rustup override set stable
cargo install cargo-cache --no-default-features --features ci-autoclean
cargo-cache

View File

@ -41,6 +41,24 @@ jobs:
Get-ChildItem C:\vcpkg\installed\x64-windows\bin Get-ChildItem C:\vcpkg\installed\x64-windows\bin
Get-ChildItem C:\vcpkg\installed\x64-windows\lib Get-ChildItem C:\vcpkg\installed\x64-windows\lib
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
- name: Cache cargo dirs
uses: actions/cache@v2
with:
path:
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }}
- name: check build - name: check build
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
@ -62,3 +80,10 @@ jobs:
--skip=test_connection_force_close --skip=test_connection_force_close
--skip=test_connection_server_close --skip=test_connection_server_close
--skip=test_connection_wait_queue_force_close --skip=test_connection_wait_queue_force_close
- name: Clear the cargo caches
run: |
rustup update stable
rustup override set stable
cargo install cargo-cache --no-default-features --features ci-autoclean
cargo-cache