@@ -97,6 +97,27 @@ jobs:
9797 run: |
9898 curl -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz -o stack.tar.gz
9999 tar xzvf stack.tar.gz --strip-components=1 'stack*/stack'
100+
101+ # declare/restore cached things
102+ # caching doesn't work for scheduled runs yet https://github.com/actions/cache/issues/63
103+
104+ - name: Cache stack global package db
105+ id: stack-global
106+ uses: actions/cache@v1
107+ with:
108+ path: ~/.stack
109+ key: ${{ runner.os }}-stack-global-${{ hashFiles('**.yaml') }}
110+ restore-keys: |
111+ ${{ runner.os }}-stack-global
112+ ${{ runner.os }}-stack
113+
114+ # stack's local package db
115+ - name: Cache .stack-work
116+ uses: actions/cache@v1
117+ with:
118+ path: .stack-work
119+ key: ${{ runner.os }}-stack-work
120+
100121 - name: Install dependencies
101122 run: |
102123 ./stack update