mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-18 13:23:46 -07:00
Merge pull request #425 from xmonad/hlint
CI maintenance (hlint workflow, GHA deprecations, GHC 9.4)
This commit is contained in:
2
.github/workflows/generatemanpage.yml
vendored
2
.github/workflows/generatemanpage.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Clone project
|
- name: Clone project
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
40
.github/workflows/haskell-ci.yml
vendored
40
.github/workflows/haskell-ci.yml
vendored
@@ -8,9 +8,9 @@
|
|||||||
#
|
#
|
||||||
# For more information, see https://github.com/haskell-CI/haskell-ci
|
# For more information, see https://github.com/haskell-CI/haskell-ci
|
||||||
#
|
#
|
||||||
# version: 0.14.3
|
# version: 0.15.20221009
|
||||||
#
|
#
|
||||||
# REGENDATA ("0.14.3",["github","cabal.project"])
|
# REGENDATA ("0.15.20221009",["github","cabal.project"])
|
||||||
#
|
#
|
||||||
name: Haskell-CI
|
name: Haskell-CI
|
||||||
on:
|
on:
|
||||||
@@ -26,7 +26,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
linux:
|
linux:
|
||||||
name: Haskell-CI - Linux - ${{ matrix.compiler }}
|
name: Haskell-CI - Linux - ${{ matrix.compiler }}
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes:
|
timeout-minutes:
|
||||||
60
|
60
|
||||||
container:
|
container:
|
||||||
@@ -35,9 +35,14 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- compiler: ghc-9.2.2
|
- compiler: ghc-9.4.2
|
||||||
compilerKind: ghc
|
compilerKind: ghc
|
||||||
compilerVersion: 9.2.2
|
compilerVersion: 9.4.2
|
||||||
|
setup-method: ghcup
|
||||||
|
allow-failure: false
|
||||||
|
- compiler: ghc-9.2.4
|
||||||
|
compilerKind: ghc
|
||||||
|
compilerVersion: 9.2.4
|
||||||
setup-method: ghcup
|
setup-method: ghcup
|
||||||
allow-failure: false
|
allow-failure: false
|
||||||
- compiler: ghc-9.0.2
|
- compiler: ghc-9.0.2
|
||||||
@@ -74,10 +79,10 @@ jobs:
|
|||||||
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
|
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
|
||||||
if [ "${{ matrix.setup-method }}" = ghcup ]; then
|
if [ "${{ matrix.setup-method }}" = ghcup ]; then
|
||||||
mkdir -p "$HOME/.ghcup/bin"
|
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"
|
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"
|
chmod a+x "$HOME/.ghcup/bin/ghcup"
|
||||||
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
|
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
|
||||||
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
|
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y libx11-dev libxext-dev libxinerama-dev libxrandr-dev libxss-dev
|
apt-get install -y libx11-dev libxext-dev libxinerama-dev libxrandr-dev libxss-dev
|
||||||
else
|
else
|
||||||
@@ -85,9 +90,9 @@ jobs:
|
|||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y "$HCNAME" libx11-dev libxext-dev libxinerama-dev libxrandr-dev libxss-dev
|
apt-get install -y "$HCNAME" libx11-dev libxext-dev libxinerama-dev libxrandr-dev libxss-dev
|
||||||
mkdir -p "$HOME/.ghcup/bin"
|
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"
|
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"
|
chmod a+x "$HOME/.ghcup/bin/ghcup"
|
||||||
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
|
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
|
||||||
fi
|
fi
|
||||||
env:
|
env:
|
||||||
HCKIND: ${{ matrix.compilerKind }}
|
HCKIND: ${{ matrix.compilerKind }}
|
||||||
@@ -160,11 +165,6 @@ jobs:
|
|||||||
- name: update cabal index
|
- name: update cabal index
|
||||||
run: |
|
run: |
|
||||||
$CABAL v2-update -v
|
$CABAL v2-update -v
|
||||||
- name: cache (tools)
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-c0dbbd39
|
|
||||||
path: ~/.haskell-ci-tools
|
|
||||||
- name: install cabal-plan
|
- name: install cabal-plan
|
||||||
run: |
|
run: |
|
||||||
mkdir -p $HOME/.cabal/bin
|
mkdir -p $HOME/.cabal/bin
|
||||||
@@ -174,12 +174,6 @@ jobs:
|
|||||||
rm -f cabal-plan.xz
|
rm -f cabal-plan.xz
|
||||||
chmod a+x $HOME/.cabal/bin/cabal-plan
|
chmod a+x $HOME/.cabal/bin/cabal-plan
|
||||||
cabal-plan --version
|
cabal-plan --version
|
||||||
- name: install hlint
|
|
||||||
run: |
|
|
||||||
if [ $((HCNUMVER >= 90000 && HCNUMVER < 90200)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.4 && <3.5' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
|
|
||||||
if [ $((HCNUMVER >= 90000 && HCNUMVER < 90200)) -ne 0 ] ; then if [ ! -e $HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint ]; then echo "Downloading HLint version $HLINTVER"; mkdir -p $HOME/.haskell-ci-tools; curl --write-out 'Status Code: %{http_code} Redirects: %{num_redirects} Total time: %{time_total} Total Dsize: %{size_download}\n' --silent --location --output $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz "https://github.com/ndmitchell/hlint/releases/download/v$HLINTVER/hlint-$HLINTVER-x86_64-linux.tar.gz"; tar -xzv -f $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz -C $HOME/.haskell-ci-tools; fi ; fi
|
|
||||||
if [ $((HCNUMVER >= 90000 && HCNUMVER < 90200)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
|
|
||||||
if [ $((HCNUMVER >= 90000 && HCNUMVER < 90200)) -ne 0 ] ; then hlint --version ; fi
|
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@@ -239,10 +233,6 @@ jobs:
|
|||||||
- name: tests
|
- name: tests
|
||||||
run: |
|
run: |
|
||||||
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
|
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
|
||||||
- name: hlint
|
|
||||||
run: |
|
|
||||||
if [ $((HCNUMVER >= 90000 && HCNUMVER < 90200)) -ne 0 ] ; then (cd ${PKGDIR_xmonad} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml -XHaskell2010 src) ; fi
|
|
||||||
if [ $((HCNUMVER >= 90000 && HCNUMVER < 90200)) -ne 0 ] ; then (cd ${PKGDIR_xmonad} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml -XHaskell2010 .) ; fi
|
|
||||||
- name: cabal check
|
- name: cabal check
|
||||||
run: |
|
run: |
|
||||||
cd ${PKGDIR_xmonad} || false
|
cd ${PKGDIR_xmonad} || false
|
||||||
|
22
.github/workflows/hlint.yaml
vendored
Normal file
22
.github/workflows/hlint.yaml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: hlint
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
hlint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: 'Set up HLint'
|
||||||
|
uses: haskell/actions/hlint-setup@v2
|
||||||
|
with:
|
||||||
|
version: '3.4.1'
|
||||||
|
|
||||||
|
- name: 'Run HLint'
|
||||||
|
uses: haskell/actions/hlint-run@v2
|
||||||
|
with:
|
||||||
|
path: '.'
|
||||||
|
fail-on: status
|
4
.github/workflows/nix.yml
vendored
4
.github/workflows/nix.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@v13
|
uses: cachix/install-nix-action@v18
|
||||||
with:
|
with:
|
||||||
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
|
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
|
||||||
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
|
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
|
||||||
@@ -20,6 +20,6 @@ jobs:
|
|||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Clone project
|
- name: Clone project
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Build
|
- name: Build
|
||||||
run: nix build --print-build-logs
|
run: nix build --print-build-logs
|
||||||
|
2
.github/workflows/packdeps.yml
vendored
2
.github/workflows/packdeps.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone project
|
- name: Clone project
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Setup Haskell
|
- name: Setup Haskell
|
||||||
uses: haskell/actions/setup@v1
|
uses: haskell/actions/setup@v1
|
||||||
with:
|
with:
|
||||||
|
31
.github/workflows/stack.yml
vendored
31
.github/workflows/stack.yml
vendored
@@ -12,20 +12,15 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- resolver: lts-12
|
- resolver: lts-12 # GHC 8.4
|
||||||
ghc: 8.4.4
|
- resolver: lts-14 # GHC 8.6
|
||||||
- resolver: lts-14
|
- resolver: lts-16 # GHC 8.8
|
||||||
ghc: 8.6.5
|
- resolver: lts-18 # GHC 8.10
|
||||||
- resolver: lts-16
|
- resolver: lts-19 # GHC 9.0
|
||||||
ghc: 8.8.4
|
|
||||||
- resolver: lts-18
|
|
||||||
ghc: 8.10.7
|
|
||||||
- resolver: lts-19
|
|
||||||
ghc: 9.0.2
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone project
|
- name: Clone project
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Prepare apt sources
|
- name: Prepare apt sources
|
||||||
run: |
|
run: |
|
||||||
@@ -44,14 +39,6 @@ jobs:
|
|||||||
libxss-dev \
|
libxss-dev \
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: Install GHC
|
|
||||||
# use system ghc (if available) in stack, don't waste GH Actions cache space
|
|
||||||
continue-on-error: true
|
|
||||||
run: |
|
|
||||||
set -ex
|
|
||||||
sudo apt install -y ghc-${{ matrix.ghc }}
|
|
||||||
echo /opt/ghc/${{ matrix.ghc }}/bin >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: Refresh caches once a month
|
- name: Refresh caches once a month
|
||||||
id: cache-date
|
id: cache-date
|
||||||
# GHA writes caches on the first miss and then never updates them again;
|
# GHA writes caches on the first miss and then never updates them again;
|
||||||
@@ -59,16 +46,16 @@ jobs:
|
|||||||
# date is prefixed with an epoch number to let us manually refresh the
|
# date is prefixed with an epoch number to let us manually refresh the
|
||||||
# cache when needed. This is a workaround for https://github.com/actions/cache/issues/2
|
# cache when needed. This is a workaround for https://github.com/actions/cache/issues/2
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=date::1-$(date +%Y-%m)"
|
date +date=1-%Y-%m >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Cache Haskell package metadata
|
- name: Cache Haskell package metadata
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ~/.stack/pantry
|
path: ~/.stack/pantry
|
||||||
key: stack-pantry-${{ runner.os }}-${{ steps.cache-date.outputs.date }}
|
key: stack-pantry-${{ runner.os }}-${{ steps.cache-date.outputs.date }}
|
||||||
|
|
||||||
- name: Cache Haskell dependencies
|
- name: Cache Haskell dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.stack/*
|
~/.stack/*
|
||||||
|
@@ -5,11 +5,6 @@ apt:
|
|||||||
libxrandr-dev
|
libxrandr-dev
|
||||||
libxss-dev
|
libxss-dev
|
||||||
|
|
||||||
hlint: True
|
|
||||||
hlint-job: 9.0.2
|
|
||||||
hlint-yaml: .hlint.yaml
|
|
||||||
hlint-version: ==3.4.*
|
|
||||||
|
|
||||||
github-patches:
|
github-patches:
|
||||||
.github/workflows/haskell-ci-hackage.patch
|
.github/workflows/haskell-ci-hackage.patch
|
||||||
|
|
||||||
@@ -17,3 +12,6 @@ raw-project
|
|||||||
optimization: False
|
optimization: False
|
||||||
package xmonad
|
package xmonad
|
||||||
flags: +pedantic
|
flags: +pedantic
|
||||||
|
|
||||||
|
-- avoid --haddock-all which overwrites *-docs.tar.gz with tests docs
|
||||||
|
haddock-components: libs
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
{-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-orphans #-}
|
||||||
{-# LANGUAGE TypeFamilies #-}
|
{-# LANGUAGE TypeFamilies #-}
|
||||||
|
{-# LANGUAGE TypeOperators #-}
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
-- |
|
-- |
|
||||||
-- Module : XMonad.Config
|
-- Module : XMonad.Config
|
||||||
|
@@ -27,7 +27,7 @@ author: Spencer Janssen, Don Stewart, Adam Vogt, David Roundy, Jason
|
|||||||
Ondřej Súkup, Paul Hebble, Shachaf Ben-Kiki, Siim Põder, Tim McIver,
|
Ondřej Súkup, Paul Hebble, Shachaf Ben-Kiki, Siim Põder, Tim McIver,
|
||||||
Trevor Elliott, Wouter Swierstra, Conrad Irwin, Tim Thelion, Tony Zorman
|
Trevor Elliott, Wouter Swierstra, Conrad Irwin, Tim Thelion, Tony Zorman
|
||||||
maintainer: xmonad@haskell.org
|
maintainer: xmonad@haskell.org
|
||||||
tested-with: GHC == 8.4.4 || == 8.6.5 || == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.2
|
tested-with: GHC == 8.4.4 || == 8.6.5 || == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.4 || == 9.4.2
|
||||||
category: System
|
category: System
|
||||||
homepage: http://xmonad.org
|
homepage: http://xmonad.org
|
||||||
bug-reports: https://github.com/xmonad/xmonad/issues
|
bug-reports: https://github.com/xmonad/xmonad/issues
|
||||||
|
Reference in New Issue
Block a user