From e754281f54e230bff1bf5b4dee940eb68cea72cc Mon Sep 17 00:00:00 2001 From: LKedward Date: Sat, 12 Sep 2020 16:03:54 +0100 Subject: Update: CI with caching of stack files. To speedup build of Haskell fpm. --- .github/workflows/CI.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to '.github/workflows') 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 -- cgit v1.2.3