Skip to content

Commit beab376

Browse files
authored
Merge pull request #7 from haskell-works/upgrade-to-hackage@1.4.1
Upgrade to hackage@1.4.1
2 parents ec45b81 + f2ddb0f commit beab376

File tree

4 files changed

+182
-29
lines changed

4 files changed

+182
-29
lines changed

.circleci/config.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
version: 2.1
22

33
orbs:
4-
haskell: haskell-works/haskell-build@1.6.5
4+
haskell: haskell-works/haskell-build@4.1.7
55
github: haskell-works/github-release@1.2.1
6-
hackage: haskell-works/hackage@1.0.0
6+
hackage: haskell-works/hackage@1.4.1
77

88
workflows:
99
multiple-ghc-build:
@@ -20,13 +20,18 @@ workflows:
2020
name: GHC 8.6.4
2121
executor: haskell/ghc-8_6_4
2222

23+
- haskell/build:
24+
name: GHC 8.8.3
25+
executor: haskell/ghc-8_8_3
26+
2327
- github/release-cabal:
2428
name: GitHub Release
2529
context: haskell-ci
2630
requires:
2731
- GHC 8.2.2
2832
- GHC 8.4.4
2933
- GHC 8.6.4
34+
- GHC 8.8.3
3035
checkout: true
3136
filters:
3237
branches:

.vscode/tasks.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Build",
6+
"type": "shell",
7+
"command": "bash",
8+
"args": ["-lc", "./project.sh build && echo 'Done'"],
9+
"group": {
10+
"kind": "build",
11+
"isDefault": true
12+
},
13+
"problemMatcher": {
14+
"owner": "haskell",
15+
"fileLocation": "relative",
16+
"pattern": [
17+
{
18+
"regexp": "^(.+?):(\\d+):(\\d+):\\s+(error|warning|info):.*$",
19+
"file": 1, "line": 2, "column": 3, "severity": 4
20+
},
21+
{
22+
"regexp": "\\s*(.*)$",
23+
"message": 1
24+
}
25+
]
26+
},
27+
"presentation": {
28+
"echo": false,
29+
"reveal": "always",
30+
"focus": false,
31+
"panel": "shared",
32+
"showReuseMessage": false,
33+
"clear": true
34+
}
35+
},
36+
{
37+
"label": "Test",
38+
"type": "shell",
39+
"command": "bash",
40+
"args": ["-lc", "./project.sh test && echo 'Done'"],
41+
"group": {
42+
"kind": "test",
43+
"isDefault": true
44+
},
45+
"problemMatcher": {
46+
"owner": "haskell",
47+
"fileLocation": "relative",
48+
"pattern": [
49+
{
50+
"regexp": "^(.+?):(\\d+):(\\d+):.*$",
51+
"file": 1, "line": 2, "column": 3, "severity": 4
52+
},
53+
{
54+
"regexp": "\\s*(\\d\\)\\s)?(.*)$",
55+
"message": 2
56+
}
57+
]
58+
},
59+
"presentation": {
60+
"echo": false,
61+
"reveal": "always",
62+
"focus": false,
63+
"panel": "shared",
64+
"showReuseMessage": false,
65+
"clear": true
66+
}
67+
}
68+
]
69+
}

example-haskell-project.cabal

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,33 @@
11
cabal-version: 2.4
22

3-
name: example-haskell-project
4-
version: 0.1.0.0
5-
synopsis: Example Haskell Project
6-
description: Example Haskell Project that demostrates how to get a simple project up and running with Circle CI.
7-
homepage: https://github.com/haskell-works/example-haskell-project
8-
-- bug-reports:
9-
license: BSD-3-Clause
10-
license-file: LICENSE
11-
author: John Ky
12-
maintainer: newhoggy@gmail.com
13-
-- copyright:
14-
category: Example
15-
extra-source-files: CHANGELOG.md
3+
name: example-haskell-project
4+
version: 0.1.0.0
5+
synopsis: Example Haskell Project
6+
description: Example Haskell Project that demostrates how to get a simple project up and running with Circle CI.
7+
homepage: https://github.com/haskell-works/example-haskell-project
8+
license: BSD-3-Clause
9+
license-file: LICENSE
10+
author: John Ky
11+
maintainer: newhoggy@gmail.com
12+
copyright: 2016-2020 John Ky
13+
category: Example
14+
extra-source-files: CHANGELOG.md
1615

1716
source-repository head
1817
type: git
1918
location: https://github.com/haskell-works/example-haskell-project
2019

20+
common base { build-depends: base >= 4 && < 5 }
21+
22+
common config
23+
default-language: Haskell2010
24+
2125
library
22-
exposed-modules:
23-
Example.Module
24-
-- other-modules:
25-
-- other-extensions:
26-
build-depends: base ^>= 4.10.1.0
27-
hs-source-dirs: src
28-
default-language: Haskell2010
26+
import: base, config
27+
exposed-modules: Example.Module
28+
hs-source-dirs: src
2929

3030
executable example-haskell-project
31-
main-is: Main.hs
32-
-- other-modules:
33-
-- other-extensions:
34-
build-depends: base ^>=4.11.1.0
35-
hs-source-dirs: src
36-
default-language: Haskell2010
37-
31+
import: base, config
32+
main-is: Main.hs
33+
hs-source-dirs: src

project.sh

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#!/usr/bin/env bash
2+
3+
CABAL_FLAGS="-j8"
4+
5+
cmd="$1"
6+
7+
shift
8+
9+
cabal-install() {
10+
cabal v2-install \
11+
-j8 \
12+
--installdir="$HOME/.local/bin" \
13+
--overwrite-policy=always \
14+
--disable-documentation \
15+
$CABAL_FLAGS "$@"
16+
}
17+
18+
cabal-build() {
19+
cabal v2-build \
20+
--enable-tests \
21+
--write-ghc-environment-files=ghc8.4.4+ \
22+
$CABAL_FLAGS "$@"
23+
}
24+
25+
cabal-test() {
26+
cabal v2-test \
27+
--enable-tests \
28+
--test-show-details=direct \
29+
$CABAL_FLAGS "$@"
30+
}
31+
32+
cabal-exec() {
33+
cabal v2-exec "$(echo *.cabal | cut -d . -f 1)" "$@"
34+
}
35+
36+
cabal-bench() {
37+
cabal v2-bench -j8 \
38+
$CABAL_FLAGS "$@"
39+
}
40+
41+
cabal-repl() {
42+
cabal v2-repl \
43+
$CABAL_FLAGS "$@"
44+
}
45+
46+
cabal-clean() {
47+
cabal v2-clean
48+
}
49+
50+
case "$cmd" in
51+
install)
52+
cabal-install
53+
;;
54+
55+
build)
56+
cabal-build
57+
;;
58+
59+
exec)
60+
cabal-exec
61+
;;
62+
63+
test)
64+
cabal-build
65+
cabal-test
66+
;;
67+
68+
bench)
69+
cabal-bench
70+
;;
71+
72+
repl)
73+
cabal-repl
74+
;;
75+
76+
clean)
77+
cabal-clean
78+
;;
79+
80+
*)
81+
echo "Unrecognised command: $cmd"
82+
exit 1
83+
esac

0 commit comments

Comments
 (0)