File tree 3 files changed +24
-2
lines changed
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
6
6
7
7
initialGhcupVersion :: Version
8
8
initialGhcupVersion = 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
40
40
import HaskellCI.Config.PackageScope
41
41
import HaskellCI.Config.Ubuntu
42
42
import HaskellCI.Config.Validity
43
+ import HaskellCI.Ghcup
43
44
import HaskellCI.GitConfig
44
45
import HaskellCI.GitHub.Yaml
45
46
import HaskellCI.HeadHackage
@@ -561,7 +562,7 @@ makeGitHub _argv config@Config {..} gitconfig prj jobs@JobVersions {..} = do
561
562
mainJobName = " linux"
562
563
563
564
ubuntuVer = showUbuntu cfgUbuntu
564
- cabalFullVer = dispCabalVersion cfgCabalInstallVersion
565
+ cabalFullVer = maybe " head " translateCabalVersion cfgCabalInstallVersion
565
566
566
567
Auxiliary {.. } = auxiliary config prj jobs
567
568
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import HaskellCI.Prelude
8
8
import qualified Data.Map.Strict as M
9
9
10
10
import HaskellCI.Compiler
11
+ import HaskellCI.Ghcup
11
12
import HaskellCI.List
12
13
import HaskellCI.SetupMethod
13
14
import HaskellCI.Sh
@@ -129,12 +130,20 @@ instance ToYaml GitHubJob where
129
130
130
131
instance ToYaml GitHubMatrixEntry where
131
132
toYaml GitHubMatrixEntry {.. } = ykeyValuesFilt []
132
- [ " compiler" ~> fromString (dispGhcVersion ghmeCompiler)
133
+ [ " compiler" ~> fromString compiler
133
134
, " compilerKind" ~> fromString (compilerKind ghmeCompiler)
134
135
, " compilerVersion" ~> fromString (compilerVersion ghmeCompiler)
135
136
, " setup-method" ~> toYaml ghmeSetupMethod
136
137
, " allow-failure" ~> toYaml ghmeAllowFailure
137
138
]
139
+ where
140
+ compiler
141
+ | GHCUP <- ghmeSetupMethod
142
+ , GHC v <- ghmeCompiler
143
+ = " ghc-" ++ translateGhcVersion v
144
+
145
+ | otherwise
146
+ = dispGhcVersion ghmeCompiler
138
147
139
148
instance ToYaml GitHubStep where
140
149
toYaml GitHubStep {.. } = ykeyValuesFilt [] $ buildList $ do
You can’t perform that action at this time.
0 commit comments