Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
H
head.hackage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
5
Merge Requests
5
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
head.hackage
Commits
1512c1b9
Commit
1512c1b9
authored
Jul 08, 2019
by
Ben Gamari
🐢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add build-nix.sh wrapper
parent
f4203e27
Pipeline
#8107
passed with stage
in 34 minutes and 26 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
7 deletions
+37
-7
README.md
README.md
+8
-7
scripts/build-nix.sh
scripts/build-nix.sh
+29
-0
No files found.
README.md
View file @
1512c1b9
...
...
@@ -149,14 +149,15 @@ 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 --keep-going testedPackages \
--arg bindistTarball ./ghc-x86_64-fedora27-linux.tar.xz \
--arg extraHcOpts \"-dcore-lint\"
$ export GHC_TARBALL=./ghc-x86_64-fedora27-linux.tar.xz
# for extra correctness assurance...
$ export EXTRA_HC_OPTS=-dcore-lint
$ scripts/build-nix.sh
```
This will build the set of packages defined by the
`testedPackages`
list in
`scripts/build-all.nix`
.
After building
`testedPackages`
(allowing for failures) the
CI
job runs
After building
`testedPackages`
(allowing for failures) the
script
job runs
`scripts/summarize.py`
, which produces a few artifacts:
*
a JSON summary (
`summary.json`
) which includes the full dependency graph as
...
...
@@ -165,10 +166,10 @@ After building `testedPackages` (allowing for failures) the CI job runs
success. This can be rendered with
`scripts/render-graph.sh`
.
*
a directory (
`./logs`
) of build logs
You can run
`scripts/summarize.py`
locally with
Note that
`build-nix.sh`
can also be used to build packages not included in
`testedPackages`
:
```
$ export GHC_TARBALL=./ghc-x86_64-fedora27-linux.tar.xz
$ python3 scripts/summarize.py
$ scripts/build-nix.sh pandoc
```
### Hackage repository
...
...
scripts/build-nix.sh
0 → 100755
View file @
1512c1b9
#!/bin/sh
# A convenient wrapper for build-all.nix.
if
[
-z
"
$GHC_TARBALL
"
]
;
then
echo
'$GHC_TARBALL is not set; please set it.'
exit
1
fi
targets
=
$@
if
[
-z
"
$targets
"
]
;
then
targets
=
testedPackages
fi
echo
"Building
$targets
with GHC options
\"
$EXTRA_HC_OPTS
\"
..."
nix build
-f
scripts/build-all.nix
--keep-going
testedPackages
\
--arg
bindistTarball
$GHC_TARBALL
--arg
extraHcOpts
\"
$EXTRA_HC_OPTS
\"
echo
"Build finished. Running summarize..."
python3 scripts/summarize.py
echo
echo
"Build finished. I produced the following:"
echo
" * summary.json: a summary of the build"
echo
" * summary.dot: the dependency graph of packages I built"
echo
" * logs/*: the build logs"
echo
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment