Skip to content

Commit 467f3f3

Browse files
committed
don't test GHC < 8.10 as they require old Ubuntu's where GitHub Actions fail miserably (wrong glibc version)
1 parent ce3f555 commit 467f3f3

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ jobs:
118118
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
119119
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
120120
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
121-
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
122-
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
121+
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
122+
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" ; fi
123123
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
124124
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
125125
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
@@ -235,7 +235,7 @@ jobs:
235235
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
236236
- name: tests
237237
run: |
238-
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
238+
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi
239239
- name: docspec
240240
run: |
241241
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all ; fi
@@ -262,10 +262,10 @@ jobs:
262262
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere +rere-intersection' all
263263
- name: constraint set no-cfg
264264
run: |
265-
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere -rere-cfg' all --dry-run
266-
cabal-plan topo | sort
267-
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere -rere-cfg' --dependencies-only -j2 all
268-
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere -rere-cfg' all
265+
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere -rere-cfg' all --dry-run ; fi
266+
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then cabal-plan topo | sort ; fi
267+
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere -rere-cfg' --dependencies-only -j2 all ; fi
268+
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='rere -rere-cfg' all ; fi
269269
- name: save cache
270270
uses: actions/cache/save@v4
271271
if: always()

cabal.haskell-ci

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
branches: master
2-
tests: >=7.4
3-
benchmarks: >=7.4
2+
tests: >=8.4
3+
benchmarks: >=8.4
44
docspec: >=8.4
55

66
constraint-set no-cfg
7-
ghc: >=7.8
7+
ghc: >=8.4
88
constraints: rere -rere-cfg
99

1010
constraint-set intersection

0 commit comments

Comments
 (0)