Improve caching further

This commit is contained in:
lcdr
2020-07-10 16:47:06 +02:00
parent a8fc202278
commit 57143cccbb
3 changed files with 31 additions and 16 deletions
+13 -5
View File
@@ -10,14 +10,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cache dependencies
- name: Cache toolchain
uses: actions/cache@v2
with:
path: |
~/.rustup
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: toolchain-${{ hashFiles('rust-toolchain') }}
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
@@ -25,13 +23,23 @@ jobs:
profile: minimal
toolchain: nightly
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: deps-${{ hashFiles('**/Cargo.lock') }}
- name: Cache build
uses: actions/cache@v2
with:
path: |
target/.rustc_info.json
target/debug
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: target-${{ github.workflow }}-${{ github.run_number }}
restore-keys: |
target-${{ github.workflow }}-${{ github.run_number-1 }}
- name: Compile
uses: actions-rs/cargo@v1
+17 -10
View File
@@ -10,14 +10,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cache dependencies
- name: Cache toolchain
uses: actions/cache@v2
with:
path: |
~/.rustup
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: toolchain-${{ hashFiles('rust-toolchain') }}
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
@@ -25,20 +23,32 @@ jobs:
profile: minimal
toolchain: nightly
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: deps-${{ hashFiles('**/Cargo.lock') }}
- name: Cache build
uses: actions/cache@v2
with:
path: |
target/.rustc_info.json
target/debug
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: target-${{ github.workflow }}-${{ github.run_number }}
restore-keys: |
target-${{ github.workflow }}-${{ github.run_number-1 }}
- name: Cache docs
uses: actions/cache@v2
with:
path: |
target/doc
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: target-doc-${{ github.workflow }}-${{ github.run_number }}
restore-keys: |
target-doc-${{ github.workflow }}-${{ github.run_number-1 }}
- name: Generate documentation
uses: actions-rs/cargo@v1
@@ -47,10 +57,7 @@ jobs:
args: --no-deps
- name: Create .nojekyll file
uses: finnp/create-file-action@master
env:
FILE_NAME: "target/doc/.nojekyll"
FILE_DATA: ""
run: touch target/doc/.nojekyll
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@releases/v3
+1 -1
View File
@@ -1 +1 @@
nightly
nightly-2020-05-30