Unverified Commit a234f67a authored by Francesco Gazzetta's avatar Francesco Gazzetta Committed by GitHub
Browse files

Merge pull request #7318 from fgaz/ghc-9.0-ci

Add ghc 9.0 to ci
parents 6d90a0c7 d4b13067
...@@ -17,6 +17,48 @@ on: ...@@ -17,6 +17,48 @@ on:
- created - created
jobs: jobs:
validate-9_0_1:
name: validate.sh ghc-9.0.1
runs-on: ubuntu-18.04
needs: validate-8_8_3
container:
image: phadej/ghc:9.0.1-bionic
steps:
- name: System info
run: |
uname -a
- name: Set PATH
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
run: |
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
- name: Install cabal-plan
run: |
mkdir -p $HOME/.cabal/bin
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
echo "de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz" | sha256sum -c -
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
rm -f cabal-plan.xz
chmod a+x $HOME/.cabal/bin/cabal-plan
- name: Update Hackage index
run: cabal v2-update
# https://github.com/actions/checkout/issues/170
# - uses: actions/checkout@v2
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-9.0.1 -v --lib-only -s print-config
- name: Validate print-tool-versions
run: sh validate.sh -j 2 -w ghc-9.0.1 -v --lib-only -s print-tool-versions
- name: Validate build
run: sh validate.sh -j 2 -w ghc-9.0.1 -v --lib-only -s build
- name: Validate lib-tests
run: sh validate.sh -j 2 -w ghc-9.0.1 -v --lib-only -s lib-tests
- name: Validate lib-suite
run: sh validate.sh -j 2 -w ghc-9.0.1 -v --lib-only -s lib-suite
validate-8_10_1: validate-8_10_1:
name: validate.sh ghc-8.10.1 name: validate.sh ghc-8.10.1
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
......
...@@ -15,7 +15,7 @@ library ...@@ -15,7 +15,7 @@ library
, containers , containers
, pretty , pretty
, QuickCheck , QuickCheck
, rere ^>=0.1 , rere >=0.1 && <0.3
, tasty , tasty
, tasty-quickcheck , tasty-quickcheck
, transformers , transformers
......
...@@ -64,7 +64,7 @@ test-suite unit-tests ...@@ -64,7 +64,7 @@ test-suite unit-tests
, integer-logarithms >=1.0.2 && <1.1 , integer-logarithms >=1.0.2 && <1.1
, pretty , pretty
, QuickCheck >=2.14 && <2.15 , QuickCheck >=2.14 && <2.15
, rere >=0.1 && <0.2 , rere >=0.1 && <0.3
, tagged , tagged
, tasty >=1.2.3 && <1.4 , tasty >=1.2.3 && <1.4
, tasty-hunit , tasty-hunit
......
...@@ -22,7 +22,8 @@ main = do ...@@ -22,7 +22,8 @@ main = do
-- this shouldn't fail (run-time errors are due bugs in zinza) -- this shouldn't fail (run-time errors are due bugs in zinza)
w <- run Z w <- run Z
{ zJobs = { zJobs =
[ GhcJob "8.10.1" False "" False ["8.8.3"] defSteps [ GhcJob "9.0.1" False "--lib-only" False ["8.8.3"] libSteps
, GhcJob "8.10.1" False "" False ["8.8.3"] defSteps
, GhcJob "8.8.3" False "--solver-benchmarks" False [] defSteps , GhcJob "8.8.3" False "--solver-benchmarks" False [] defSteps
, GhcJob "8.6.5" False "--complete-hackage-tests" False ["8.8.3"] defSteps , GhcJob "8.6.5" False "--complete-hackage-tests" False ["8.8.3"] defSteps
, GhcJob "8.4.4" False "" False ["8.8.3"] defSteps , GhcJob "8.4.4" False "" False ["8.8.3"] defSteps
......
module Main (main) where module Main (module Demo) where
import Demo (main) import Demo (main)
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TemplateHaskell #-}
module TH where module TH where
import Language.Haskell.TH (ExpQ)
splice :: ExpQ
splice = [| () |] splice = [| () |]
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TemplateHaskell #-}
module TH where module TH where
import Language.Haskell.TH (ExpQ)
splice :: ExpQ
splice = [| () |] splice = [| () |]
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TemplateHaskell #-}
module TH where module TH where
import Language.Haskell.TH (ExpQ)
splice :: ExpQ
splice = [| () |] splice = [| () |]
...@@ -26,7 +26,7 @@ common shared ...@@ -26,7 +26,7 @@ common shared
default-language: Haskell2010 default-language: Haskell2010
build-depends: build-depends:
, base >= 4.6 && <4.15 , base >= 4.6 && <4.16
-- this needs to match the in-tree lib:Cabal version -- this needs to match the in-tree lib:Cabal version
, Cabal == 3.5.0.0 , Cabal == 3.5.0.0
...@@ -67,8 +67,9 @@ library ...@@ -67,8 +67,9 @@ library
, filepath ^>= 1.3.0.1 || ^>= 1.4.0.0 , filepath ^>= 1.3.0.1 || ^>= 1.4.0.0
, optparse-applicative ^>= 0.14.3.0 || ^>=0.15.1.0 || ^>=0.16.0.0 , optparse-applicative ^>= 0.14.3.0 || ^>=0.15.1.0 || ^>=0.16.0.0
, process ^>= 1.1.0.2 || ^>= 1.2.0.0 || ^>= 1.4.2.0 || ^>= 1.6.1.0 , process ^>= 1.1.0.2 || ^>= 1.2.0.0 || ^>= 1.4.2.0 || ^>= 1.6.1.0
, regex-compat-tdfa ^>= 0.95.1.4 , regex-base ^>= 0.94.0.1
, regex-tdfa ^>= 1.2.3.1 || ^>=1.3.1.0 , regex-tdfa ^>= 1.2.3.1 || ^>=1.3.1.0
, array ^>= 0.4.0.1 || ^>= 0.5.0.0
, temporary ^>= 1.3 , temporary ^>= 1.3
, text ^>= 1.2.3.1 , text ^>= 1.2.3.1
, transformers ^>= 0.3.0.0 || ^>= 0.4.2.0 || ^>= 0.5.2.0 , transformers ^>= 0.3.0.0 || ^>= 0.4.2.0 || ^>= 0.5.2.0
...@@ -109,5 +110,5 @@ executable setup ...@@ -109,5 +110,5 @@ executable setup
custom-setup custom-setup
-- we only depend on even stable releases of lib:Cabal -- we only depend on even stable releases of lib:Cabal
setup-depends: Cabal == 2.2.* || == 2.4.* || == 3.0.* || ==3.2.*, setup-depends: Cabal == 2.2.* || == 2.4.* || == 3.0.* || ==3.2.* || ==3.4.*,
base, filepath, directory base, filepath, directory
...@@ -11,9 +11,11 @@ import Distribution.Pretty ...@@ -11,9 +11,11 @@ import Distribution.Pretty
import Distribution.Package import Distribution.Package
import Distribution.System import Distribution.System
import qualified Data.Foldable as F import Text.Regex.Base
import Text.Regex.TDFA
import Data.Array ((!))
import Text.Regex import qualified Data.Foldable as F
normalizeOutput :: NormalizerEnv -> String -> String normalizeOutput :: NormalizerEnv -> String -> String
normalizeOutput nenv = normalizeOutput nenv =
...@@ -80,6 +82,41 @@ posixSpecialChars = ".^$*+?()[{\\|" ...@@ -80,6 +82,41 @@ posixSpecialChars = ".^$*+?()[{\\|"
posixRegexEscape :: String -> String posixRegexEscape :: String -> String
posixRegexEscape = concatMap (\c -> if c `elem` posixSpecialChars then ['\\', c] else [c]) posixRegexEscape = concatMap (\c -> if c `elem` posixSpecialChars then ['\\', c] else [c])
-- From regex-compat-tdfa by Christopher Kuklewicz and shelarcy, BSD-3-Clause
-------------------------
resub :: String {- search -} -> String {- replace -} -> String {- input -} -> String resub :: String {- search -} -> String {- replace -} -> String {- input -} -> String
resub search replace s = resub _ _ "" = ""
subRegex (mkRegex search) s replace resub regexp repl inp =
let compile _i str [] = \ _m -> (str ++)
compile i str (("\\", (off, len)) : rest) =
let i' = off + len
pre = take (off - i) str
str' = drop (i' - i) str
in if null str' then \ _m -> (pre ++) . ('\\' :)
else \ m -> (pre ++) . ('\\' :) . compile i' str' rest m
compile i str ((xstr, (off, len)) : rest) =
let i' = off + len
pre = take (off - i) str
str' = drop (i' - i) str
x = read xstr
in if null str' then \ m -> (pre++) . (fst (m ! x) ++)
else \ m -> (pre ++) . (fst (m ! x) ++) . compile i' str' rest m
compiled :: MatchText String -> String -> String
compiled = compile 0 repl findrefs where
-- bre matches a backslash then capture either a backslash or some digits
bre = mkRegex "\\\\(\\\\|[0-9]+)"
findrefs = map (\m -> (fst (m ! 1), snd (m ! 0))) (matchAllText bre repl)
go _i str [] = str
go i str (m : ms) =
let (_, (off, len)) = m ! 0
i' = off + len
pre = take (off - i) str
str' = drop (i' - i) str
in if null str' then pre ++ compiled m ""
else pre ++ compiled m (go i' str' ms)
in go 0 inp (matchAllText (mkRegex regexp) inp)
mkRegex :: String -> Regex
mkRegex s = makeRegexOpts opt defaultExecOpt s
where opt = defaultCompOpt { newSyntax = True, multiline = True }
...@@ -19,3 +19,6 @@ package Cabal ...@@ -19,3 +19,6 @@ package Cabal
ghc-options: -Werror -fno-ignore-asserts ghc-options: -Werror -fno-ignore-asserts
package cabal-testsuite package cabal-testsuite
ghc-options: -Werror -fno-ignore-asserts ghc-options: -Werror -fno-ignore-asserts
-- https://github.com/haskell-hvr/cryptohash-sha256/issues/12
allow-newer: cryptohash-sha256:base
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment