Skip to content

Commit a19a94e

Browse files
committed
Merge branch 'LaurentRDC-github-actions'
2 parents 3f35bfc + 81b41e2 commit a19a94e

File tree

11 files changed

+79
-77
lines changed

11 files changed

+79
-77
lines changed

.github/workflows/ci.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
continuous-integration:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
ghc-version:
13+
- "8.10.7"
14+
- "9.0.2"
15+
- "9.2.8"
16+
- "9.4.8"
17+
- "9.6.6"
18+
- "9.8.2"
19+
- "9.10.1"
20+
flags:
21+
- "" # base case
22+
- "+binary"
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Install cabal/ghc
28+
uses: haskell-actions/setup@v2
29+
id: setup-haskell
30+
with:
31+
ghc-version: ${{ matrix.ghc-version }}
32+
cabal-version: '3.10.3.0'
33+
34+
- name: Generate freeze file
35+
run: |
36+
cabal update
37+
cabal configure --disable-optimization --flags="${{ matrix.flags }}" --enable-tests
38+
cabal freeze
39+
40+
- name: Cache cabal work
41+
uses: actions/cache@v4
42+
with:
43+
path: |
44+
dist-newstyle
45+
${{ steps.setup-haskell.outputs.cabal-store }}
46+
key: ${{ runner.os }}-${{ hashFiles('cabal.project.freeze', 'cabal.project.local') }}-cabal-install
47+
48+
- name: Build dependencies
49+
run: |
50+
cabal build --only-dependencies
51+
52+
- name: Build dimensional
53+
run: |
54+
cabal build
55+
56+
- name: Run tests
57+
run: |
58+
cabal test
59+
60+
# Note that we ignore the cabal freeze file (--ignore-project) because
61+
# the `doctest` dependencies may clash with `dimensional` dependencies.
62+
- name: Run doctests
63+
run: |
64+
cabal install doctest --ignore-project --disable-optimization
65+
cabal repl dimensional --build-depends=QuickCheck --with-ghc=doctest

.travis.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ This library provides statically-checked dimensional arithmetic for physical qua
55
Data kinds and closed type families provide a flexible, safe, and discoverable implementation that leads to largely self-documenting
66
client code.
77

8-
[![Build Status](https://api.travis-ci.com/bjornbm/dimensional.svg?branch=master)](https://app.travis-ci.com/github/bjornbm/dimensional)
98
[![Hackage Version](https://img.shields.io/hackage/v/dimensional.svg)](https://hackage.haskell.org/package/dimensional)
109
[![Stackage version](https://www.stackage.org/package/dimensional/badge/lts?label=Stackage)](https://www.stackage.org/package/dimensional)
1110

dimensional.cabal

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ bug-reports: https://github.com/bjornbm/dimensional/issues/
1111
category: Math, Physics
1212
synopsis: Statically checked physical dimensions
1313
cabal-version: >= 1.10
14-
tested-with: GHC == 8.0.1, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.1, GHC == 8.8.3, GHC == 8.10.4
14+
tested-with: GHC == 8.10.7,
15+
GHC == 9.0.2,
16+
GHC == 9.2.8,
17+
GHC == 9.4.8,
18+
GHC == 9.6.6,
19+
GHC == 9.8.2,
20+
GHC == 9.10.1
1521
build-type: Simple
1622

1723
description:
@@ -99,19 +105,6 @@ test-suite tests
99105
base
100106
build-tool-depends: hspec-discover:hspec-discover == 2.*
101107

102-
test-suite doctests
103-
type: exitcode-stdio-1.0
104-
ghc-options: -threaded
105-
main-is: DocTests.hs
106-
hs-source-dirs: tests
107-
default-language: Haskell2010
108-
build-depends: dimensional,
109-
doctest,
110-
Glob,
111-
QuickCheck,
112-
template-haskell,
113-
base
114-
115108
benchmark simple
116109
type: exitcode-stdio-1.0
117110
hs-source-dirs: benchmarks

src/Numeric/Units/Dimensional.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ import qualified Numeric.Units.Dimensional.Variants as V
240240
-- $setup
241241
-- >>> :set -XFlexibleInstances
242242
-- >>> :set -XNoImplicitPrelude
243+
-- >>> :set -fno-warn-orphans
244+
-- >>> :set -fno-warn-type-defaults
243245
-- >>> import Test.QuickCheck.Arbitrary
244246
-- >>> import Numeric.Units.Dimensional.Prelude
245247
-- >>> import Numeric.Units.Dimensional.Float

src/Numeric/Units/Dimensional/Dimensions/TermLevel.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import Prelude (id, all, fst, snd, fmap, otherwise, divMod, ($), (+), (-), (.),
4848
import qualified Prelude as P
4949

5050
-- $setup
51+
-- >>> :set -fno-warn-orphans
5152
-- >>> import Prelude (negate)
5253
-- >>> import Control.Applicative
5354
-- >>> import Test.QuickCheck.Arbitrary

src/Numeric/Units/Dimensional/Float.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import Numeric.Units.Dimensional.Prelude hiding (RealFloat(..))
4545
import Numeric.Units.Dimensional.Coercion
4646

4747
-- $setup
48+
-- >>> :set -fno-warn-type-defaults
4849
-- >>> :set -XExtendedDefaultRules
4950
-- >>> :set -XNegativeLiterals
5051

src/Numeric/Units/Dimensional/Internal.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ import qualified Prelude as P
6060

6161
-- $setup
6262
-- >>> :set -XNoImplicitPrelude
63+
-- >>> :set -fno-warn-type-defaults
6364
-- >>> import Numeric.Units.Dimensional.Prelude
6465

6566
-- | A unit of measurement.

src/Numeric/Units/Dimensional/NonSI.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ import Numeric.Units.Dimensional.UnitNames.Internal (ucumMetric, ucum, dimension
8585
import qualified Prelude
8686

8787
-- $setup
88+
-- >>> :set -fno-warn-type-defaults
8889
-- >>> import Data.ExactPi
8990
-- >>> import Data.Function (on)
9091
-- >>> import Numeric.Units.Dimensional.Coercion

src/Numeric/Units/Dimensional/Quantities.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ to the definitions of 'DArea' and 'DVolume'.
418418
-}
419419

420420
-- $setup
421+
-- >>> :set -fno-warn-type-defaults
421422
-- >>> import Numeric.Units.Dimensional.Prelude
422423

423424
-- | Constructs a unit of area from a unit of length, taking the area of a square whose sides are that length.

tests/DocTests.hs

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)