git.iko.soy/typeable/pandoc
on master help sign in
Add caching for macOS CI build.
e05d0a6John MacFarlane
.github/workflows/ci.yml+21
@@ -97,6 +97,27 @@ jobs:
97 run: |
97 run: |
98 curl -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz -o stack.tar.gz
98 curl -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz -o stack.tar.gz
99 tar xzvf stack.tar.gz --strip-components=1 'stack*/stack'
99 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+
100 - name: Install dependencies
121 - name: Install dependencies
101 run: |
122 run: |
102 ./stack update
123 ./stack update