Skip to content

Commit 6a1232e

Browse files
gbazpeterbecichandreasabelKleidukosmpickering
authored
master -> central server jan 2023 (#1158)
* delete unused GitHub Action; fix CI badge * Fix #1076: separate validators from UI and doctest them (#1077) * Cachix caching for nix-shell GitHub Action (#1081) * Add uploaded_at field in package api (#1080) * package page: Include virtual-modules in module tree (#1085) * Allow hashable-1.4 and text-2.0 (#1089) * Divide sitemap into parts * Add sitemap link for subdirectories * Fix `non-canonical-return` warnings * Bump CI to GHC 9.2.3 and restrict to master branch * Check authorisation (#1111) * Dynamically add css piece * Fix #1105: change order of markdown parsers to allow pipes in lists * Fix #1128, fix #1130 by adding bounds to Cabal-syntax and haddock-library * Bump CI to 9.2.4 and some deps * Force .txt and .text to have UTF-8 MIME charset (#1133) * Upgrade to haddock-library-1.11.0 (#1126) * attempt to speed up GitHub Action for Nix Shell * work with cabal 3.8 * Updated accepted licenses (#1092) * Add dependabot for github workflows * Bump cachix/cachix-action from 10 to 12 * Bump actions/checkout from 2.4.0 to 3.1.0 * Bump cachix/install-nix-action from 17 to 18 * Build with Cabal-3.8 and GHC 9.4 (#1141) * Haskell CI: bump to Ubuntu-22.04, GHC 9.2.5 and 9.4.4 * Allow mtl-2.3 and transformers-0.6 (#1150) * Disable test (#1124) * allow disable tests on client side * add deprecated version warning (#1123) * List maintainers on package page (#1098) * List maintainers on package page * Vendor snowball package (#1116) * Add searchbox metadata (#1115) * Add captcha for user registration (#1099) * remove filtering 00-index for cabal version < 2.0 hack (#1152) * Add lastVersion in listings (#749) (#1140) * rm icu dep instructions, add libgd * Add test log display (#1100) * Add test log * Reverse Dependencies indexed on PackageName (#1082) * Rebased Reverse Dependencies * Add "Quick Jump" to candidate package page (#1122) * Solves #1029 - Adds paging to recent packages and recent revisions (#1055) * support for `prefers-color-scheme` (#1008) * 2x brightness for captions and links in dark color scheme * table dark color scheme * prefers-color-scheme for links, footer, and table-of-contents * paginator css for `prefers-color-scheme` * Maintainer notifications * cleanup partial functions for revdeps, elim use of MonadThrow, MonadCatch * fix tests enablement link Co-authored-by: Peter Becich <[email protected]> Co-authored-by: Andreas Abel <[email protected]> Co-authored-by: Hécate Moonlight <[email protected]> Co-authored-by: Matthew Pickering <[email protected]> Co-authored-by: ˌbodʲɪˈɡrʲim <[email protected]> Co-authored-by: Alias Qli <[email protected]> Co-authored-by: Ondřej Kubánek <[email protected]> Co-authored-by: Gautier DI FOLCO <[email protected]> Co-authored-by: Janus Troelsen <[email protected]> Co-authored-by: Levi Butcher <[email protected]>
1 parent da8552d commit 6a1232e

File tree

100 files changed

+6211
-1527
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+6211
-1527
lines changed

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# From:
2+
# - https://github.com/rhysd/actionlint/issues/228#issuecomment-1272493095
3+
# - https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
4+
5+
# Set update schedule for GitHub Actions
6+
7+
version: 2
8+
updates:
9+
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
# Check for updates to GitHub Actions every week
14+
interval: "weekly"

.github/workflows/cabal-mtl-2.3.yml

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/ci.yml.deactivated

Lines changed: 0 additions & 74 deletions
This file was deleted.

.github/workflows/haskell-ci.yml

Lines changed: 38 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,40 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.14.3.20220416
11+
# version: 0.15.20221225
1212
#
13-
# REGENDATA ("0.14.3.20220416",["github","hackage-server.cabal"])
13+
# REGENDATA ("0.15.20221225",["github","hackage-server.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
17-
- push
18-
- pull_request
17+
push:
18+
branches:
19+
- master
20+
- ci*
21+
pull_request:
22+
branches:
23+
- master
24+
- ci*
1925
jobs:
2026
linux:
2127
name: Haskell-CI - Linux - ${{ matrix.compiler }}
22-
runs-on: ubuntu-18.04
28+
runs-on: ubuntu-20.04
2329
timeout-minutes:
2430
60
2531
container:
26-
image: buildpack-deps:focal
32+
image: buildpack-deps:jammy
2733
continue-on-error: ${{ matrix.allow-failure }}
2834
strategy:
2935
matrix:
3036
include:
31-
- compiler: ghc-9.2.2
37+
- compiler: ghc-9.4.4
3238
compilerKind: ghc
33-
compilerVersion: 9.2.2
39+
compilerVersion: 9.4.4
40+
setup-method: ghcup
41+
allow-failure: false
42+
- compiler: ghc-9.2.5
43+
compilerKind: ghc
44+
compilerVersion: 9.2.5
3445
setup-method: ghcup
3546
allow-failure: false
3647
- compiler: ghc-9.0.2
@@ -46,31 +57,21 @@ jobs:
4657
- compiler: ghc-8.8.4
4758
compilerKind: ghc
4859
compilerVersion: 8.8.4
49-
setup-method: hvr-ppa
60+
setup-method: ghcup
5061
allow-failure: false
5162
fail-fast: false
5263
steps:
5364
- name: apt
5465
run: |
5566
apt-get update
5667
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
57-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
58-
mkdir -p "$HOME/.ghcup/bin"
59-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.5/x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup"
60-
chmod a+x "$HOME/.ghcup/bin/ghcup"
61-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
62-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
63-
apt-get update
64-
apt-get install -y libbrotli-dev
65-
else
66-
apt-add-repository -y 'ppa:hvr/ghc'
67-
apt-get update
68-
apt-get install -y "$HCNAME" libbrotli-dev
69-
mkdir -p "$HOME/.ghcup/bin"
70-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.5/x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup"
71-
chmod a+x "$HOME/.ghcup/bin/ghcup"
72-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
73-
fi
68+
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"
70+
chmod a+x "$HOME/.ghcup/bin/ghcup"
71+
"$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)
73+
apt-get update
74+
apt-get install -y libbrotli-dev libgd-dev libpng-dev libjpeg-dev libfontconfig-dev libfreetype-dev libexpat1-dev
7475
env:
7576
HCKIND: ${{ matrix.compilerKind }}
7677
HCNAME: ${{ matrix.compiler }}
@@ -82,23 +83,14 @@ jobs:
8283
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
8384
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
8485
HCDIR=/opt/$HCKIND/$HCVER
85-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
86-
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
87-
echo "HC=$HC" >> "$GITHUB_ENV"
88-
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
89-
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
90-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
91-
else
92-
HC=$HCDIR/bin/$HCKIND
93-
echo "HC=$HC" >> "$GITHUB_ENV"
94-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
95-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
96-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
97-
fi
98-
86+
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
87+
echo "HC=$HC" >> "$GITHUB_ENV"
88+
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
89+
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
90+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
9991
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
10092
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
101-
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
93+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
10294
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
10395
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
10496
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
@@ -152,7 +144,7 @@ jobs:
152144
chmod a+x $HOME/.cabal/bin/cabal-plan
153145
cabal-plan --version
154146
- name: checkout
155-
uses: actions/checkout@v2
147+
uses: actions/checkout@v3
156148
with:
157149
path: source
158150
- name: initial cabal.project for sdist
@@ -180,15 +172,15 @@ jobs:
180172
echo " ghc-options: -Werror=missing-methods" >> cabal.project
181173
cat >> cabal.project <<EOF
182174
EOF
183-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(Cabal|hackage-server|parsec|text)$/; }' >> cabal.project.local
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
184176
cat cabal.project
185177
cat cabal.project.local
186178
- name: dump install plan
187179
run: |
188180
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
189181
cabal-plan
190182
- name: cache
191-
uses: actions/cache@v2
183+
uses: actions/cache@v3
192184
with:
193185
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
194186
path: ~/.cabal/store
@@ -205,14 +197,14 @@ jobs:
205197
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
206198
- name: tests
207199
run: |
208-
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
200+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi
209201
- name: cabal check
210202
run: |
211203
cd ${PKGDIR_hackage_server} || false
212204
${CABAL} -vnormal check
213205
- name: haddock
214206
run: |
215-
$CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
207+
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
216208
- name: unconstrained build
217209
run: |
218210
rm -f cabal.project.local

