From 984a06dc293207e2f57cd7b7f6a94651fc7480cc Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 12 Apr 2020 15:52:14 -0700 Subject: Add caching for Windows stack CI. --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to '.github') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33d52d9ef..8bd03f42f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,6 +78,27 @@ jobs: shell: cmd run: | choco install haskell-stack + + # declare/restore cached things + # caching doesn't work for scheduled runs yet + # https://github.com/actions/cache/issues/63 + + - name: Cache stack global package db + id: stack-global-package-db + uses: actions/cache@v1 + with: + path: C:\Users\runneradmin\AppData\Roaming\stack\ + key: ${{ runner.os }}-appdata-roaming-stack-${{ hashFiles('**.yaml') }} + restore-keys: ${{ runner.os }}-appdata-roaming-stack + + # stack's local package dbs for the project and each package + - name: Cache .stack-work + uses: actions/cache@v1 + with: + path: .stack-work + key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }} + restore-keys: ${{ runner.os }}-stack-work + - name: Install dependencies run: | stack update -- cgit v1.2.3