Skip to content

Commit 4b11c7a

Browse files
authored
Merge branch 'central-server' into master2central-nov2024
2 parents 5b0d3b0 + c4f3640 commit 4b11c7a

31 files changed

+59306
-453
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Cabal build with mtl-2.3
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- ci*
7+
pull_request:
8+
branches:
9+
- master
10+
- ci*
11+
12+
defaults:
13+
run:
14+
shell: bash
15+
16+
jobs:
17+
build:
18+
name: Build with mtl-2.3
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 60
21+
22+
steps:
23+
24+
- name: Environment settings based on the Haskell setup
25+
run: |
26+
GHC_VER=$(ghc --numeric-version)
27+
CABAL_VER=$(cabal --numeric-version)
28+
echo "GHC_VER = ${GHC_VER}"
29+
echo "CABAL_VER = ${CABAL_VER}"
30+
echo "GHC_VER=${GHC_VER}" >> "${GITHUB_ENV}"
31+
echo "CABAL_VER=${CABAL_VER}" >> "${GITHUB_ENV}"
32+
33+
- name: Install necessary deps
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y libgd-dev libpng-dev libjpeg-dev libfontconfig-dev libfreetype-dev libexpat1-dev
37+
38+
- uses: actions/checkout@v3
39+
40+
- name: Cache build
41+
uses: actions/cache@v3
42+
with:
43+
path: |
44+
~/.cabal
45+
dist-newstyle
46+
key: cabal-${{ env.CABAL_VER }}-ghc-${{ env.GHC_VER }}-commit-${{ github.sha }}
47+
restore-keys: |
48+
cabal-${{ env.CABAL_VER }}-ghc-${{ env.GHC_VER }}-commit-
49+
50+
- name: Prepare cabal
51+
run: |
52+
cabal update
53+
54+
- name: Build dependencies w/o tests with mtl-2.3
55+
# 2022-12-30: 'transformers >= 0.6' is needed because of happstack-server
56+
run: |
57+
cabal build --dependencies-only -O0 --disable-tests --constraint 'mtl >= 2.3.1' --constraint 'transformers >= 0.6' --allow-newer='Cabal:mtl' --allow-newer='Cabal:transformers'
58+
59+
- name: Build w/o tests with mtl-2.3
60+
# 2022-12-30: 'transformers >= 0.6' is needed because of happstack-server
61+
run: |
62+
cabal build -O0 --disable-tests --constraint 'mtl >= 2.3.1' --constraint 'transformers >= 0.6' --allow-newer='Cabal:mtl' --allow-newer='Cabal:transformers'

.github/workflows/haskell-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
106106
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
107107
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
108-
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
108+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
109109
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
110110
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
111111
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
@@ -212,7 +212,7 @@ jobs:
212212
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
213213
- name: tests
214214
run: |
215-
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
215+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi
216216
- name: cabal check
217217
run: |
218218
cd ${PKGDIR_hackage_server} || false
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
cabal update hackage.haskell.org,2022-08-27T00:00:00Z
4+
cabal build all --enable-tests

0 commit comments

Comments
 (0)