From d6fb3826c847d3be3d748d2f685ef15eb491b4fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Deest?= Date: Thu, 18 Mar 2021 11:41:18 +0100 Subject: [PATCH 1/2] Try and improve caching --- .github/workflows/main.yml | 41 ++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 852ffdd6..91b4f6aa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,20 +32,24 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} - - name: Configure - run: | - cabal configure --enable-tests --enable-benchmarks --test-show-details=direct - cabal install --ignore-project -j2 doctest --constraint='doctest ^>=0.17' - - name: Freeze run: | + cabal configure --enable-tests --enable-benchmarks --test-show-details=direct cabal freeze - uses: actions/cache@v2.1.3 - name: Cache ~/.cabal/store + name: Cache ~/.cabal/store and dist-newstyle with: - path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + path: | + ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + dist-newstyle key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.ghc }}- + + - name: Configure + run: | + cabal install --ignore-project -j2 doctest --constraint='doctest ^>=0.17' - name: Build run: | @@ -115,16 +119,17 @@ jobs: stack test --system-ghc ghcjs: - name: cabal / ghcjs 8.4 + name: ubuntu-18.04 / ghcjs 8.4 runs-on: "ubuntu-18.04" steps: - uses: actions/checkout@v2 + - name: "Setup PATH" run: | - echo "PATH=$HOME/.cabal/bin:$PATH" >> $GITHUB_ENV + echo "PATH=$HOME/.cabal/bin:/opt/ghcjs/8.4/bin:$PATH" >> $GITHUB_ENV - - name: Install tools + - name: Install ghcjs and cabal run: | sudo add-apt-repository ppa:hvr/ghcjs sudo apt-get update -y @@ -135,7 +140,23 @@ jobs: cp cabal.ghcjs.project cabal.project cat cabal.project + - name: Cabal update and freeze + run: | cabal v2-update + cabal v2-freeze + + - uses: actions/cache@v2.1.3 + name: Cache ~/.cabal/store and dist-newstyle + with: + path: | + ~/.cabal/store + dist-newstyle + key: ubuntu-18.04-ghcjs8.4-${{ hashFiles('cabal.project.freeze') }} + restore-keys: | + ubuntu-18.04-ghcjs8.4- + + - name: Install cabal-plan and hspec-discover + run: | cabal v2-install -w /opt/ghc/8.4.4/bin/ghc --ignore-project cabal-plan --constraint='cabal-plan ^>=0.6.0.0' --constraint='cabal-plan +exe' cabal v2-install -w /opt/ghc/8.4.4/bin/ghc --ignore-project hspec-discover From a28856a11a9e127b269dd851db942f6cc326d018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Deest?= Date: Thu, 18 Mar 2021 12:10:10 +0100 Subject: [PATCH 2/2] Rename GH action file to match branch name --- .github/workflows/{main.yml => master.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{main.yml => master.yml} (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/master.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/master.yml