From 2d9d779fbe623cff77c5e93a87c0c33f120293de Mon Sep 17 00:00:00 2001 From: John MacFarlane <jgm@berkeley.edu> Date: Mon, 15 Jun 2020 10:02:31 -0700 Subject: [PATCH] linux CI: use ppa to install older ghc/cabal versions. --- .github/workflows/ci.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 123823238..6742b0298 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,11 +44,11 @@ jobs: matrix: versions: - ghc: '8.0.2' - cabal: '3.2' + cabal: '2.4' - ghc: '8.2.2' - cabal: '3.2' + cabal: '2.4' - ghc: '8.4.4' - cabal: '3.2' + cabal: '2.4' - ghc: '8.6.5' cabal: '3.2' - ghc: '8.8.3' @@ -58,6 +58,17 @@ jobs: steps: - uses: actions/checkout@v1 + # need to install older cabal/ghc versions from ppa repository + + - name: Install recent cabal/ghc + run: | + if [[ ! -d /opt/ghc/${{ matrix.versions.ghc }} ]] + then + sudo add-apt-repository ppa:hvr/ghc + sudo apt-get update + sudo apt-get install ghc-${{ matrix.versions.ghc }} cabal-install-${{ matrix.versions.cabal }} + fi + # declare/restore cached things # caching doesn't work for scheduled runs yet # https://github.com/actions/cache/issues/63