From dcd04cfb171a9a10e999d4a7fa4744d8918b7dd4 Mon Sep 17 00:00:00 2001 From: Nikolay Yakimov Date: Sun, 28 Feb 2021 18:23:22 +0300 Subject: [PATCH] [CI] Update config to match current actions api --- .github/workflows/haskell.yml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index e8ee05c..23c1f12 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v2 - uses: haskell/actions/setup@v1 - if: runner.os != 'Linux' + if: '!(matrix.container)' with: ghc-version: ${{matrix.ghc}} cabal-version: '3.2' @@ -27,22 +27,16 @@ jobs: shell: pwsh run: | $store = Join-Path $pwd ".cabal-store" - $install = Join-Path $pwd "install" New-Item -ItemType Directory -Force "$store" - New-Item -ItemType Directory -Force "$install" cabal user-config init --force --augment="store-dir: $store" ` - --augment="overwrite-policy: always" ` - --augment="install-method: copy" ` - --augment="installdir: $install" - $bindir = Join-Path $store "bin" - Write-Output "::add-path::$bindir" + --augment="install-method: copy" - name: Cabal update run: cabal v2-update - - name: Cabal configure - run: cabal v2-configure - name: Copy build config if: matrix.config run: cp misc/${{ matrix.config }} ./cabal.project.local + - name: Cabal configure + run: cabal v2-configure - uses: actions/cache@v2 id: cache with: @@ -52,13 +46,23 @@ jobs: ${{runner.os}}-${{matrix.ghc}}-${{hashFiles('alpaca-parser-generator.cabal')}}-${{hashFiles('dist-newstyle/cache/plan.json')}} ${{runner.os}}-${{matrix.ghc}}-${{hashFiles('alpaca-parser-generator.cabal')}} ${{runner.os}}-${{matrix.ghc}} + - shell: bash + run: | + ls -l .cabal-store/ghc-${{matrix.ghc}}/ || true + rm -rvf .cabal-store/ghc-${{matrix.ghc}}/alpaca-* || true + rm -rvf .cabal-store/ghc-${{matrix.ghc}}/alpaca-* || true + rm -rvf .cabal-store/ghc-${{matrix.ghc}}/alpaca-* || true - name: Install dependencies run: | cabal v2-install --installdir=".cabal-store/bin" alex cabal v2-install --installdir=".cabal-store/bin" happy cabal v2-build --only-dependencies --enable-tests - - name: Build - run: cabal v2-install + - name: Install + shell: bash + run: | + mkdir install + export GIT_DIR="$PWD/.git" + cabal v2-install --installdir=$PWD/install - uses: actions/upload-artifact@v2 with: name: build-${{ runner.os }}