From f420e6cc0b63b755bc0c4daf0866ef4b09c3d40b Mon Sep 17 00:00:00 2001 From: Noah <33094578+coolreader18@users.noreply.github.com> Date: Fri, 31 Jan 2020 12:23:46 -0600 Subject: [PATCH 1/2] Cache Cargo dependencies in Github Actions --- .github/workflows/ci.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c92450389c..e2dcb7e788 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,6 +18,13 @@ jobs: - name: Convert symlinks to hardlink (windows only) run: powershell.exe scripts/symlinks-to-hardlinks.ps1 if: matrix.os == 'windows-latest' + - name: Cache cargo dependencies + uses: actions/cache@v1 + with: + key: ${{ runner.os }}-rust_tests-${{ hashFiles('Cargo.lock') }} + path: target + restore-keys: | + ${{ runner.os }}-rust_tests- - name: run rust tests uses: actions-rs/cargo@v1 with: @@ -36,6 +43,13 @@ jobs: - name: Convert symlinks to hardlink (windows only) run: powershell.exe scripts/symlinks-to-hardlinks.ps1 if: matrix.os == 'windows-latest' + - name: Cache cargo dependencies + uses: actions/cache@v1 + with: + key: ${{ runner.os }}-snippets-${{ hashFiles('Cargo.lock') }} + path: target + restore-keys: | + ${{ runner.os }}-snippets- - name: build rustpython uses: actions-rs/cargo@v1 with: From 5d2ddc76f300cc4ec148a386d03708129cc72f20 Mon Sep 17 00:00:00 2001 From: Noah <33094578+coolreader18@users.noreply.github.com> Date: Fri, 31 Jan 2020 21:16:26 -0600 Subject: [PATCH 2/2] Check runner.os instead of matrix.os --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e2dcb7e788..8c8f92252b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@master - name: Convert symlinks to hardlink (windows only) run: powershell.exe scripts/symlinks-to-hardlinks.ps1 - if: matrix.os == 'windows-latest' + if: runner.os == 'Windows' - name: Cache cargo dependencies uses: actions/cache@v1 with: @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@master - name: Convert symlinks to hardlink (windows only) run: powershell.exe scripts/symlinks-to-hardlinks.ps1 - if: matrix.os == 'windows-latest' + if: runner.os == 'Windows' - name: Cache cargo dependencies uses: actions/cache@v1 with: