Skip to content

Commit

Permalink
Merge pull request #730 from haskell-CI/move-postprocess
Browse files Browse the repository at this point in the history
Postprocess the empty config as well
  • Loading branch information
phadej authored Jun 7, 2024
2 parents 28aae7d + ad64394 commit afcc383
Show file tree
Hide file tree
Showing 22 changed files with 452 additions and 602 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.8.2
compilerKind: ghc
compilerVersion: 9.8.2
Expand Down Expand Up @@ -216,13 +221,15 @@ jobs:
ghc-options: -Werror=missing-methods -Werror=missing-fields
EOF
cat >> cabal.project <<EOF
allow-newer: ShellCheck:filepath
package haskell-ci
ghc-options: -Werror
package cabal-install-parsers
ghc-options: -Werror
keep-going: False
keep-going: False
package bytestring
tests: False
Expand Down
10 changes: 6 additions & 4 deletions cabal-install-parsers/cabal-install-parsers.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cabal-version: 2.2
name: cabal-install-parsers
version: 0.6.2
x-revision: 1
synopsis: Utilities to work with cabal-install files
description:
@cabal-install-parsers@ provides parsers for @cabal-install@ files:
Expand Down Expand Up @@ -33,6 +34,7 @@ tested-with:
|| ==9.4.8
|| ==9.6.5
|| ==9.8.2
|| ==9.10.1

extra-source-files:
Changelog.md
Expand Down Expand Up @@ -65,14 +67,14 @@ library

-- GHC-boot libraries
build-depends:
, base >=4.12 && <4.20
, base >=4.12 && <4.21
, binary ^>=0.8.6.0
, bytestring ^>=0.10.8.2 || ^>=0.11.1.0 || ^>=0.12.0.2
, Cabal-syntax ^>=3.12.0.0
, containers ^>=0.6.0.1
, containers ^>=0.6.0.1 || ^>=0.7
, deepseq ^>=1.4.2.0 || ^>=1.5.0.0
, directory ^>=1.3.0.0
, filepath ^>=1.4.1.1
, filepath ^>=1.4.1.1 || ^>=1.5.2.0
, parsec ^>=3.1.13.0
, pretty ^>=1.1.3.3
, text ^>=1.2.3.0 || ^>=2.0.1 || ^>=2.1
Expand Down Expand Up @@ -129,7 +131,7 @@ test-suite cabal-parsers-golden

-- dependencies needing explicit constraints
build-depends:
, ansi-terminal >=1.0 && <1.1
, ansi-terminal >=1.0 && <1.2
, tasty ^>=1.4 || ^>=1.5
, tasty-golden ^>=2.3.1.1
, tree-diff >=0.2 && <0.4
Expand Down
6 changes: 5 additions & 1 deletion cabal-install-parsers/src/Cabal/Config.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
Expand All @@ -22,7 +23,6 @@ import Control.Exception (throwIO)
import Data.ByteString (ByteString)
import Data.Function ((&))
import Data.Functor.Identity (Identity (..))
import Data.List (foldl')
import Data.List.NonEmpty (NonEmpty)
import Data.Map (Map)
import Data.Maybe (fromMaybe)
Expand All @@ -33,6 +33,10 @@ import System.Directory (getAppUserDataDirectory)
import System.Environment (lookupEnv)
import System.FilePath ((</>))

#if !MIN_VERSION_base(4,20,0)
import Data.Foldable (foldl')
#endif

import qualified Data.ByteString as BS
import qualified Data.Map.Strict as M
import qualified Distribution.CabalSpecVersion as C
Expand Down
7 changes: 6 additions & 1 deletion cabal-install-parsers/src/Cabal/Project.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
Expand Down Expand Up @@ -34,7 +35,7 @@ import Data.Either (partitionEithers)
import Data.Foldable (toList)
import Data.Function ((&))
import Data.Functor (void)
import Data.List (foldl', isSuffixOf)
import Data.List (isSuffixOf)
import Data.List.NonEmpty (NonEmpty)
import Data.Maybe (mapMaybe)
import Data.Traversable (for)
Expand All @@ -45,6 +46,10 @@ import Network.URI (URI (URI), parseURI)
import System.Directory (doesDirectoryExist, doesFileExist)
import System.FilePath (isAbsolute, normalise, splitDirectories, splitDrive, takeDirectory, (</>))

#if !MIN_VERSION_base(4,20,0)
import Data.Foldable (foldl')
#endif

import qualified Data.ByteString as BS
import qualified Data.Map.Strict as M
import qualified Distribution.CabalSpecVersion as C
Expand Down
2 changes: 2 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ tests: True
package haskell-ci
ghc-options: -Wall
ghc-options: -Werror

allow-newer: ShellCheck:filepath
46 changes: 23 additions & 23 deletions fixtures/all-versions.github
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
- compiler: ghc-9.0.1
compilerKind: ghc
compilerVersion: 9.0.1
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.7
compilerKind: ghc
Expand All @@ -181,107 +181,107 @@ jobs:
- compiler: ghc-8.10.4
compilerKind: ghc
compilerVersion: 8.10.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.3
compilerKind: ghc
compilerVersion: 8.10.3
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.2
compilerKind: ghc
compilerVersion: 8.10.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.1
compilerKind: ghc
compilerVersion: 8.10.1
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.8.4
compilerKind: ghc
compilerVersion: 8.8.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.8.3
compilerKind: ghc
compilerVersion: 8.8.3
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.8.2
compilerKind: ghc
compilerVersion: 8.8.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.8.1
compilerKind: ghc
compilerVersion: 8.8.1
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.4
compilerKind: ghc
compilerVersion: 8.6.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.3
compilerKind: ghc
compilerVersion: 8.6.3
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.2
compilerKind: ghc
compilerVersion: 8.6.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.1
compilerKind: ghc
compilerVersion: 8.6.1
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.4
compilerKind: ghc
compilerVersion: 8.4.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.3
compilerKind: ghc
compilerVersion: 8.4.3
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.2
compilerKind: ghc
compilerVersion: 8.4.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.1
compilerKind: ghc
compilerVersion: 8.4.1
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.2.2
compilerKind: ghc
compilerVersion: 8.2.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.2.1
compilerKind: ghc
compilerVersion: 8.2.1
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.0.2
compilerKind: ghc
compilerVersion: 8.0.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.0.1
compilerKind: ghc
compilerVersion: 8.0.1
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
Expand All @@ -301,7 +301,7 @@ jobs:
- name: apt
run: |
apt-get update
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 libnuma-dev
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
Expand Down
Loading

0 comments on commit afcc383

Please sign in to comment.