diff options
author | LKedward <laurence.kedward@bristol.ac.uk> | 2020-09-12 16:03:54 +0100 |
---|---|---|
committer | LKedward <laurence.kedward@bristol.ac.uk> | 2020-09-12 16:03:54 +0100 |
commit | e754281f54e230bff1bf5b4dee940eb68cea72cc (patch) | |
tree | 4b81de006ca868ef238859651b999ebc573b6410 /.github | |
parent | e02171d28bb783bb419b44ef453ca56286b389a6 (diff) | |
download | fpm-e754281f54e230bff1bf5b4dee940eb68cea72cc.tar.gz fpm-e754281f54e230bff1bf5b4dee940eb68cea72cc.zip |
Update: CI with caching of stack files.
To speedup build of Haskell fpm.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/CI.yml | 28 |
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 |