From 4219ab958325aca3e28b82335aea48f0494fd6c5 Mon Sep 17 00:00:00 2001 From: trivernis Date: Wed, 11 Nov 2020 17:37:19 +0100 Subject: [PATCH] Add arch to cache key and fix artifact path Signed-off-by: trivernis --- .github/workflows/rust.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 657b8d1..740593f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,10 +22,11 @@ jobs: target/**/build target/**/deps target/**/incremental - key: ${{ runner.os }}-build-${{ hashFiles('Cargo.lock') }} + ~/.cargo/ + key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} restore-keys: | - ${{ runner.os }}-build-${{ hashFiles('Cargo.lock') }} - ${{ runner.os }}-build- + ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} + ${{ runner.os }}-cargo- - name: Build run: cargo build --verbose - name: Run tests @@ -55,8 +56,9 @@ jobs: target/**/deps target/**/incremental ~/.cargo/ - key: ${{ runner.os }}-cargo-${{ github.sha }} + key: ${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('Cargo.lock') }} restore-keys: | + ${{ runner.os }}-cargo-${{ matrix.target }}- ${{ runner.os }}-cargo- - name: Build Release uses: actions-rs/cargo@v1 @@ -68,4 +70,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: snekcloud-server-${{ matrix.target }} - path: target/${{ matrix.target }}/snekcloud-server \ No newline at end of file + path: target/${{ matrix.target }}/release/snekcloud-server \ No newline at end of file