Skip to content

Install deps

Install deps #351

Workflow file for this run

# SPDX-FileCopyrightText: Copyright Preetham Gujjula
# SPDX-License-Identifier: BSD-3-Clause
name: CI
on:
push:
branches:
- '*'
pull_request:
jobs:
generate-matrix:
name: Generate matrix from cabal
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
runs-on: ubuntu-latest
steps:
- name: Extract the tested GHC versions
id: set-matrix
uses: kleidukos/get-tested@v0.1.7.0
with:
cabal-file: apply-merge.cabal
ubuntu-version: latest
version: 0.1.7.0
reuse_compliance_check:
name: REUSE compliance check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v3
ormolu:
name: Ormolu check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/run-ormolu@v16
cabal_test:
name: cabal test - ghc-${{ matrix.ghc }}
needs: generate-matrix
runs-on: ubuntu-latest
continue-on-error: false
strategy:
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: haskell/ghcup-setup@v1
- name: Install deps
run: sudo apt install libncurses5 libncurses5-dev libncursesw5-dev
- name: Restore cache
uses: actions/cache@v4
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}
- name: Install ghc and cabal
run: |
ghcup install ghc ${{ matrix.ghc }} || true
cat /usr/local/.ghcup/logs/*
ghcup set ghc ${{ matrix.ghc }}
ghcup install cabal
- name: Run cabal configure
run: cabal configure
--enable-tests
--test-show-details=streaming
--enable-benchmarks
--ghc-options="-Werror -Wall"
- run: cabal update
- run: cabal outdated --exit-code --ignore=base
- run: cabal freeze
- run: cabal build
- run: cabal test
- run: cabal test --prefer-oldest