github: Try install hlint from cabal #82
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
name: Build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build-cabal: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
ghc: | |
- "9.2" | |
- "9.4" | |
- "9.6" | |
# - "9.8" | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install hpack | |
- name: Hpack | |
run: hpack | |
- name: Install Haskell | |
uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
- name: Cache | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-cabal | |
with: | |
path: ~/.cabal | |
key: ${{ runner.os }}-build-ghc-${{ matrix.ghc }}-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }} | |
restore-keys: | | |
${{ runner.os }}-build-ghc-${{ matrix.ghc }}-${{ env.cache-name }}- | |
${{ runner.os }}-build-ghc-${{ matrix.ghc }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: | | |
cabal update | |
cabal build --only-dependencies --enable-tests --enable-benchmarks | |
cabal install hlint | |
- name: Hlint | |
run: hlint . | |
- name: Build | |
run: cabal build --enable-tests --enable-benchmarks all | |
- name: Run tests | |
run: cabal test all | |
build-nix: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v20 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
- uses: cachix/cachix-action@v14 | |
with: | |
name: myme | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Build | |
run: nix build -L |