Skip to content

Commit

Permalink
Replace Haskell-CI with custom pipeline
Browse files Browse the repository at this point in the history
Haskell-CI doesn't let us run `cabal run --prefer-oldest`, which would
let us test lower bounds of dependencies. It also doesn't allow us to
check Ormolu formatting. So, we create a custom CI workflow instead.
  • Loading branch information
pgujjula committed Dec 22, 2024
1 parent 40d9bc7 commit d88902a
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 239 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 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/[email protected]
with:
cabal-file: primecount.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
- name: Install primecount C library
run: sudo apt-get install libprimecount-dev
- uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
- 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: 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
238 changes: 0 additions & 238 deletions .github/workflows/haskell-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SPDX-License-Identifier: BSD-3-Clause
-->

# `primecount` for Haskell
[![Haskell-CI](https://github.com/pgujjula/primecount-haskell/actions/workflows/haskell-ci.yml/badge.svg)](https://github.com/pgujjula/primecount-haskell/actions/workflows/haskell-ci.yml)
[![CI](https://github.com/pgujjula/primecount-haskell/actions/workflows/ci.yml/badge.svg)](https://github.com/pgujjula/primecount-haskell/actions/workflows/ci.yml)
[![REUSE status](https://api.reuse.software/badge/github.com/pgujjula/primecount-haskell)](https://api.reuse.software/info/github.com/pgujjula/primecount-haskell)

This library provides Haskell bindings to Kim Walisch's
Expand Down

0 comments on commit d88902a

Please sign in to comment.