aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorOndřej Čertík <ondrej@certik.us>2020-09-21 09:05:26 -0600
committerGitHub <noreply@github.com>2020-09-21 09:05:26 -0600
commitdb21f136948defe34e3899def604640e9ecfcc86 (patch)
tree9f8d36e02d1a1f8307404a6eed86b383c61733f5 /.github
parent3a698bad1e94d7df4886d9b01d515d63b4d49d53 (diff)
parente754281f54e230bff1bf5b4dee940eb68cea72cc (diff)
downloadfpm-db21f136948defe34e3899def604640e9ecfcc86.tar.gz
fpm-db21f136948defe34e3899def604640e9ecfcc86.zip
Merge pull request #174 from LKedward/ci-caching
Cache Haskell stack build in CI
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/CI.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index 4666022..0a176af 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -19,6 +19,21 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
gcc_v: [9] # Version of GFortran we want to use.
+ include:
+ - os: ubuntu-latest
+ STACK_CACHE: "/home/runner/.stack/"
+ STACK_CACHE_VERSION: ""
+ - os: macos-latest
+ STACK_CACHE: |
+ /Users/runner/.stack/snapshots
+ /Users/runner/.stack/setup-exe-src
+ STACK_CACHE_VERSION: "v2"
+ - os: windows-latest
+ STACK_CACHE: |
+ C:\Users\runneradmin\AppData\Roaming\stack
+ C:\Users\runneradmin\AppData\Local\Programs\stack
+ STACK_CACHE_VERSION: "v2"
+
env:
FC: gfortran
GCC_V: ${{ matrix.gcc_v }}
@@ -61,6 +76,19 @@ jobs:
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
--slave /usr/bingcov gcov /usr/bin/gcov-${GCC_V}
+ - name: Get Time
+ id: time
+ uses: nanzm/get-time-action@v1.0
+ with:
+ format: 'YYYY-MM'
+
+ - name: Setup github actions cache
+ id: cache
+ uses: actions/cache@v2
+ with:
+ path: ${{matrix.STACK_CACHE}}
+ key: ${{ runner.os }}-${{ steps.time.outputs.time }}${{matrix.STACK_CACHE_VERSION}}
+
- name: Build Haskell fpm
run: |
cd bootstrap