aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-05-23 04:48:00 +0000
committerBlaž Hrastnik2022-05-23 04:48:00 +0000
commit35303f749e3e918b76bcf3f01223da6e27c77f34 (patch)
tree4ebd90e4ece85ac6c2e03e99a4f9f7bb49eb0c02 /.github
parent6801b28da0539bceb342e99a709961ec70148dbb (diff)
Replace handwritten CI cache with Swatinem/rust-cache
The cache kept growing as dependencies kept changing and updating.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml84
-rw-r--r--.github/workflows/release.yml21
2 files changed, 5 insertions, 100 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 69d88f83..c4594cfa 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -22,26 +22,7 @@ jobs:
toolchain: stable
override: true
- - name: Cache cargo registry
- uses: actions/cache@v3
- with:
- path: ~/.cargo/registry
- key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-registry-
-
- - name: Cache cargo index
- uses: actions/cache@v3
- with:
- path: ~/.cargo/git
- key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-index-
-
- - name: Cache cargo target dir
- uses: actions/cache@v3
- with:
- path: target
- key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-build-target-
+ - uses: Swatinem/rust-cache@v1
- name: Run cargo check
uses: actions-rs/cargo@v1
@@ -62,26 +43,7 @@ jobs:
toolchain: ${{ matrix.rust }}
override: true
- - name: Cache cargo registry
- uses: actions/cache@v3
- with:
- path: ~/.cargo/registry
- key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-registry-
-
- - name: Cache cargo index
- uses: actions/cache@v3
- with:
- path: ~/.cargo/git
- key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-index-
-
- - name: Cache cargo target dir
- uses: actions/cache@v3
- with:
- path: target
- key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-build-target-
+ - uses: Swatinem/rust-cache@v1
- name: Copy minimal languages config
run: cp .github/workflows/languages.toml ./languages.toml
@@ -119,26 +81,7 @@ jobs:
override: true
components: rustfmt, clippy
- - name: Cache cargo registry
- uses: actions/cache@v3
- with:
- path: ~/.cargo/registry
- key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-registry-
-
- - name: Cache cargo index
- uses: actions/cache@v3
- with:
- path: ~/.cargo/git
- key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-index-
-
- - name: Cache cargo target dir
- uses: actions/cache@v3
- with:
- path: target
- key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-build-target-
+ - uses: Swatinem/rust-cache@v1
- name: Run cargo fmt
uses: actions-rs/cargo@v1
@@ -166,26 +109,7 @@ jobs:
toolchain: stable
override: true
- - name: Cache cargo registry
- uses: actions/cache@v3
- with:
- path: ~/.cargo/registry
- key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-registry-
-
- - name: Cache cargo index
- uses: actions/cache@v3
- with:
- path: ~/.cargo/git
- key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-index-
-
- - name: Cache cargo target dir
- uses: actions/cache@v3
- with:
- path: target
- key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-build-target-
+ - uses: Swatinem/rust-cache@v1
- name: Generate docs
uses: actions-rs/cargo@v1
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 30f8ccc7..d6bb52ce 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -20,26 +20,7 @@ jobs:
toolchain: stable
override: true
- - name: Cache cargo registry
- uses: actions/cache@v3
- with:
- path: ~/.cargo/registry
- key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-registry-
-
- - name: Cache cargo index
- uses: actions/cache@v3
- with:
- path: ~/.cargo/git
- key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-index-
-
- - name: Cache cargo target dir
- uses: actions/cache@v3
- with:
- path: target
- key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- restore-keys: ${{ runner.os }}-v2-cargo-build-target-
+ - uses: Swatinem/rust-cache@v1
- name: Fetch tree-sitter grammars
uses: actions-rs/cargo@v1