From 4aa4b5f928c1e18188bbe559f065a66924485991 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sat, 25 Jan 2020 02:27:13 +0900 Subject: [PATCH] Tweak caches (#1319) * Try to use `cargo-cache` * Tweak issue template --- .github/ISSUE_TEMPLATE/bug_report.md | 7 ++++++- .github/workflows/bench.yml | 11 ++++++++--- .github/workflows/macos.yml | 11 ++++++++--- .github/workflows/windows.yml | 11 ++++++++--- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 0c4e6c1c..128f51ff 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,3 +1,8 @@ +--- +name: bug report +about: create a bug report +--- + Your issue may already be reported! Please search on the [Actix Web issue tracker](https://github.com/actix/actix-web/issues) before creating one. @@ -29,4 +34,4 @@ Please search on the [Actix Web issue tracker](https://github.com/actix/actix-we * Rust Version (I.e, output of `rustc -V`): -* Actix Web Version: \ No newline at end of file +* Actix Web Version: diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 3c9deb49..08bb81d4 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -24,19 +24,24 @@ jobs: uses: actions/cache@v1 with: path: ~/.cargo/registry - key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-registry-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index uses: actions/cache@v1 with: path: ~/.cargo/git - key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-index-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build uses: actions/cache@v1 with: path: target - key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-build-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Check benchmark uses: actions-rs/cargo@v1 with: command: bench + + - name: Clear the cargo caches + run: | + cargo install cargo-cache --no-default-features --features ci-autoclean + cargo-cache diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d30d6b3e..397236a2 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -32,17 +32,17 @@ jobs: uses: actions/cache@v1 with: path: ~/.cargo/registry - key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index uses: actions/cache@v1 with: path: ~/.cargo/git - key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-index-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build uses: actions/cache@v1 with: path: target - key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-build-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: check build uses: actions-rs/cargo@v1 @@ -57,3 +57,8 @@ jobs: args: --all --all-features --no-fail-fast -- --nocapture --skip=test_h2_content_length --skip=test_reading_deflate_encoding_large_random_rustls + + - name: Clear the cargo caches + run: | + cargo install cargo-cache --no-default-features --features ci-autoclean + cargo-cache diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 06f5af82..fed4ce03 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -35,17 +35,17 @@ jobs: uses: actions/cache@v1 with: path: ~/.cargo/registry - key: ${{ matrix.version }}-x86_64-pc-windows-msvc-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.version }}-x86_64-pc-windows-msvc-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index uses: actions/cache@v1 with: path: ~/.cargo/git - key: ${{ matrix.version }}-x86_64-pc-windows-msvc-cargo-index-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.version }}-x86_64-pc-windows-msvc-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build uses: actions/cache@v1 with: path: target - key: ${{ matrix.version }}-x86_64-pc-windows-msvc-cargo-build-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.version }}-x86_64-pc-windows-msvc-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Install OpenSSL run: | @@ -74,3 +74,8 @@ jobs: --skip=test_expect_continue --skip=test_http10_keepalive --skip=test_slow_request + + - name: Clear the cargo caches + run: | + cargo install cargo-cache --no-default-features --features ci-autoclean + cargo-cache