Skip to content

Commit 6d31be3

Browse files
committed
Merge branch 'master' into central-server
2 parents f91864b + bc194a3 commit 6d31be3

33 files changed

+1170
-228
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.github/workflows/cabal.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
- ci*
6+
pull_request:
7+
branches:
8+
- master
9+
- ci*
10+
name: Cabal
11+
jobs:
12+
build:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
ghc: ['9.4.4', '9.2.7', '9.0.2']
18+
cabal: ['3.8.1.0']
19+
os: [ubuntu-latest]
20+
name: Cabal with GHC ${{ matrix.ghc }}
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Setup Haskell
24+
uses: haskell/actions/setup@v2
25+
with:
26+
ghc-version: ${{ matrix.ghc }}
27+
cabal-version: ${{ matrix.cabal }}
28+
- name: Install dependencies
29+
run: sudo apt install -y libbrotli-dev libgd-dev
30+
- name: Build
31+
run: cabal build all --enable-tests
32+
- name: Test
33+
run: cabal test all --enable-tests
34+
- name: Haddock
35+
run: cabal haddock all
36+
build_with_mtl_2_3:
37+
runs-on: ${{ matrix.os }}
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
ghc: ['9.4.4']
42+
cabal: ['3.8.1.0']
43+
os: [ubuntu-latest]
44+
name: Cabal with GHC ${{ matrix.ghc }} and mtl >= 2.3.1
45+
steps:
46+
- uses: actions/checkout@v3
47+
- name: Setup Haskell
48+
uses: haskell/actions/setup@v2
49+
with:
50+
ghc-version: ${{ matrix.ghc }}
51+
cabal-version: ${{ matrix.cabal }}
52+
- name: Install dependencies
53+
run: sudo apt install -y libbrotli-dev libgd-dev
54+
- name: Build dependencies with mtl >= 2.3.1
55+
# 2022-12-30: 'transformers >= 0.6' is needed because of happstack-server
56+
run: cabal build all --disable-tests --dependencies-only -O0 --constraint 'mtl >= 2.3.1' --constraint 'transformers >= 0.6' --allow-newer='Cabal:mtl' --allow-newer='Cabal:transformers'
57+
- name: Build with mtl >= 2.3.1
58+
# 2022-12-30: 'transformers >= 0.6' is needed because of happstack-server
59+
run: cabal build all --disable-tests -O0 --constraint 'mtl >= 2.3.1' --constraint 'transformers >= 0.6' --allow-newer='Cabal:mtl' --allow-newer='Cabal:transformers'

.github/workflows/haskell-ci.yml

