Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
head.hackage
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Teo Camarasu
head.hackage
Commits
8717428c
Commit
8717428c
authored
6 years ago
by
Ben Gamari
Browse files
Options
Downloads
Patches
Plain Diff
Allow additional arguments to be passed to GHC
parent
d0112e7e
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+6
-1
6 additions, 1 deletion
.gitlab-ci.yml
README.md
+3
-2
3 additions, 2 deletions
README.md
scripts/build-all.nix
+4
-1
4 additions, 1 deletion
scripts/build-all.nix
scripts/summarize.py
+1
-0
1 addition, 0 deletions
scripts/summarize.py
with
14 additions
and
4 deletions
.gitlab-ci.yml
+
6
−
1
View file @
8717428c
...
...
@@ -30,6 +30,10 @@ variables:
# ACCESS_TOKEN provided via protected environment variable
# EXTRA_HC_OPTS provided by GHC job. These are passed to via --ghc-options to
# GHC during the package builds. This is instantiated with, e.g., -dcore-lint
# during GHC validation builds.
build
:
stage
:
test
...
...
@@ -67,7 +71,8 @@ build:
-
nix-build scripts/build-all.nix -j$CPUS
--no-build-output
-A buildDepends
--arg bindistTarball $GHC_TARBALL
--arg bindistTarball "$GHC_TARBALL"
--arg extraHcOpts "\"$EXTRA_HC_OPTS\""
-
nix-store --export $(nix-store -qR --include-outputs $(nix-instantiate --quiet scripts/build-all.nix --arg bindistTarball $GHC_TARBALL -A buildDepends -A ghc)) > store.nar
-
ret=0
-
nix-build scripts/build-all.nix
...
...
This diff is collapsed.
Click to expand it.
README.md
+
3
−
2
View file @
8717428c
...
...
@@ -149,8 +149,9 @@ snapshots.
To run a similar build locally simply download a binary distribution from a
`x86_64-fedora27-linux`
CI job and run:
```
$ nix build -f scripts/build-all.nix testedPackages \
--arg bindistTarball ./ghc-x86_64-fedora27-linux.tar.xz
$ nix build -f scripts/build-all.nix --keep-going testedPackages \
--arg bindistTarball ./ghc-x86_64-fedora27-linux.tar.xz \
--arg extraHcOpts \"-dcore-lint\"
```
This will build the set of packages defined by the
`testedPackages`
list in
`scripts/build-all.nix`
.
...
...
This diff is collapsed.
Click to expand it.
scripts/build-all.nix
+
4
−
1
View file @
8717428c
...
...
@@ -4,7 +4,9 @@
# Expects to be run on x86_64.
# bindistTarball should be a fedora27 tarball.
{
bindistTarball
}:
{
bindistTarball
,
extraHcOpts
?
""
}:
let
# GHC from the given bindist.
...
...
@@ -34,6 +36,7 @@ let
hyperlinkSource
=
false
;
configureFlags
=
(
drv
.
configureFlags
or
[])
++
[
"--ghc-options=-ddump-timings"
"--ghc-options=
\"
${
extraHcOpts
}
\"
"
];
});
};
...
...
This diff is collapsed.
Click to expand it.
scripts/summarize.py
+
1
−
0
View file @
8717428c
...
...
@@ -10,6 +10,7 @@ def read_summary():
summary
=
subprocess
.
check_output
(
[
'
nix
'
,
'
eval
'
,
'
--json
'
,
'
--arg
'
,
'
bindistTarball
'
,
os
.
environ
[
'
GHC_TARBALL
'
],
'
--arg
'
,
'
extraHcOpts
'
,
f
"
\"
{
os
.
environ
.
get
(
'
EXTRA_HC_OPTS
'
,
''
)
}
\"
"
,
'
-f
'
,
'
scripts/build-all.nix
'
,
'
summary
'
],
encoding
=
'
UTF-8
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment