Skip to content

Commit 96b0868

Browse files
committed
WIP
1 parent 7db462c commit 96b0868

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ jobs:
4040
compilerVersion: 9.8.3
4141
setup-method: ghcup
4242
allow-failure: false
43+
- compiler: ghc-9.8.3
44+
compilerKind: ghc
45+
compilerVersion: 9.8.3
46+
setup-method: ghcup-vanilla
47+
allow-failure: false
4348
- compiler: ghc-9.8.2
4449
compilerKind: ghc
4550
compilerVersion: 9.8.2
@@ -112,7 +117,7 @@ jobs:
112117
- name: Install GHC (GHCup vanilla)
113118
if: matrix.setup-method == 'ghcup-vanilla'
114119
run: |
115-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
120+
"$HOME/.ghcup/bin/ghcup" -s https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-vanilla-0.0.8.yaml install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
116121
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
117122
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
118123
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')

src/HaskellCI/Config/History.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ configHistory =
3636
, ver 0 19 20240708 := \cfg -> cfg
3737
& field @"cfgGhcupVersion" .~ C.mkVersion [0,1,30,0]
3838
, ver 0 19 20241111 := \cfg -> cfg
39-
& field @"cfgGhcupJobs" .~ C.intersectVersionRanges ghcupNormalRange (invertVersionRange (C.withinVersion (C.mkVersion [9,8,3])))
40-
& field @"cfgGhcupVanillaJobs" .~ C.withinVersion (C.mkVersion [9,8,3])
39+
& field @"cfgGhcupJobs" .~ C.intersectVersionRanges (C.intersectVersionRanges ghcupNormalRange (C.earlierVersion (C.mkVersion [9,12,0]))) (invertVersionRange (C.withinVersion (C.mkVersion [9,8,3])))
40+
& field @"cfgGhcupVanillaJobs" .~ C.withinVersion (C.mkVersion [9,8,3])
41+
& field @"cfgGhcupPrereleaseJobs" .~ C.orLaterVersion (C.mkVersion [9,12,0])
4142
]
4243
where
4344
ver x y z = [x, y, z]

src/HaskellCI/GitHub.hs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ makeGitHub _argv config@Config {..} gitconfig prj jobs@JobVersions {..} = do
177177
ghcupGhcEnv
178178

179179
whenWithinGhcRange cfgGhcupVanillaJobs $ githubRunIf' "Install GHC (GHCup vanilla)" "matrix.setup-method == 'ghcup-vanilla'" envEnv $ do
180-
sh $ "\"$HOME/.ghcup/bin/ghcup\" install ghc \"$HCVER\" || (cat \"$HOME\"/.ghcup/logs/*.* && false)"
180+
sh $ "\"$HOME/.ghcup/bin/ghcup\" -s https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-vanilla-0.0.8.yaml install ghc \"$HCVER\" || (cat \"$HOME\"/.ghcup/logs/*.* && false)"
181181
ghcupGhcEnv
182182

183183
whenWithinGhcRange cfgGhcupPrereleaseJobs $ githubRunIf' "Install GHC (GHCup prerelease)" "matrix.setup-method == 'ghcup-prerelease'" envEnv $ do
@@ -528,19 +528,27 @@ makeGitHub _argv config@Config {..} gitconfig prj jobs@JobVersions {..} = do
528528
, ghjServices = mconcat
529529
[ Map.singleton "postgres" postgresService | cfgPostgres ]
530530
, ghjTimeout = max 10 cfgTimeoutMinutes
531-
, ghjMatrix =
532-
[ GitHubMatrixEntry
531+
, ghjMatrix = concat $
532+
[ [ GitHubMatrixEntry
533533
{ ghmeCompiler = translateCompilerVersion $ compiler
534534
, ghmeAllowFailure =
535535
isGHCHead compiler
536536
|| maybeGHC False (`C.withinRange` cfgAllowFailures) compiler
537-
, ghmeSetupMethod = if isGHCUP compiler then GHCUP else HVRPPA
537+
, ghmeSetupMethod = sp
538538
}
539+
| sp <- [GHCUP, GHCUPvanilla, GHCUPprerelease, HVRPPA]
540+
, compilerWithinGhcRange compiler $ case sp of
541+
GHCUP -> cfgGhcupJobs
542+
GHCUPvanilla -> cfgGhcupVanillaJobs
543+
GHCUPprerelease -> cfgGhcupPrereleaseJobs
544+
HVRPPA -> cfgHvrPpaJobs
545+
]
539546
| compiler <- reverse $ toList linuxVersions
540547
, compiler /= GHCHead -- TODO: Make this work
541548
-- https://github.com/haskell-CI/haskell-ci/issues/458
542549
]
543550
})
551+
544552
unless (null cfgIrcChannels) $
545553
ircJob actionName mainJobName projectName config gitconfig
546554
}

src/HaskellCI/GitHub/Yaml.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ data GitHubJob = GitHubJob
4242
}
4343
deriving (Show)
4444

45-
data SetupMethod = HVRPPA | GHCUP
45+
data SetupMethod = HVRPPA | GHCUP | GHCUPvanilla | GHCUPprerelease
4646
deriving Show
4747

4848
data GitHubMatrixEntry = GitHubMatrixEntry
@@ -130,8 +130,10 @@ instance ToYaml GitHubJob where
130130
item $ "steps" ~> ylistFilt [] (map toYaml $ filter notEmptyStep ghjSteps)
131131

132132
instance ToYaml SetupMethod where
133-
toYaml HVRPPA = "hvr-ppa"
134-
toYaml GHCUP = "ghcup"
133+
toYaml HVRPPA = "hvr-ppa"
134+
toYaml GHCUP = "ghcup"
135+
toYaml GHCUPvanilla = "ghcup-vanilla"
136+
toYaml GHCUPprerelease = "ghcup-prerelease"
135137

136138
instance ToYaml GitHubMatrixEntry where
137139
toYaml GitHubMatrixEntry {..} = ykeyValuesFilt []

0 commit comments

Comments
 (0)