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
sheaf
head.hackage
Commits
1512c1b9
Commit
1512c1b9
authored
5 years ago
by
Ben Gamari
Browse files
Options
Downloads
Patches
Plain Diff
Add build-nix.sh wrapper
parent
f4203e27
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+8
-7
8 additions, 7 deletions
README.md
scripts/build-nix.sh
+29
-0
29 additions, 0 deletions
scripts/build-nix.sh
with
37 additions
and
7 deletions
README.md
+
8
−
7
View file @
1512c1b9
...
@@ -149,14 +149,15 @@ snapshots.
...
@@ -149,14 +149,15 @@ snapshots.
To run a similar build locally simply download a binary distribution from a
To run a similar build locally simply download a binary distribution from a
`x86_64-fedora27-linux`
CI job and run:
`x86_64-fedora27-linux`
CI job and run:
```
```
$ nix build -f scripts/build-all.nix --keep-going testedPackages \
$ export GHC_TARBALL=./ghc-x86_64-fedora27-linux.tar.xz
--arg bindistTarball ./ghc-x86_64-fedora27-linux.tar.xz \
# for extra correctness assurance...
--arg extraHcOpts \"-dcore-lint\"
$ export EXTRA_HC_OPTS=-dcore-lint
$ scripts/build-nix.sh
```
```
This will build the set of packages defined by the
`testedPackages`
list in
This will build the set of packages defined by the
`testedPackages`
list in
`scripts/build-all.nix`
.
`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:
`scripts/summarize.py`
, which produces a few artifacts:
*
a JSON summary (
`summary.json`
) which includes the full dependency graph as
*
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
...
@@ -165,10 +166,10 @@ After building `testedPackages` (allowing for failures) the CI job runs
success. This can be rendered with
`scripts/render-graph.sh`
.
success. This can be rendered with
`scripts/render-graph.sh`
.
*
a directory (
`./logs`
) of build logs
*
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
$ scripts/build-nix.sh pandoc
$ python3 scripts/summarize.py
```
```
### Hackage repository
### Hackage repository
...
...
This diff is collapsed.
Click to expand it.
scripts/build-nix.sh
0 → 100755
+
29
−
0
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
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