From 18be04ff6b66b694057fffe2649aeab3b52dd86a Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Sat, 27 Mar 2021 02:20:48 -0500 Subject: [PATCH] move cache up to the front --- .github/workflows/ci.yml | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3bff8f..81acc98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,11 +20,30 @@ jobs: with: toolchain: stable + # Retrieve the cache if there is one + + - uses: actions/cache@v2 + id: cache + with: + path: | + ~/.cargo/registry + ~/.cargo/git + ~/.cargo/bin + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + # Install shit + - name: mdbook uses: peaceiris/actions-mdbook@v1 with: mdbook-version: 'latest' + - name: install-cargo-deb + run: | + cargo install mdbook --version 0.4.7 + cargo install cargo-deb --version 1.29.1 + # Run tests - name: run tests @@ -52,22 +71,10 @@ jobs: - name: build-deb run: | - cargo install cargo-deb cargo deb - uses: actions/upload-artifact@v2 with: name: panorama.deb path: target/debian/panorama*.deb - # Cache massively - - - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - ~/.cargo/bin - target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - # vim: set sw=2 et :