Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 24 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,22 @@ jobs:
matrix:
include:
# Linux
- { cabal: "3.12", os: ubuntu-latest, ghc: "8.4.4" }
- { cabal: "3.12", os: ubuntu-latest, ghc: "8.6.5" }
- { cabal: "3.12", os: ubuntu-latest, ghc: "8.8.4" }
- { cabal: "3.12", os: ubuntu-latest, ghc: "8.10.7" }
- { cabal: "3.12", os: ubuntu-latest, ghc: "9.0.2" }
- { cabal: "3.12", os: ubuntu-latest, ghc: "9.2.8" }
- { cabal: "3.12", os: ubuntu-latest, ghc: "9.4.8" }
- { cabal: "3.12", os: ubuntu-latest, ghc: "9.6.6" }
- { cabal: "3.12", os: ubuntu-latest, ghc: "9.8.4" }
- { cabal: "3.12", os: ubuntu-latest, ghc: "9.10.1" }
# Fails to resolve aeson [2025.01.14]
# - { cabal: "3.12", os: ubuntu-latest, ghc: "9.12.1" }
- { cabal: "3.14", os: ubuntu-latest, ghc: "8.4.4" }
- { cabal: "3.14", os: ubuntu-latest, ghc: "8.6.5" }
- { cabal: "3.14", os: ubuntu-latest, ghc: "8.8.4" }
- { cabal: "3.14", os: ubuntu-latest, ghc: "8.10.7" }
- { cabal: "3.14", os: ubuntu-latest, ghc: "9.0.2" }
- { cabal: "3.14", os: ubuntu-latest, ghc: "9.2.8" }
- { cabal: "3.14", os: ubuntu-latest, ghc: "9.4.8" }
- { cabal: "3.14", os: ubuntu-latest, ghc: "9.6.7" }
- { cabal: "3.14", os: ubuntu-latest, ghc: "9.8.4" }
- { cabal: "3.14", os: ubuntu-latest, ghc: "9.10.2" }
- { cabal: "3.14", os: ubuntu-latest, ghc: "9.12.2" }
# Macos
- { cabal: "3.14", os: macos-latest, ghc: "9.6.7" }
- { cabal: "3.14", os: macos-latest, ghc: "9.8.4" }
- { cabal: "3.14", os: macos-latest, ghc: "9.10.2" }
- { cabal: "3.14", os: macos-latest, ghc: "9.12.2" }
fail-fast: false

steps:
Expand All @@ -52,6 +56,8 @@ jobs:
- name: "Install PAPI"
run: |
sudo apt-get install -y libpapi-dev
echo FLAG_PAPI=-fBenchPAPI >> "$GITHUB_ENV"
if: matrix.os == 'ubuntu-latest'
# ----------------
- name: Versions
run: |
Expand All @@ -74,11 +80,16 @@ jobs:
# ----------------
- name: Build
run: |
echo FLAG_PAPI=$FLAG_PAPI
cd unpacked/statistics-*
cabal configure --haddock-all --enable-tests --enable-benchmarks
cabal configure $FLAG_PAPI --haddock-all --enable-tests --enable-benchmarks --benchmark-option=-l
cabal build all --write-ghc-environment-files=always
# ----------------
- name: Test
run: |
cd unpacked/statistics-*
cabal test all
# ----------------
- name: Bench
run: |
cabal bench all
2 changes: 2 additions & 0 deletions benchmark/bench.hs → benchmark/Main.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module Main where

import Data.Complex
import Statistics.Sample
import Statistics.Transform
Expand Down
11 changes: 6 additions & 5 deletions statistics.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.6
|| ==9.6.7
|| ==9.8.4
|| ==9.10.1
|| ==9.10.2
|| ==9.12.2

source-repository head
type: git
Expand Down Expand Up @@ -205,7 +206,7 @@ test-suite statistics-doctests
build-depends:
base -any
, statistics -any
, doctest >=0.15 && <0.24
, doctest >=0.15 && <0.25

-- We want to be able to build benchmarks using both tasty-bench and tasty-papi.
-- They have similar API so we just create two shim modules which reexport
Expand All @@ -223,7 +224,7 @@ benchmark statistics-bench
import: bench-stanza
type: exitcode-stdio-1.0
hs-source-dirs: benchmark bench-time
main-is: bench.hs
main-is: Main.hs
Other-modules: Bench
build-depends: tasty-bench >= 0.3

Expand All @@ -233,6 +234,6 @@ benchmark statistics-bench-papi
if impl(ghcjs) || !flag(BenchPAPI)
buildable: False
hs-source-dirs: benchmark bench-papi
main-is: bench.hs
main-is: Main.hs
Other-modules: Bench
build-depends: tasty-papi >= 0.1.2
Loading