.github/workflows/nix-shell.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
1-
# https://nix.dev/tutorials/continuous-integration-github-actions
21
name: "Test nix-shell"
32
on:
43
push:
54
branches:
6-
- '**'
7-
paths-ignore: []
5+
- master
6+
- ci*
87
pull_request:
9-
paths-ignore: []
10-
8+
branches:
9+
- master
10+
- ci*
1111
jobs:
1212
nix-shell:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2.4.0
16-
- uses: cachix/install-nix-action@v16
15+
- uses: actions/checkout@v3.1.0
16+
- uses: cachix/install-nix-action@v18
1717
with:
1818
nix_path: nixpkgs=channel:nixos-21.11
19-
- run: nix-shell --pure --run "cabal update && cabal build all --enable-tests"
19+
extra_nix_config: |
20+
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=
21+
substituters = https://hydra.iohk.io https://cache.nixos.org/ https://hackage-server.cachix.org/
22+
- uses: cachix/cachix-action@v12
23+
with:
24+
# https://nix.dev/tutorials/continuous-integration-github-actions#setting-up-github-actions
25+
name: hackage-server
26+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
27+
- run: nix-shell --pure --run ./.github/workflows/test-nix-shell.sh

.github/workflows/test-nix-shell.sh

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ This is the branch for the "official" Hackage server at hackage.haskell.org. Mos
66
# General Documentation
77
=======
88
[![Build Status](https://travis-ci.org/haskell/hackage-server.png?branch=master)](https://travis-ci.org/haskell/hackage-server)
9-
[![Build status](https://github.com/haskell/hackage-server/actions/workflows/ci.yml/badge.svg)](https://github.com/haskell/hackage-server/actions/workflows/ci.yml)
9+
[![Build status](https://github.com/haskell/hackage-server/actions/workflows/haskell-ci.yml/badge.svg)](https://github.com/haskell/hackage-server/actions/workflows/haskell-ci.yml)
1010
[![Build status](https://github.com/haskell/hackage-server/actions/workflows/nix-shell.yml/badge.svg)](https://github.com/haskell/hackage-server/actions/workflows/nix-shell.yml)

0 commit comments

Comments
 (0)