Skip to content

haddock-project fixes (backport #8919) #1837

haddock-project fixes (backport #8919)

haddock-project fixes (backport #8919) #1837

Workflow file for this run

name: Assorted
on:
push:
branches:
- master
pull_request:
release:
types:
- created
jobs:
check:
name: Whitespace
runs-on: ubuntu-latest
env:
fix-whitespace-ver: '0.0.10'
steps:
- uses: actions/checkout@v3
name: Checkout sources
- name: Create directory for binary
run: |
mkdir -p $HOME/.local/bin
- uses: actions/cache@v3
name: Cache the binary
id: cache
with:
path: "~/.local/bin"
key: fix-whitespace-${{ env.fix-whitespace-ver }}
# See https://github.com/haskell/cabal/pull/8739
- name: Sudo chmod to permit ghcup to update its cache
run: |
if [[ "${{ runner.os }}" == "Linux" ]]; then
sudo mkdir -p /usr/local/.ghcup/cache
sudo chown -R $USER /usr/local/.ghcup
sudo chmod -R 777 /usr/local/.ghcup
fi
- uses: haskell/actions/setup@v2
if: ${{ !steps.cache.outputs.cache-hit }}
with:
ghc-version: '9.2'
cabal-version: latest
- name: Install fix-whitespace
if: ${{ !steps.cache.outputs.cache-hit }}
run: |
cabal install --constraint=aeson==2.1.2.1 --ignore-project --install-method=copy --installdir=$HOME/.local/bin fix-whitespace-${{ env.fix-whitespace-ver }}
strip $HOME/.local/bin/fix-whitespace
- name: Check the whitespace issue
run: |
$HOME/.local/bin/fix-whitespace --check