Centralize Sorting #505
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FUTUREWORK: add this to `ci.dhall`? | |
name: Ormolu | |
on: | |
- pull_request | |
jobs: | |
ormolu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: "actions/checkout@v3" | |
- uses: "haskell-actions/setup@v2" | |
with: | |
cabal-version: "${{ matrix.cabal }}" | |
enable-stack: false | |
ghc-version: "${{ matrix.ghc }}" | |
- name: Update Hackage repository | |
run: cabal update | |
- name: cabal.project.local.ci | |
run: | | |
if [ -e cabal.project.local.ci ]; then | |
cp cabal.project.local.ci cabal.project.local | |
fi | |
- name: freeze | |
run: cabal freeze | |
- uses: "actions/cache@v2" | |
name: Cache | |
with: | |
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('cabal.project.freeze') }}" | |
path: | | |
"${{ steps.setup-haskell-cabal.outputs.cabal-store }}" | |
~/.cabal/packages | |
~/.cabal/store | |
~/.cabal/bin | |
dist-newstyle | |
~/.local/bin | |
- name: Install dependencies | |
run: | | |
export PATH=$PATH:$HOME/.cabal/bin:$HOME/.local/bin | |
export ORMOLU_VERSION=$(cat ./layout/ormolu.version) | |
(ormolu -v 2>/dev/null | grep -q $ORMOLU_VERSION) || (cabal install ormolu --constraint="ormolu ==$ORMOLU_VERSION") | |
test -e $HOME/.local/bin/yq || pip3 install yq | |
shell: bash | |
- name: Run Ormolu | |
run: | | |
export PATH=$PATH:$HOME/.cabal/bin:$HOME/.local/bin | |
./layout/ormolu.sh -c | |
shell: bash | |
strategy: | |
matrix: | |
cabal: | |
- '3.10.2.1' | |
ghc: | |
- '9.4.6' |