Skip to content

---

--- #153

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
build-nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@V27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
allow-import-from-derivation = true
auto-optimise-store = true
experimental-features = nix-command flakes
substituters = https://cache.nixos.org https://cache.iog.io https://cache.zw3rk.com
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=
- name: Build with cachix
uses: cachix/cachix-action@v15
with:
name: slugger
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- run: nix build --accept-flake-config
build-haskell:
runs-on: ubuntu-latest
strategy:
matrix:
cabal: ["3.4", "3.6.2", "3.8"]
ghc: ["8.6.5", "8.8.4", "8.10.5", "9.0.1", "9.2.5", "9.4.4"]
os: [ubuntu-latest, macOS-latest]
fail-fast: false
env:
CONFIG: "--enable-tests --enable-benchmarks"
steps:
- uses: actions/checkout@v4
- uses: haskell/actions/setup@v2
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- run: cabal v2-update
- run: cabal v2-freeze $CONFIG
- uses: actions/cache@v4
with:
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-
- run: cabal v2-build all $CONFIG
- run: cabal v2-test all $CONFIG
- run: cabal v2-haddock lib:slugger $CONFIG
- run: cabal v2-haddock slugger-test $CONFIG
- run: cabal v2-sdist