Skip to content

Commit

Permalink
Merge pull request #675 from haskell-CI/ghc-9.8.1-alpha2
Browse files Browse the repository at this point in the history
Add GHC-9.8.1-alpha2
  • Loading branch information
phadej authored Aug 11, 2023
2 parents 6fac7ac + a6f2992 commit 43f3361
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 25 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.4.5
- compiler: ghc-9.4.6
compilerKind: ghc
compilerVersion: 9.4.5
compilerVersion: 9.4.6
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.7
- compiler: ghc-9.2.8
compilerKind: ghc
compilerVersion: 9.2.7
compilerVersion: 9.2.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.2
Expand Down
4 changes: 2 additions & 2 deletions cabal-install-parsers/cabal-install-parsers.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ tested-with:
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.7
|| ==9.4.5
|| ==9.2.8
|| ==9.4.6

extra-source-files:
Changelog.md
Expand Down
4 changes: 2 additions & 2 deletions fixtures/all-versions.github
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
compilerVersion: "8.4"
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-9.8.1-alpha1
- compiler: ghc-9.8.0.20230809
compilerKind: ghc
compilerVersion: 9.8.1-alpha1
compilerVersion: 9.8.0.20230809
setup-method: ghcup
allow-failure: true
- compiler: ghc-9.6.2
Expand Down
4 changes: 2 additions & 2 deletions fixtures/enabled-jobs.github
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
compilerVersion: "8.4"
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-9.8.1-alpha1
- compiler: ghc-9.8.0.20230809
compilerKind: ghc
compilerVersion: 9.8.1-alpha1
compilerVersion: 9.8.0.20230809
setup-method: ghcup
allow-failure: true
- compiler: ghc-9.6.2
Expand Down
6 changes: 3 additions & 3 deletions haskell-ci.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.2
name: haskell-ci
version: 0.17.20230808
version: 0.17.20230811
synopsis: Cabal package script generator for Travis-CI
description:
Script generator (@haskell-ci@) for
Expand Down Expand Up @@ -39,8 +39,8 @@ tested-with:
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.7
|| ==9.4.5
|| ==9.2.8
|| ==9.4.6

extra-source-files: CHANGELOG.md
extra-source-files:
Expand Down
2 changes: 1 addition & 1 deletion haskell-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi

CFG_CABAL_STORE_CACHE=""
CFG_CABAL_REPO_CACHE=""
CFG_JOBS="9.4.5 9.2.7 9.0.2 8.10.7 8.8.4 8.6.5 8.4.4 8.2.2"
CFG_JOBS="9.4.6 9.2.8 9.0.2 8.10.7 8.8.4 8.6.5 8.4.4 8.2.2"
CFG_CABAL_UPDATE=false

SCRIPT_NAME=$(basename "$0")
Expand Down
10 changes: 5 additions & 5 deletions src/HaskellCI/Compiler.hs
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ dispGhcVersionShort (GHCJS v) = "ghcjs-" ++ C.prettyShow v
dispCabalVersion :: Maybe Version -> String
dispCabalVersion = maybe "head" C.prettyShow

ghcAlpha :: Maybe (Version, String)
ghcAlpha = Just (mkVersion [9,8,1], "9.8.1-alpha1")
ghcAlpha :: Maybe (Version, Version)
ghcAlpha = Just (mkVersion [9,8,1], mkVersion [9,8,0,20230809])

-- | Alphas, RCs and HEAD.
previewGHC
Expand All @@ -213,9 +213,9 @@ ghcMajVer v
-- | Map compiler version to one available to download.
--
-- This way we can map e.g. 9.4.1 to 9.4.0.20220501 i.e. a prerelease.
translateCompilerVersion :: CompilerVersion -> (String, String, String)
translateCompilerVersion :: CompilerVersion -> CompilerVersion
translateCompilerVersion (GHC v)
| Just (u, w) <- ghcAlpha
, v == u
= ("ghc-" ++ w, "ghc", w)
translateCompilerVersion v = (dispGhcVersion v, compilerKind v, compilerVersion v)
= GHC w
translateCompilerVersion v = v
11 changes: 5 additions & 6 deletions src/HaskellCI/GitHub/Yaml.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import HaskellCI.Prelude

import qualified Data.Map.Strict as M

import HaskellCI.Compiler
import HaskellCI.List
import HaskellCI.Sh
import HaskellCI.YamlSyntax
Expand Down Expand Up @@ -45,7 +46,7 @@ data SetupMethod = HVRPPA | GHCUP
deriving Show

data GitHubMatrixEntry = GitHubMatrixEntry
{ ghmeCompiler :: (String, String, String) -- CompilerVersion
{ ghmeCompiler :: CompilerVersion
, ghmeAllowFailure :: Bool
, ghmeSetupMethod :: SetupMethod
}
Expand Down Expand Up @@ -134,14 +135,12 @@ instance ToYaml SetupMethod where

instance ToYaml GitHubMatrixEntry where
toYaml GitHubMatrixEntry {..} = ykeyValuesFilt []
[ "compiler" ~> fromString comp
, "compilerKind" ~> fromString ki
, "compilerVersion" ~> fromString ver
[ "compiler" ~> fromString (dispGhcVersion ghmeCompiler)
, "compilerKind" ~> fromString (compilerKind ghmeCompiler)
, "compilerVersion" ~> fromString (compilerVersion ghmeCompiler)
, "setup-method" ~> toYaml ghmeSetupMethod
, "allow-failure" ~> toYaml ghmeAllowFailure
]
where
(comp, ki, ver) = ghmeCompiler

instance ToYaml GitHubStep where
toYaml GitHubStep {..} = ykeyValuesFilt [] $
Expand Down

0 comments on commit 43f3361

Please # to comment.