Lines changed: 23 additions & 12 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.15.20221225
11+
# version: 0.15.20230321
1212
#
13-
# REGENDATA ("0.15.20221225",["github","hackage-server.cabal"])
13+
# REGENDATA ("0.15.20230321",["github","hackage-server.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -34,14 +34,19 @@ jobs:
3434
strategy:
3535
matrix:
3636
include:
37+
- compiler: ghc-9.6.1
38+
compilerKind: ghc
39+
compilerVersion: 9.6.1
40+
setup-method: ghcup
41+
allow-failure: false
3742
- compiler: ghc-9.4.4
3843
compilerKind: ghc
3944
compilerVersion: 9.4.4
4045
setup-method: ghcup
4146
allow-failure: false
42-
- compiler: ghc-9.2.5
47+
- compiler: ghc-9.2.7
4348
compilerKind: ghc
44-
compilerVersion: 9.2.5
49+
compilerVersion: 9.2.7
4550
setup-method: ghcup
4651
allow-failure: false
4752
- compiler: ghc-9.0.2
@@ -66,12 +71,12 @@ jobs:
6671
apt-get update
6772
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
6873
mkdir -p "$HOME/.ghcup/bin"
69-
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
74+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
7075
chmod a+x "$HOME/.ghcup/bin/ghcup"
7176
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
72-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
77+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
7378
apt-get update
74-
apt-get install -y libbrotli-dev libgd-dev libpng-dev libjpeg-dev libfontconfig-dev libfreetype-dev libexpat1-dev
79+
apt-get install -y libbrotli-dev libgd-dev
7580
env:
7681
HCKIND: ${{ matrix.compilerKind }}
7782
HCNAME: ${{ matrix.compiler }}
@@ -87,7 +92,7 @@ jobs:
8792
echo "HC=$HC" >> "$GITHUB_ENV"
8893
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
8994
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
90-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
95+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
9196
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
9297
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
9398
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
@@ -172,15 +177,15 @@ jobs:
172177
echo " ghc-options: -Werror=missing-methods" >> cabal.project
173178
cat >> cabal.project <<EOF
174179
EOF
175-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(Cabal|hackage-server|parsec|process|text)$/; }' >> cabal.project.local
180+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(Cabal|Cabal-syntax|hackage-server|parsec|process|text)$/; }' >> cabal.project.local
176181
cat cabal.project
177182
cat cabal.project.local
178183
- name: dump install plan
179184
run: |
180185
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
181186
cabal-plan
182-
- name: cache
183-
uses: actions/cache@v3
187+
- name: restore cache
188+
uses: actions/cache/restore@v3
184189
with:
185190
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
186191
path: ~/.cabal/store
@@ -204,8 +209,14 @@ jobs:
204209
${CABAL} -vnormal check
205210
- name: haddock
206211
run: |
207-
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
212+
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
208213
- name: unconstrained build
209214
run: |
210215
rm -f cabal.project.local
211216
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
217+
- name: save cache
218+
uses: actions/cache/save@v3
219+
if: always()
220+
with:
221+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
222+
path: ~/.cabal/store
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
1-
name: "Test nix-shell"
1+
name: "Test Nix Flake"
22
on:
33
push:
44
branches:
55
- master
6-
- ci*
76
pull_request:
87
branches:
98
- master
10-
- ci*
119
jobs:
12-
nix-shell:
13-
runs-on: ubuntu-latest
10+
nix:
11+
strategy:
12+
fail-fast: true
13+
matrix:
14+
os:
15+
- ubuntu-latest
16+
# - macos-latest
17+
name: Nix on ${{ matrix.os }}
18+
runs-on: ${{ matrix.os }}
1419
steps:
1520
- uses: actions/[email protected]
16-
- uses: cachix/install-nix-action@v18
21+
- uses: cachix/install-nix-action@v20
1722
with:
18-
nix_path: nixpkgs=channel:nixos-21.11
1923
extra_nix_config: |
2024
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hackage-server.cachix.org-1:iw0iRh6+gsFIrxROFaAt5gKNgIHejKjIfyRdbpPYevY=
2125
substituters = https://hydra.iohk.io https://cache.nixos.org/ https://hackage-server.cachix.org/
@@ -24,4 +28,5 @@ jobs:
2428
# https://nix.dev/tutorials/continuous-integration-github-actions#setting-up-github-actions
2529
name: hackage-server
2630
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
27-
- run: nix-shell --pure --run ./.github/workflows/test-nix-shell.sh
31+
- run: nix build
32+
# - run: nix flake check

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ tags
1515
*.swp
1616
TAGS
1717
*~
18+
.direnv
19+
20+
result*

cabal.haskell-ci

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
branches: master ci*
22

3-
installed: +all -Cabal -text -parsec -process
4-
-- Cabal-3.8.1.0 wants process-1.6.14 or newer
5-
6-
-- Did not help to salvage ghc-9.2 and below:
7-
-- installed: -all +ghc
3+
installed: +all -Cabal -Cabal-syntax -text -parsec -process
84

95
-- Does not work with GHA:
106
-- -- allow failures with ghc-7.6 and ghc-7.8
@@ -13,14 +9,15 @@ installed: +all -Cabal -text -parsec -process
139
-- Use Ubuntu 22.04
1410
distribution: jammy
1511

16-
apt: libbrotli-dev
12+
apt: libbrotli-dev libgd-dev
13+
-- libgd-dev is for gd via hs-captcha
1714

1815
-- Make sure the haddock step is included,
1916
-- even though we don't define any library.
2017
haddock-components: all
2118
-- since haskell-ci 0.15.20220822
2219

23-
tests: >= 9.4
24-
-- parallel-doctest uses the ghc package
25-
-- and thus does not build with Cabal-3.8.1.0 below GHC 9.4
26-
-- See: https://github.com/haskell/cabal/issues/8554
20+
-- tests: >= 9.4
21+
-- -- parallel-doctest uses the ghc package
22+
-- -- and thus does not build with Cabal-3.8.1.0 below GHC 9.4
23+
-- -- See: https://github.com/haskell/cabal/issues/8554

