Skip to content

Commit d28b905

Browse files
authored
Merge pull request #72 from biocad/maksbotan/update-haskell-ci
haskell-ci regenerate
2 parents c0dcfa2 + 918cb72 commit d28b905

3 files changed

Lines changed: 54 additions & 46 deletions

File tree

.github/workflows/haskell-ci.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.14.3
11+
# version: 0.16.6
1212
#
13-
# REGENDATA ("0.14.3",["github","cobot-io.cabal"])
13+
# REGENDATA ("0.16.6",["github","cobot-io.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
linux:
2525
name: Haskell-CI - Linux - ${{ matrix.compiler }}
26-
runs-on: ubuntu-18.04
26+
runs-on: ubuntu-20.04
2727
timeout-minutes:
2828
60
2929
container:
@@ -32,14 +32,9 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.4.4
35+
- compiler: ghc-9.2.8
3636
compilerKind: ghc
37-
compilerVersion: 9.4.4
38-
setup-method: ghcup
39-
allow-failure: true
40-
- compiler: ghc-9.2.5
41-
compilerKind: ghc
42-
compilerVersion: 9.2.5
37+
compilerVersion: 9.2.8
4338
setup-method: ghcup
4439
allow-failure: true
4540
- compiler: ghc-9.0.2
@@ -59,10 +54,10 @@ jobs:
5954
apt-get update
6055
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
6156
mkdir -p "$HOME/.ghcup/bin"
62-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.5/x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup"
57+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
6358
chmod a+x "$HOME/.ghcup/bin/ghcup"
64-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
65-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
59+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
60+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
6661
env:
6762
HCKIND: ${{ matrix.compilerKind }}
6863
HCNAME: ${{ matrix.compiler }}
@@ -78,7 +73,7 @@ jobs:
7873
echo "HC=$HC" >> "$GITHUB_ENV"
7974
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
8075
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
81-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
76+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
8277
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
8378
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
8479
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -128,8 +123,8 @@ jobs:
128123
- name: install cabal-plan
129124
run: |
130125
mkdir -p $HOME/.cabal/bin
131-
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
132-
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
126+
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz
127+
echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
133128
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
134129
rm -f cabal-plan.xz
135130
chmod a+x $HOME/.cabal/bin/cabal-plan
@@ -142,7 +137,7 @@ jobs:
142137
chmod a+x $HOME/.cabal/bin/hpack
143138
hpack --version
144139
- name: checkout
145-
uses: actions/checkout@v2
140+
uses: actions/checkout@v3
146141
with:
147142
path: source
148143
- name: generate cabal file
@@ -183,8 +178,8 @@ jobs:
183178
run: |
184179
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
185180
cabal-plan
186-
- name: cache
187-
uses: actions/cache@v2
181+
- name: restore cache
182+
uses: actions/cache/restore@v3
188183
with:
189184
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
190185
path: ~/.cabal/store
@@ -208,8 +203,14 @@ jobs:
208203
${CABAL} -vnormal check
209204
- name: haddock
210205
run: |
211-
$CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
206+
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
212207
- name: unconstrained build
213208
run: |
214209
rm -f cabal.project.local
215210
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
211+
- name: save cache
212+
uses: actions/cache/save@v3
213+
if: always()
214+
with:
215+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
216+
path: ~/.cabal/store

package.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ extra-source-files:
2222
tested-with: |
2323
GHC ==8.10.7
2424
|| ==9.0.2
25-
|| ==9.2.5
26-
|| ==9.4.4
25+
|| ==9.2.8
26+
27+
# hyraxAbif does not support text >= 1.3 yet
28+
# || ==9.4.5
29+
# || ==9.6.2
2730

2831
# Metadata used when publishing your package
2932

@@ -97,3 +100,6 @@ tests:
97100
- hspec >= 2.4.1 && < 2.11
98101
- neat-interpolation >= 0.3
99102
- linear
103+
# megaparsec-9.3 changed something in error messages
104+
# so that our tests do not pass.
105+
- megaparsec < 9.3

test/FASTASpec.hs

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -43,36 +43,37 @@ badFasta8 :: Either String (Fasta Char)
4343
badFasta8 = Left "input.fasta:21:5:\n |\n21 | CMV + enhMCK + prcTnT-2\r\n | ^^\nunexpected \"+ \"\nexpecting end of input, end of line, or letter\n"
4444

4545
fastaSpec :: Spec
46-
fastaSpec = describe "Fasta files parser." $ do
47-
parseFile "test/FASTA/order1.fasta" correctFasta1
48-
writeFile "test/FASTA/input.fasta" correctFasta1
49-
parseBadFile "test/FASTA/order2.fasta" badFasta2
50-
parseFile "test/FASTA/order3.fasta" correctFasta3
51-
writeFile "test/FASTA/input.fasta" correctFasta3
52-
parseBadFile "test/FASTA/order4.fasta" badFasta4
53-
parseFile "test/FASTA/order5.fasta" correctFasta5
54-
writeFile "test/FASTA/input.fasta" correctFasta5
55-
parseBadFile "test/FASTA/order6.fasta" badFasta6
56-
parseBadFile "test/FASTA/order7.fasta" badFasta7
57-
parseBadFile "test/FASTA/order8.fasta" badFasta8
46+
fastaSpec = describe "Fasta files parser" $ do
47+
describe "fromFile" $ do
48+
parseFile "test/FASTA/order1.fasta" correctFasta1
49+
parseBadFile "test/FASTA/order2.fasta" badFasta2
50+
parseFile "test/FASTA/order3.fasta" correctFasta3
51+
parseBadFile "test/FASTA/order4.fasta" badFasta4
52+
parseFile "test/FASTA/order5.fasta" correctFasta5
53+
parseBadFile "test/FASTA/order6.fasta" badFasta6
54+
parseBadFile "test/FASTA/order7.fasta" badFasta7
55+
parseBadFile "test/FASTA/order8.fasta" badFasta8
56+
57+
describe "toFile" $ do
58+
writeFile "test/FASTA/input.fasta" correctFasta5
59+
writeFile "test/FASTA/input.fasta" correctFasta1
60+
writeFile "test/FASTA/input.fasta" correctFasta3
5861

5962
parseFile :: FilePath -> Fasta Char -> Spec
60-
parseFile path cf = do
61-
describe "fromFile" $ do
62-
it "correctly parses fasta from file" $ do
63-
fasta <- fromFile path
64-
fasta `shouldBe` cf
63+
parseFile path cf =
64+
it ("correctly parses good fasta from file " <> path) $ do
65+
fasta <- fromFile path
66+
fasta `shouldBe` cf
6567

6668
parseBadFile :: FilePath -> Either String (Fasta Char) -> Spec
67-
parseBadFile path cf = do
68-
describe "fromFile" $ do
69-
it "correctly parses fasta from file" $ do
70-
res <- liftIO (readFile path)
71-
let badRes = parseOnly fastaP res
72-
badRes `shouldBe` cf
69+
parseBadFile path cf =
70+
it ("correctly parses bad fasta from file " <> path) $ do
71+
res <- liftIO (readFile path)
72+
let badRes = parseOnly fastaP res
73+
badRes `shouldBe` cf
7374

7475
writeFile :: FilePath -> Fasta Char -> Spec
75-
writeFile path cf = describe "writeFile" $ do
76+
writeFile path cf =
7677
it "correctly write fasta into file" $ do
7778
toFile cf path
7879
fasta <- fromFile path

0 commit comments

Comments
 (0)