Merge pull request #645 from TaKO8Ki/add-step-for-caching

Speed up CI workflows
This commit is contained in:
Dongdong Zhou 2022-06-20 08:50:49 +01:00 committed by GitHub
commit 0c8ac37bdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -27,6 +27,8 @@ jobs:
profile: minimal
toolchain: ${{ matrix.toolchain }}
- uses: Swatinem/rust-cache@v1
- name: Build
uses: actions-rs/cargo@v1
with:
@ -48,6 +50,7 @@ jobs:
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: fmt
@ -66,6 +69,7 @@ jobs:
- run: rustup component add clippy
- name: Install dependencies on Ubuntu
run: sudo apt-get update && sudo apt-get install cmake pkg-config libgtk-3-dev
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: clippy

View File

@ -27,6 +27,8 @@ jobs:
profile: minimal
toolchain: ${{ matrix.toolchain }}
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: test
@ -43,6 +45,7 @@ jobs:
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: fmt