Skip to content

Commit

Permalink
[CI] Update config to match current actions api
Browse files Browse the repository at this point in the history
  • Loading branch information
lierdakil committed Feb 28, 2021
1 parent 0b85cd3 commit 2a5adb7
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,26 @@ 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'
- name: Cabal init
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"
--augment="install-method: copy"
$bindir = Join-Path $store "bin"
Write-Output "::add-path::$bindir"
echo "$bindir" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- 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:
Expand All @@ -52,13 +48,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 }}
Expand Down

0 comments on commit 2a5adb7

Please sign in to comment.