Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
ghc-api-compat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Haskell
ghc-api-compat
Compare revisions
06ed5af221b13fdcd4a71994503c40f587b91e96 to ded498efca4bb20a70841db42705db0788eb1236
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
haskell/ghc-api-compat
Select target project
No results found
ded498efca4bb20a70841db42705db0788eb1236
Select Git revision
Branches
ci
master
v8.10.5
v9.0
Swap
Target
haskell/ghc-api-compat
Select target project
haskell/ghc-api-compat
hsyl20/ghc-api-compat
berberman/ghc-api-compat
AriFordsham/ghc-api-compat
4 results
06ed5af221b13fdcd4a71994503c40f587b91e96
Select Git revision
Branches
ci
master
v8.10.5
v9.0
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Add test script
· 45e2533a
Sylvain Henry
authored
3 years ago
45e2533a
Remove github CI
· ded498ef
Sylvain Henry
authored
3 years ago
ded498ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/ci.yml
+0
-38
0 additions, 38 deletions
.github/workflows/ci.yml
test.hs
+50
-0
50 additions, 0 deletions
test.hs
with
50 additions
and
38 deletions
.github/workflows/ci.yml
deleted
100644 → 0
View file @
b40dc9e7
name
:
CI
# Trigger the workflow on push or pull request, but only for the master branch
on
:
pull_request
:
push
:
branches
:
[
master
]
jobs
:
cabal
:
name
:
${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on
:
${{ matrix.os }}
strategy
:
fail-fast
:
false
matrix
:
os
:
[
ubuntu-latest
]
cabal
:
[
"
latest"
]
ghc
:
[
"
8.6"
,
"
8.8"
,
"
8.10"
]
steps
:
-
uses
:
actions/checkout@v2
if
:
github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
-
uses
:
actions/setup-haskell@v1.1
id
:
setup-haskell-cabal
name
:
Setup Haskell
with
:
ghc-version
:
${{ matrix.ghc }}
cabal-version
:
${{ matrix.cabal }}
-
name
:
Build
run
:
|
cabal update
cabal build all --enable-tests --enable-benchmarks --write-ghc-environment-files=always
-
name
:
Test
run
:
|
cabal test all --enable-tests
This diff is collapsed.
Click to expand it.
test.hs
0 → 100644
View file @
ded498ef
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE BlockArguments #-}
module
Main
where
import
qualified
Data.List
as
List
import
System.Process
import
Control.Monad
import
Data.Version
import
Text.ParserCombinators.ReadP
main
::
IO
()
main
=
do
callCommand
"ghcup upgrade"
let
toVersion
x
=
fst
$
head
$
filter
(
null
.
snd
)
$
readP_to_S
(
parseVersion
)
x
let
show_versions
=
concatMap
(
\
v
->
"
\n
- "
++
showVersion
v
)
-- get available GHC versions via ghcup
avails
<-
readCreateProcess
(
shell
"ghcup list -r -t ghc"
)
""
let
fix_avail
=
toVersion
.
takeWhile
(
/=
' '
)
.
drop
4
let
avail_ghc_versions
=
fmap
fix_avail
(
lines
avails
)
putStrLn
$
"Available GHC versions: "
++
show_versions
avail_ghc_versions
let
-- only test the recent ones
test_pred
=
(
>=
makeVersion
[
8
,
8
])
prefiltered
=
filter
test_pred
avail_ghc_versions
-- take only the latest version per major release
major
=
take
2
.
versionBranch
same_major
x
y
=
major
x
==
major
y
test_ghc_versions
=
fmap
(
last
.
List
.
sort
)
$
List
.
groupBy
same_major
prefiltered
putStrLn
$
"We will test the following GHC versions: "
++
show_versions
test_ghc_versions
forM_
test_ghc_versions
\
version
->
do
let
v
=
showVersion
version
let
ghc
=
"ghc-"
++
v
putStrLn
"#######################################"
putStrLn
$
"Testing "
++
ghc
putStrLn
"#######################################"
putStrLn
"# Installing GHC..."
callCommand
$
"ghcup install ghc "
++
v
putStrLn
"# Trying to build with cabal-install..."
callCommand
"cabal clean"
callCommand
$
"cabal build -w "
++
ghc
This diff is collapsed.
Click to expand it.