cabal.project

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
packages: .
1010

11-
1211
allow-newer: rss:time, rss:base
1312

1413
-- Andreas, 2022-10-28: `Cabal-3.8.1.0` wants `process >= 1.6.14`

datafiles/static/hackage.css

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,23 @@
44

55
/* Is this portable? */
66
html {
7-
background-color: white;
87
width: 100%;
98
height: 100%;
109
}
1110

1211
@media (prefers-color-scheme: dark) {
12+
html {
13+
background-color: #333;
14+
}
1315
body {
1416
background: #333;
1517
color: #fefefe;
1618
}
1719
}
1820
@media (prefers-color-scheme: light) {
21+
html {
22+
background-color: #fefefe;
23+
}
1924
body {
2025
background: #fefefe;
2126
color: #333;
@@ -140,22 +145,38 @@ pre, code, kbd, samp, .src {
140145
font-size: 85%; /* 11pt */
141146
}
142147

143-
.candidate-warn {
144-
background-color: #ffdddd;
148+
@media (prefers-color-scheme: dark) {
149+
.candidate-warn {
145150
border-left: 6px solid #f44336;
146151
padding: 0.01em 16px;
147152
margin-bottom: 8px !important;
148153
margin-top: 8px !important;
154+
}
155+
156+
.candidate-info {
157+
border-left: 6px solid #2196F3;
158+
padding: 0.01em 16px;
159+
margin-bottom: 8px;
160+
}
149161
}
150162

151-
.candidate-info {
163+
@media (prefers-color-scheme: light) {
164+
.candidate-warn {
165+
background-color: #ffdddd;
166+
border-left: 6px solid #f44336;
167+
padding: 0.01em 16px;
168+
margin-bottom: 8px !important;
169+
margin-top: 8px !important;
170+
}
171+
172+
.candidate-info {
152173
background-color: #e7f3fe;
153174
border-left: 6px solid #2196F3;
154175
padding: 0.01em 16px;
155176
margin-bottom: 8px;
177+
}
156178
}
157179

158-
159180
/* @end */
160181

161182
/* @group Common */
@@ -529,7 +550,6 @@ table.properties td, table.properties th {
529550
padding-bottom: 3em;
530551
}
531552

532-
533553
#page-header {
534554
background: #5E5184;
535555
border-bottom: 5px solid rgba(69, 59, 97, 0.5);
@@ -1014,12 +1034,21 @@ p.tip {
10141034

10151035
/* Misc admin forms */
10161036

1017-
.box {
1018-
background: #faf9dc;
1019-
border: 1px solid #d8d7ad;
1020-
padding: 0.5em 1em;
1021-
max-width: 35em;
1022-
margin: 0.5em 0 1em 1em;
1037+
@media (prefers-color-scheme: dark) {
1038+
.box {
1039+
padding: 0.5em 1em;
1040+
max-width: 35em;
1041+
margin: 0.5em 0 1em 1em;
1042+
}
1043+
}
1044+
@media (prefers-color-scheme: light) {
1045+
.box {
1046+
background: #faf9dc;
1047+
border: 1px solid #d8d7ad;
1048+
padding: 0.5em 1em;
1049+
max-width: 35em;
1050+
margin: 0.5em 0 1em 1em;
1051+
}
10231052
}
10241053

10251054
table.simpletable th, table.simpletable td {
@@ -1216,3 +1245,20 @@ p.registration-email {
12161245
border: 1px solid rgb(196,69,29);
12171246
padding: 0 1em;
12181247
}
1248+
1249+
@media (prefers-color-scheme: dark) {
1250+
div#modal #content {
1251+
background: #222;
1252+
}
1253+
}
1254+
@media (prefers-color-scheme: light) {
1255+
div#modal #content {
1256+
background: #fff;
1257+
}
1258+
}
1259+
1260+
@media (prefers-color-scheme: dark) {
1261+
#search-results {
1262+
background: #222;
1263+
}
1264+
}

datafiles/templates/Html/package-page.html.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
$if(isDeprecated)$
3838
<div id="deprecated">
39-
<span style="color:#D00B3C">Deprecated.</span>
39+
<span style="color:#D00B3C">Deprecated</span>
4040
$deprecatedMsg$
4141
</div>
4242
$else$

0 commit comments

Comments
 (0)