Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master -> central server jan 2023 #1158

Merged
merged 46 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2d4f3f7
delete unused GitHub Action; fix CI badge
peterbecich May 15, 2022
b21f35b
Fix #1076: separate validators from UI and doctest them (#1077)
andreasabel May 19, 2022
c2a34d7
Cachix caching for nix-shell GitHub Action (#1081)
peterbecich Jun 4, 2022
c995284
Add uploaded_at field in package api (#1080)
Kleidukos Jun 7, 2022
1248122
package page: Include virtual-modules in module tree (#1085)
mpickering Jun 23, 2022
ae4f14e
Allow hashable-1.4 and text-2.0 (#1089)
Bodigrim Jun 30, 2022
9fe9494
Divide sitemap into parts
AliasQli Jul 12, 2022
b9330e0
Add sitemap link for subdirectories
AliasQli Jul 16, 2022
10d14a2
Fix `non-canonical-return` warnings
andreasabel Jul 21, 2022
1daad17
Bump CI to GHC 9.2.3 and restrict to master branch
andreasabel Jul 21, 2022
5329594
Check authorisation (#1111)
AliasQli Jul 21, 2022
969915e
Dynamically add css piece
AliasQli Jul 23, 2022
c84f467
Fix #1105: change order of markdown parsers to allow pipes in lists
andreasabel Jul 24, 2022
33d7807
Fix #1128, fix #1130 by adding bounds to Cabal-syntax and haddock-lib…
andreasabel Aug 23, 2022
2377900
Bump CI to 9.2.4 and some deps
andreasabel Aug 23, 2022
db0f10a
Force .txt and .text to have UTF-8 MIME charset (#1133)
Kleidukos Aug 25, 2022
f6c1e48
Upgrade to haddock-library-1.11.0 (#1126)
AliasQli Aug 26, 2022
02cd189
attempt to speed up GitHub Action for Nix Shell
peterbecich Jun 26, 2022
e72ee4f
work with cabal 3.8
gbaz Sep 26, 2022
e907996
Updated accepted licenses (#1092)
kubaneko Oct 3, 2022
2dadc2a
Add dependabot for github workflows
andreasabel Oct 28, 2022
4fdadd9
Bump cachix/cachix-action from 10 to 12
dependabot[bot] Oct 28, 2022
6533596
Bump actions/checkout from 2.4.0 to 3.1.0
dependabot[bot] Oct 28, 2022
2a3ad24
Bump cachix/install-nix-action from 17 to 18
dependabot[bot] Oct 28, 2022
0632086
Build with Cabal-3.8 and GHC 9.4 (#1141)
andreasabel Oct 29, 2022
5e893c9
Haskell CI: bump to Ubuntu-22.04, GHC 9.2.5 and 9.4.4
andreasabel Dec 27, 2022
c2dd35c
Allow mtl-2.3 and transformers-0.6 (#1150)
andreasabel Dec 30, 2022
4af279e
Disable test (#1124)
AliasQli Dec 30, 2022
8b2be18
add deprecated version warning (#1123)
AliasQli Dec 30, 2022
a5bf92c
List maintainers on package page (#1098)
AliasQli Dec 30, 2022
8095dc0
Vendor snowball package (#1116)
AliasQli Dec 31, 2022
543b817
Add searchbox metadata (#1115)
AliasQli Dec 31, 2022
59d6dd7
Add captcha for user registration (#1099)
AliasQli Dec 31, 2022
10e4b9b
remove filtering 00-index for cabal version < 2.0 hack (#1152)
gbaz Dec 31, 2022
f624f6f
Add lastVersion in listings (#749) (#1140)
blackheaven Dec 31, 2022
021eea0
rm icu dep instructions, add libgd
gbaz Dec 31, 2022
3b75f8c
Add test log display (#1100)
AliasQli Dec 31, 2022
b7b67ee
Merge pull request #1103 from AliasQli/sitemap
gbaz Dec 31, 2022
4d0bd17
Reverse Dependencies indexed on PackageName (#1082)
ysangkok Jan 1, 2023
0a2ffe8
Add "Quick Jump" to candidate package page (#1122)
mpickering Jan 1, 2023
2f9a4ee
Solves #1029 - Adds paging to recent packages and recent revisions (#…
LeviButcher Jan 2, 2023
49bc947
Merge pull request #1113 from AliasQli/css
gbaz Jan 2, 2023
5f5b814
support for `prefers-color-scheme` (#1008)
peterbecich Jan 2, 2023
b13bc6e
Maintainer notifications
AliasQli Jan 4, 2023
6384905
cleanup buncha partial functions for revdeps, elim use of MonadThrow …
gbaz Jan 4, 2023
0f85c86
Merge branch 'central-server' into central-server-merge
gbaz Jan 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# From:
# - https://github.com/rhysd/actionlint/issues/228#issuecomment-1272493095
# - https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
62 changes: 62 additions & 0 deletions .github/workflows/cabal-mtl-2.3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Cabal build with mtl-2.3
on:
push:
branches:
- master
- ci*
pull_request:
branches:
- master
- ci*

defaults:
run:
shell: bash

jobs:
build:
name: Build with mtl-2.3
runs-on: ubuntu-latest
timeout-minutes: 60

steps:

- name: Environment settings based on the Haskell setup
run: |
GHC_VER=$(ghc --numeric-version)
CABAL_VER=$(cabal --numeric-version)
echo "GHC_VER = ${GHC_VER}"
echo "CABAL_VER = ${CABAL_VER}"
echo "GHC_VER=${GHC_VER}" >> "${GITHUB_ENV}"
echo "CABAL_VER=${CABAL_VER}" >> "${GITHUB_ENV}"

- name: Install necessary deps
run: |
sudo apt-get update
sudo apt-get install -y libgd-dev libpng-dev libjpeg-dev libfontconfig-dev libfreetype-dev libexpat1-dev

- uses: actions/checkout@v3

- name: Cache build
uses: actions/cache@v3
with:
path: |
~/.cabal
dist-newstyle
key: cabal-${{ env.CABAL_VER }}-ghc-${{ env.GHC_VER }}-commit-${{ github.sha }}
restore-keys: |
cabal-${{ env.CABAL_VER }}-ghc-${{ env.GHC_VER }}-commit-

- name: Prepare cabal
run: |
cabal update

- name: Build dependencies w/o tests with mtl-2.3
# 2022-12-30: 'transformers >= 0.6' is needed because of happstack-server
run: |
cabal build --dependencies-only -O0 --disable-tests --constraint 'mtl >= 2.3.1' --constraint 'transformers >= 0.6' --allow-newer='Cabal:mtl' --allow-newer='Cabal:transformers'

- name: Build w/o tests with mtl-2.3
# 2022-12-30: 'transformers >= 0.6' is needed because of happstack-server
run: |
cabal build -O0 --disable-tests --constraint 'mtl >= 2.3.1' --constraint 'transformers >= 0.6' --allow-newer='Cabal:mtl' --allow-newer='Cabal:transformers'
74 changes: 0 additions & 74 deletions .github/workflows/ci.yml.deactivated

This file was deleted.

84 changes: 38 additions & 46 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,40 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.14.3.20220416
# version: 0.15.20221225
#
# REGENDATA ("0.14.3.20220416",["github","hackage-server.cabal"])
# REGENDATA ("0.15.20221225",["github","hackage-server.cabal"])
#
name: Haskell-CI
on:
- push
- pull_request
push:
branches:
- master
- ci*
pull_request:
branches:
- master
- ci*
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
timeout-minutes:
60
container:
image: buildpack-deps:focal
image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
include:
- compiler: ghc-9.2.2
- compiler: ghc-9.4.4
compilerKind: ghc
compilerVersion: 9.2.2
compilerVersion: 9.4.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.5
compilerKind: ghc
compilerVersion: 9.2.5
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.2
Expand All @@ -46,31 +57,21 @@ jobs:
- compiler: ghc-8.8.4
compilerKind: ghc
compilerVersion: 8.8.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: apt
run: |
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.17.5/x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
apt-get update
apt-get install -y libbrotli-dev
else
apt-add-repository -y 'ppa:hvr/ghc'
apt-get update
apt-get install -y "$HCNAME" libbrotli-dev
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.17.5/x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
fi
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
apt-get update
apt-get install -y libbrotli-dev libgd-dev libpng-dev libjpeg-dev libfontconfig-dev libfreetype-dev libexpat1-dev
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -82,23 +83,14 @@ jobs:
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
if [ "${{ matrix.setup-method }}" = ghcup ]; then
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
else
HC=$HCDIR/bin/$HCKIND
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
fi

HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -152,7 +144,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: source
- name: initial cabal.project for sdist
Expand Down Expand Up @@ -180,15 +172,15 @@ jobs:
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(Cabal|hackage-server|parsec|text)$/; }' >> cabal.project.local
$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
cat cabal.project
cat cabal.project.local
- name: dump install plan
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand All @@ -205,14 +197,14 @@ jobs:
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
- name: tests
run: |
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi
- name: cabal check
run: |
cd ${PKGDIR_hackage_server} || false
${CABAL} -vnormal check
- name: haddock
run: |
$CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
- name: unconstrained build
run: |
rm -f cabal.project.local
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/nix-shell.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
# https://nix.dev/tutorials/continuous-integration-github-actions
name: "Test nix-shell"
on:
push:
branches:
- '**'
paths-ignore: []
- master
- ci*
pull_request:
paths-ignore: []

branches:
- master
- ci*
jobs:
nix-shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: cachix/install-nix-action@v16
- uses: actions/checkout@v3.1.0
- uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-21.11
- run: nix-shell --pure --run "cabal update && cabal build all --enable-tests"
extra_nix_config: |
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=
substituters = https://hydra.iohk.io https://cache.nixos.org/ https://hackage-server.cachix.org/
- uses: cachix/cachix-action@v12
with:
# https://nix.dev/tutorials/continuous-integration-github-actions#setting-up-github-actions
name: hackage-server
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix-shell --pure --run ./.github/workflows/test-nix-shell.sh
4 changes: 4 additions & 0 deletions .github/workflows/test-nix-shell.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

cabal update hackage.haskell.org,2022-08-27T00:00:00Z
cabal build all --enable-tests
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ This is the branch for the "official" Hackage server at hackage.haskell.org. Mos
# General Documentation
=======
[![Build Status](https://travis-ci.org/haskell/hackage-server.png?branch=master)](https://travis-ci.org/haskell/hackage-server)
[![Build status](https://github.com/haskell/hackage-server/actions/workflows/ci.yml/badge.svg)](https://github.com/haskell/hackage-server/actions/workflows/ci.yml)
[![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)
[![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)
Loading