From e05d0a627ad6e4387984b889a525d09c7ea7bea1 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 12 Apr 2020 15:27:30 -0700 Subject: Add caching for macOS CI build. --- .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 221d1a245..33d52d9ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,6 +97,27 @@ jobs: run: | curl -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz -o stack.tar.gz tar xzvf stack.tar.gz --strip-components=1 'stack*/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 + uses: actions/cache@v1 + with: + path: ~/.stack + key: ${{ runner.os }}-stack-global-${{ hashFiles('**.yaml') }} + restore-keys: | + ${{ runner.os }}-stack-global + ${{ runner.os }}-stack + + # stack's local package db + - name: Cache .stack-work + uses: actions/cache@v1 + with: + path: .stack-work + key: ${{ runner.os }}-stack-work + - name: Install dependencies run: | ./stack update -- cgit v1.2.3