File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -6,3 +6,15 @@ import qualified Distribution.Version as C
66
77initialGhcupVersion :: Version
88initialGhcupVersion = C. mkVersion [0 ,1 ,20 ,0 ]
9+
10+ -- https://github.com/haskell/cabal/issues/10836#issuecomment-2757855218
11+ -- if you interface with GHCup, you SHOULD be able to deal with non-PVP versions.
12+ --
13+ -- Perfectly, we'd have these mappings configurable;
14+ -- but for now they are hardcoded.
15+ --
16+ translateGhcVersion :: Version -> String
17+ translateGhcVersion = prettyShow
18+
19+ translateCabalVersion :: Version -> String
20+ translateCabalVersion = prettyShow
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import HaskellCI.Config.Jobs
4040import HaskellCI.Config.PackageScope
4141import HaskellCI.Config.Ubuntu
4242import HaskellCI.Config.Validity
43+ import HaskellCI.Ghcup
4344import HaskellCI.GitConfig
4445import HaskellCI.GitHub.Yaml
4546import HaskellCI.HeadHackage
@@ -561,7 +562,7 @@ makeGitHub _argv config@Config {..} gitconfig prj jobs@JobVersions {..} = do
561562 mainJobName = " linux"
562563
563564 ubuntuVer = showUbuntu cfgUbuntu
564- cabalFullVer = dispCabalVersion cfgCabalInstallVersion
565+ cabalFullVer = maybe " head " translateCabalVersion cfgCabalInstallVersion
565566
566567 Auxiliary {.. } = auxiliary config prj jobs
567568
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import HaskellCI.Prelude
88import qualified Data.Map.Strict as M
99
1010import HaskellCI.Compiler
11+ import HaskellCI.Ghcup
1112import HaskellCI.List
1213import HaskellCI.SetupMethod
1314import HaskellCI.Sh
@@ -129,12 +130,20 @@ instance ToYaml GitHubJob where
129130
130131instance ToYaml GitHubMatrixEntry where
131132 toYaml GitHubMatrixEntry {.. } = ykeyValuesFilt []
132- [ " compiler" ~> fromString (dispGhcVersion ghmeCompiler)
133+ [ " compiler" ~> fromString compiler
133134 , " compilerKind" ~> fromString (compilerKind ghmeCompiler)
134135 , " compilerVersion" ~> fromString (compilerVersion ghmeCompiler)
135136 , " setup-method" ~> toYaml ghmeSetupMethod
136137 , " allow-failure" ~> toYaml ghmeAllowFailure
137138 ]
139+ where
140+ compiler
141+ | GHCUP <- ghmeSetupMethod
142+ , GHC v <- ghmeCompiler
143+ = " ghc-" ++ translateGhcVersion v
144+
145+ | otherwise
146+ = dispGhcVersion ghmeCompiler
138147
139148instance ToYaml GitHubStep where
140149 toYaml GitHubStep {.. } = ykeyValuesFilt [] $ buildList $ do
You can’t perform that action at this time.
0 commit comments