mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-13 07:48:31 +01:00
Merge branch 'master' of https://github.com/fpco/stackage
This commit is contained in:
commit
4924641c7a
@ -6,3 +6,5 @@ cabal.sandbox.config
|
||||
tarballs
|
||||
*.yaml
|
||||
.git
|
||||
automated
|
||||
.github
|
||||
|
||||
11
.github/PULL_REQUEST_TEMPLATE.md
vendored
11
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,8 +1,13 @@
|
||||
Checklist:
|
||||
- [ ] Meaningful commit message, eg `add my-cool-package` (please not mention `build-constraints.yml`)
|
||||
- [ ] At least 30 minutes have passed since uploading to Hackage
|
||||
- [ ] On your own machine, in a _new directory_, you have successfully run the following set of commands (replace `$package` with the name of the package that is submitted, and `$version` with the version of the package you want to get into Stackage):
|
||||
- [ ] On your own machine, you have successfully run the following command (find verify-package in the root of this repo):
|
||||
|
||||
stack unpack $package-$version # $version is optional
|
||||
stack init --resolver nightly
|
||||
./verify-package $package # or $package-$version
|
||||
|
||||
The script runs virtually the following commands in a clean directory:
|
||||
|
||||
stack unpack $package-$version # `-$version` is optional
|
||||
cd $package-$version
|
||||
rm -f stack.yaml && stack init --resolver nightly --ignore-subdirs
|
||||
stack build --resolver nightly --haddock --test --bench --no-run-benchmarks
|
||||
|
||||
21
.github/workflows/check.yml
vendored
Normal file
21
.github/workflows/check.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
name: check
|
||||
on: [push,pull_request]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: Stackage check
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: haskell/actions/setup@v1
|
||||
with:
|
||||
ghc-version: '8.10'
|
||||
stack-version: '2.5'
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.stack
|
||||
~/.stackage/curator/cache
|
||||
key: ${{ runner.os }}-stackage-nightly-${{ hashFiles('**/build-constraints.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-
|
||||
- run: etc/check.sh
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -5,3 +5,6 @@ lts-*.yaml
|
||||
*.swp
|
||||
check-plan.yaml
|
||||
*~
|
||||
/constraints.yaml
|
||||
/snapshot.yaml
|
||||
/snapshot-incomplete.yaml
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
image: fpco/stack-build:lts-12.8
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- $HOME/.stack
|
||||
- $HOME/.stackage/curator/cache
|
||||
|
||||
stages:
|
||||
- build
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
# Edit etc/ci-script.sh to change GHC version
|
||||
- ./etc/ci-script.sh
|
||||
26
.travis.yml
26
.travis.yml
@ -1,26 +0,0 @@
|
||||
# Disable Docker stuff to try to make it faster
|
||||
sudo: true
|
||||
|
||||
# Choose a lightweight base image; we provide our own build tools.
|
||||
language: generic
|
||||
|
||||
# GHC depends on GMP. You can add other dependencies here as well.
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libgmp-dev
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- env: CHECK_SCRIPT="./etc/ci-script.sh"
|
||||
- env: CHECK_SCRIPT="./etc/curator-2-check.sh"
|
||||
|
||||
# Edit etc/ci-script.sh to change GHC version
|
||||
script:
|
||||
- $CHECK_SCRIPT
|
||||
|
||||
# Caching doesn't work with sudo: true
|
||||
#cache:
|
||||
# directories:
|
||||
# - $HOME/.stack
|
||||
# - $HOME/.stackage/curator/cache
|
||||
87
CURATORS.md
87
CURATORS.md
@ -18,8 +18,8 @@ This section sketches out at a high level how the entire Stackage build/curation
|
||||
process works:
|
||||
|
||||
* [build-constraints.yaml](https://github.com/commercialhaskell/stackage/blob/master/build-constraints.yaml) specifies packages to be included in Stackage
|
||||
* [stackage-curator](http://www.stackage.org/package/stackage-curator) combines build-constraints.yaml with the current state of Hackage to create a build plan for a Stackage Nightly
|
||||
* stackage-curator can check that build plan to ensure all version bounds are consistent
|
||||
* [curator](https://github.com/commercialhaskell/curator) combines build-constraints.yaml with the current state of Hackage to create a build plan for a Stackage Nightly
|
||||
* `curator` can check that build plan to ensure all version bounds are consistent
|
||||
* The [Travis job](https://github.com/commercialhaskell/stackage/blob/master/.travis.yml) performs these two steps to provide immediate feedback on pull requests
|
||||
* Docker Hub [builds](https://github.com/commercialhaskell/stackage/blob/master/Dockerfile) a [Docker image](https://hub.docker.com/r/commercialhaskell/stackage/) for running builds
|
||||
* The stackage-build server (described below) is able to run automated builds using the [build.sh script](https://github.com/commercialhaskell/stackage/blob/master/automated/build.sh)
|
||||
@ -72,7 +72,7 @@ Most common technique, just prevent a new version of a library from
|
||||
being included immediately. This also applies to when only benchmarks
|
||||
and tests are affected.
|
||||
|
||||
* Copy the stackage-curator output and create a new issue, see e.g
|
||||
* Copy the `curator` output and create a new issue, see e.g
|
||||
https://github.com/commercialhaskell/stackage/issues/2108
|
||||
|
||||
* Add a new entry under the "stackage upper bounds" section of `build-constraints.yaml`. For the above example it would be
|
||||
@ -84,7 +84,7 @@ https://github.com/commercialhaskell/stackage/issues/2108
|
||||
```
|
||||
|
||||
* Commit (message e.g. "Upper bound for #2108")
|
||||
* Optionally: Verify with `stackage-curator check` locally
|
||||
* Optionally: Verify with `./check` locally
|
||||
* Push
|
||||
* Verify that everything works on the build server (you can restart the build or wait for it to to run again)
|
||||
|
||||
@ -110,7 +110,7 @@ new package may appear if its dependencies were part of this issue but
|
||||
have been updated since the last time we checked. We want to give
|
||||
these new packages ample time to be upgraded.
|
||||
|
||||
If stackage-curator is happy commit the change ("Remove upper bounds
|
||||
If `curator` is happy commit the change ("Remove upper bounds
|
||||
and close #X"). After doing this the next nightly build may fail
|
||||
because some packages didn't have an upper bound in place, but
|
||||
compilation failed. In this case revert the previous commit so any
|
||||
@ -213,14 +213,15 @@ major version number (e.g., lts3 for lts-3.\*).
|
||||
Note that when starting a new LTS major release, you'll need to modify Docker
|
||||
Hub to create a new Docker tag for the relevant branch name.
|
||||
|
||||
You'll need to update both the `PATH` in `Dockerfile` and the `GHCVER` variable
|
||||
in `debian-bootstrap.sh`.
|
||||
Update `GHCVER` in `Dockerfile`. (This env var automatically gets passed to `debian-bootstrap.sh`.)
|
||||
|
||||
Ensure that the [global-hints.yaml
|
||||
file](https://github.com/fpco/stackage-content/blob/master/stack/global-hints.yaml)
|
||||
is updated with information on the latest GHC release by cloning that
|
||||
repo and running `./update-global-hints.yaml ghc-X.Y.Z`.
|
||||
|
||||
Also required to build an LTS minor bump with a ghc version change: On the build server, modify `/var/stackage/stackage/automated/work/lts-$THIS_LTS_MAJOR_VER/constraints.yaml` and update the ghc-version. (You may need to update sibling files as well.) Then run `NOPLAN=1 /var/stackage/stackage/automated/build.sh lts-$THIS_LTS_MINOR_BUMP` to build the LTS.
|
||||
|
||||
### Getting the new image to the build server
|
||||
Once a new Docker image is available, you'll need to pull it onto the stackage-build server (see
|
||||
below). Instead of pulling an unbounded number of images, I typically just
|
||||
@ -233,10 +234,14 @@ docker rmi $(docker images -q)
|
||||
|
||||
but `docker pull commercialhaskell/stackage:nightly` can also be run instead just to update the nightly image say.
|
||||
|
||||
For a new GHC version you should also delete the cache directories on the stackage-build server to
|
||||
force all packages to be rebuilt. See: [issue#746](https://github.com/commercialhaskell/stackage/issues/746). Eg:
|
||||
For a new GHC version you should also delete the ~~cache~~ .stack-work snapshot install directories on the stackage-build server to
|
||||
~~force all packages to be rebuilt~~ clear up some space. See: [issue#746](https://github.com/commercialhaskell/stackage/issues/746). Eg:
|
||||
|
||||
```
|
||||
rm -r nightly/work/builds/nightly/
|
||||
# for example
|
||||
SNAP_SERIES=nightly # or lts16
|
||||
OLD_GHCVER=8.10.1
|
||||
rm -r work/$SNAP_SERIES/unpack-dir/.stack-work/install/x86_64-linux/*/$OLD_GHCVER/
|
||||
```
|
||||
This should also be done when moving the Nightly docker image to a new version of Ubuntu.
|
||||
|
||||
@ -250,7 +255,7 @@ DIR=$(mktemp -d)
|
||||
(cd $DIR \
|
||||
&& git clone https://github.com/commercialhaskell/stackage \
|
||||
&& cd stackage \
|
||||
&& git checkout $BRANCH
|
||||
&& git checkout $BRANCH \
|
||||
&& docker build --tag commercialhaskell/stackage:$BRANCH .)
|
||||
rm -rf $DIR
|
||||
```
|
||||
@ -280,31 +285,33 @@ we're just not there yet.
|
||||
|
||||
```
|
||||
# Run a nightly build
|
||||
/opt/stackage-build/stackage/automated/run-nightly.sh
|
||||
/var/stackage/stackage/automated/run-nightly.sh
|
||||
|
||||
# Run an LTS minor bump
|
||||
/opt/stackage-build/stackage/automated/build.sh lts-2.17
|
||||
/var/stackage/stackage/automated/build.sh lts-15.1
|
||||
|
||||
# Run an LTS major bump
|
||||
/opt/stackage-build/stackage/automated/build.sh lts-3.0
|
||||
/var/stackage/stackage/automated/build.sh lts-16.0
|
||||
```
|
||||
|
||||
Recommended: run these from inside a `tmux` session. If you get version bound
|
||||
problems on nightly or LTS major, you need to fix build-constraints.yaml (see
|
||||
info above). For an LTS minor bump, you'll typically want to use the
|
||||
`CONSTRAINTS` environment variable, e.g.:
|
||||
info above).
|
||||
|
||||
```
|
||||
CONSTRAINTS='--constraint "conduit < 1.4.5" --constraint "criterion < 1.2.3"' /opt/stackage-build/stackage/automated/build.sh lts-2.17
|
||||
```
|
||||
### Building LTS minor releases
|
||||
Before running the build, please make sure that the Dockerfile in `automated/dockerfiles/lts-X.Y` is up to date, where X is the major version that you're building and Y is the latest minor version of X for which a Dockerfile exists.
|
||||
* If any changes need to be made, (eg, new GHC version), copy `automated/lts-X.Y/Dockerfile` to `automated/lts-X.Z/Dockerfile`, where Z is the minor version you're building, and include the new changes.
|
||||
* If you are building the first release of a new LTS major version, create a new `lts-X.Z/Dockerfile` based on the previous LTS's, and adjust the variables at the top to match the requirements of the snapshot. Ensure that `STACK_VERSION` is the latest release of Stack, and `BOOTSTRAP_COMMIT` is the commit ID of this repo containing the version of the `bootstrap-commit.sh` used to build the snapshot. Also ensure the FROM image's Ubuntu version matches that used in the [root Dockerfile](Dockerfile) used to build this snapshot.
|
||||
|
||||
Valid arguments to include in this environment variable:
|
||||
First run `build.sh` to regenerate updated `ltsXX/work/constraints.yaml` and `ltsXX/work/snapshot-incomplete.yaml` files.
|
||||
|
||||
* `--constraint` to modify an upper or lower bound
|
||||
* `--add-package` to add a brand new package
|
||||
* `--expect-test-failure` to expect tests to fail
|
||||
* `--expect-haddock-failure` to expect haddocks to fail
|
||||
* `--expect-bench-failure` to expect benchmarks to fail
|
||||
For an LTS minor bump, you'll typically want to:
|
||||
|
||||
* Add constraints to package `range:` fields _under_ the `source:` field in that `constraints.yaml`, and edit `snapshot-incomplete.yaml` to change the version used for that package, if necessary.
|
||||
* Add new packages to the `constraints.yaml` file
|
||||
* Test, benchmark, haddock failures can also be added to package fields in the `constraints.yaml` if necessary, though it should be avoided if possible for LTS.
|
||||
|
||||
Then run `NOPLAN=1 build.sh` to build the generate an updated snapshot.
|
||||
|
||||
If a build fails for bounds reasons, see all of the advice above. If the code
|
||||
itself doesn't build, or tests fail, open up an issue and then either put in a
|
||||
@ -320,7 +327,7 @@ if one needs to revert one package, say due to a build or test regression,
|
||||
one can edit `current-plan.yaml` and updated the SHA256 hash of the .cabal file,
|
||||
to avoid having to rebuild everything again.)
|
||||
|
||||
Note LTS builds inherit the current Hackage data (stack updated for Nigthly) to avoid excess extra rebuilding.
|
||||
Note LTS builds without NOPLAN will use the latest Hackage data.
|
||||
|
||||
### Timing
|
||||
|
||||
@ -331,11 +338,17 @@ early and hopefully the nightlies will be timely.
|
||||
|
||||
LTS minor bumps typically are run on Sundays.
|
||||
|
||||
### Website sync debugging (and other out of disk space errors)
|
||||
### Diskspace errors (and website sync debugging)
|
||||
|
||||
* You can detect the problem by running `df`. If you see that `/` is out of space, we have a problem
|
||||
* (outdated) There are many temp files inside `/home/ubuntu/stackage-server-cron` that can be cleared out occasionally
|
||||
* (outdated) You can then manually run `/home/ubuntu/stackage-server-cron.sh`, or wait for the cron job to do it
|
||||
* You can detect the problem by running `df`. If you see that `/` is out of space, we have a problem.
|
||||
* If you see that `/var/stackage/` is out of space, you can:
|
||||
* run `./etc/diskspace/clean-old-stack-libs.sh [nightly|lts-XX]`
|
||||
* If that is insufficient then remove all the old builds under the previous ghc/Cabal version:
|
||||
* `rm -r /var/stackage/stackage/automated/work/[nightly|lts-XX]/unpack-dir/unpacked/*/.stack-work/dist/x86_64-linux/Cabal-X.Y.0.0/`
|
||||
|
||||
optionally (not recommended?):
|
||||
* `rm -r /var/stackage/stackage/automated/work/lts*/unpack-dir/unpacked/`
|
||||
* `rm -r /var/stackage/stackage/automated/work/nightly/unpack-dir/unpacked/`
|
||||
|
||||
### Wiping the cache
|
||||
|
||||
@ -367,30 +380,30 @@ We do not run the full stackage build locally as that might take too
|
||||
much time. However, some steps on the other hand are much faster to do
|
||||
yourself, e.g. verifying constraints without building anything.
|
||||
|
||||
To get started, install `stackage-curator` via Git, or [the Linux binary]:
|
||||
To get started, install `curator` via Git:
|
||||
|
||||
```
|
||||
$ git clone git@github.com:fpco/stackage-curator.git
|
||||
$ cd stackage-curator && stack install
|
||||
$ git clone git@github.com:commercialhaskell/curator.git
|
||||
$ cd curator && stack install curator
|
||||
```
|
||||
|
||||
It is a good idea to upgrade `stackage-curator` at the start of your week.
|
||||
It is a good idea to upgrade `curator` at the start of your week.
|
||||
Then, clone the stackage repo, get the latest packages and run dependency
|
||||
resolution:
|
||||
|
||||
```
|
||||
$ git clone git@github.com:commercialhaskell/stackage.git
|
||||
$ stack update && stackage-curator check
|
||||
$ cd stackage
|
||||
$ ./check
|
||||
```
|
||||
|
||||
This can be used to make sure all version bounds are in place, including for
|
||||
test suites and benchmarks, to check whether bounds can be lifted, and to get
|
||||
[tell-me-when-its-released] notifications.
|
||||
|
||||
`stackage-curator` does not build anything, so you wont see any compilation
|
||||
`curator` does not build anything, so you wont see any compilation
|
||||
errors for builds, tests and benchmarks.
|
||||
|
||||
[the Linux binary]: https://s3.amazonaws.com/stackage-travis/stackage-curator/stackage-curator.bz2
|
||||
[tell-me-when-its-released]: https://github.com/commercialhaskell/stackage/blob/master/CURATORS.md#waiting-for-new-releases
|
||||
|
||||
## Adding new curators
|
||||
|
||||
@ -26,7 +26,7 @@ There are three inputs into the data flow:
|
||||
## Travis
|
||||
|
||||
For [various
|
||||
reasons](https://www.fpcomplete.com/blog/2015/05/distributing-packages-without-sysadmin),
|
||||
reasons](https://tech.fpcomplete.com/blog/2015/05/distributing-packages-without-sysadmin),
|
||||
we leverage Travis CI for running some processes. In particular:
|
||||
|
||||
* [all-cabal-files](https://github.com/commercialhaskell/all-cabal-files/blob/hackage/.travis.yml)
|
||||
|
||||
@ -2,7 +2,7 @@ FROM fpco/pid1:18.04
|
||||
|
||||
ENV HOME /home/stackage
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV GHCVER 8.6.4
|
||||
ENV GHCVER 8.10.4
|
||||
|
||||
# NOTE: also update debian-bootstrap.sh when cuda version changes
|
||||
ENV PATH /home/stackage/.stack/programs/x86_64-linux/ghc-$GHCVER/bin:/usr/local/cuda-10.0/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
@ -4,7 +4,7 @@ The idea behind Stackage is that, if all packages work with the newest versions
|
||||
|
||||
* All packages are buildable and testable from Hackage. We recommend [the Stack Travis script](https://docs.haskellstack.org/en/stable/travis_ci/), which ensures a package is not accidentally incomplete.
|
||||
* All packages are compatible with the newest versions of all dependencies (You can find restrictive upper bounds by visiting http://packdeps.haskellers.com/feed?needle=PACKAGENAME).
|
||||
* All packages in a snapshot are compatible with the versions of libraries that ship with the GHC used in the snapshot ([more information on lenient lower bounds](https://www.fpcomplete.com/blog/2014/05/lenient-lower-bounds)).
|
||||
* All packages in a snapshot are compatible with the versions of libraries that ship with the GHC used in the snapshot ([more information on lenient lower bounds](https://tech.fpcomplete.com/blog/2014/05/lenient-lower-bounds)).
|
||||
|
||||
Packages in Stackage are not patched: all package changes occur upstream in Hackage.
|
||||
|
||||
@ -19,26 +19,22 @@ To add your package you can edit [`build-constraints.yaml`](https://github.com/f
|
||||
- package2
|
||||
- package3
|
||||
|
||||
If your library depends on a C library, please add it to the `debian-bootstrap.sh` script.
|
||||
Any dependencies of your packages that are not already part of
|
||||
stackage also need to be added explicitly (When this happens you will
|
||||
see `not present` errors in the CI log). As mentioned above: If you
|
||||
don't maintain this package yourself it is preferable that the actual
|
||||
maintainer is also the stackage maintainer, but you are allowed to add
|
||||
it under your own name.
|
||||
|
||||
Any dependencies of your packages that are not already part of stackage are added implictly, but it is prefered
|
||||
to add all packages explicitly. It is planned to remove this behaviour in the future.
|
||||
If your package depends on a C library, please add it to the `debian-bootstrap.sh` script.
|
||||
|
||||
After doing that commit with a message like "add foo-bar" and send a pull request.
|
||||
After doing that, commit with a message like "add foo-bar" and send a pull request.
|
||||
|
||||
The continuous integration job will do some checks to see if your package's dependencies are up-to-date.
|
||||
|
||||
The CI job notably doesn't compile packages, run tests, build documentation, or find missing C libraries.
|
||||
If you want to be proactive or if CI fails, you can make sure that your package builds against the latest nightly:
|
||||
|
||||
```
|
||||
# Build from the tarball on Hackage to check for missing files
|
||||
$ stack unpack yourpackage && cd yourpackage-*
|
||||
# Generate a pristine stack.yaml, adding any missing extra-deps
|
||||
$ rm -f stack.yaml && stack init --resolver nightly --solver
|
||||
# Build, generate docs, test, and build benchmarks
|
||||
$ stack build --resolver nightly --haddock --test --bench --no-run-benchmarks
|
||||
```
|
||||
If you want to be proactive or if CI fails, you can make sure that your package builds against the latest nightly.
|
||||
See the [verify-package](https://github.com/commercialhaskell/stackage/blob/master/verify-package) script in this repository.
|
||||
|
||||
This approach works well, but has two limitations you should be aware
|
||||
of:
|
||||
@ -46,26 +42,11 @@ of:
|
||||
* It won't notify you of restrictive upper bounds in your package if
|
||||
Stackage has the same upper bounds. For that reason, we recommend
|
||||
using [Packdeps](http://packdeps.haskellers.com/) (see "Following
|
||||
dependency upgrades" below).
|
||||
dependency upgrades" below). You can also run `cabal outdated`.
|
||||
* If the latest Stackage Nightly is missing some of the latest
|
||||
packages, your build above may succeed whereas the Travis job may
|
||||
fail. Again: Packdeps will help you detect this situation.
|
||||
|
||||
Alternatively, you can build with `cabal`. Note that this may end up
|
||||
using older dependency versions:
|
||||
|
||||
```
|
||||
$ ghc --version # Should be the same as the latest nightly, it's in the title of https://www.stackage.org/nightly
|
||||
$ cabal update
|
||||
$ cabal get PACKAGE
|
||||
$ cd PACKAGE-*
|
||||
$ cabal sandbox init # Should give "Creating a new sandbox" and not "Using an existing sandbox".
|
||||
$ cabal install --enable-tests --enable-benchmarks --dry-run | grep latest # Should give no results
|
||||
$ cabal install --enable-tests --enable-benchmarks --allow-newer
|
||||
$ cabal test
|
||||
$ cabal haddock
|
||||
```
|
||||
|
||||
## Github and Notifications
|
||||
|
||||
Stackage uses Github notifications to reduce overhead of contacting individual
|
||||
@ -114,7 +95,7 @@ is decided on a case-by-case basis.
|
||||
* If there are real breaking changes, the curator team will retain
|
||||
more discretion on how long a window to give before dropping
|
||||
packages.
|
||||
* We usually drop all upper bounds and disable packages when we create
|
||||
* We typically drop upper bounds and disable conflicting packages in Nightly after we create
|
||||
a new Long Term Support (LTS) major version.
|
||||
* There are rare cases where an upper bound or build failure are hard
|
||||
to deal with so then we may disable
|
||||
@ -158,8 +139,8 @@ Note that it is _not_ a goal of LTS Haskell to track the latest
|
||||
version of GHC. If you want the latest and greatest, Stackage Nightly
|
||||
is your best bet. In particular, LTS Haskell will often—but not
|
||||
always—avoid upgrading to the first point release of GHC
|
||||
releases (e.g., 8.2.1) to allow further testing and to get the
|
||||
benefits of the first bugfix release (e.g., 8.2.2).
|
||||
releases (e.g., 8.x.1) to allow further testing and to get the
|
||||
benefits of the first bugfix release (e.g., 8.x.2).
|
||||
|
||||
## Adding a package to an LTS snapshot
|
||||
|
||||
@ -169,20 +150,16 @@ ending in `.0`), the package set is taken from Stackage Nightly. Therefore, by
|
||||
following the above steps, you can get your package into the next major LTS
|
||||
Haskell release.
|
||||
|
||||
If you would like to get your package added to an existing LTS Haskell major
|
||||
release (e.g., if `lts-8.9` is out, you would want your package to appear in
|
||||
`lts-8.10`), please do the following in addition to the steps above:
|
||||
If you would like to get your package added to the current LTS Haskell
|
||||
major release, please do the following in addition to the steps for Nightly described earlier:
|
||||
|
||||
* Check that your package can be built with that LTS major version (e.g. `stack build --test --bench --haddock --resolver lts-8.10`)
|
||||
* Check that your package can be built with the current LTS version (e.g. `stack build --test --bench --haddock --resolver lts`)
|
||||
* Open up a new issue on the [lts-haskell repo](https://github.com/fpco/lts-haskell/issues/new)
|
||||
* Specify the LTS major versions you would like your packages to go into (e.g. lts-8)
|
||||
* Provide a list of packages you would like added
|
||||
* If relevant, mention any upper bounds that are needed on those packages
|
||||
* Be patient! The LTS releases are less frequent than Nightly. The
|
||||
Stackage curators will try to get to your issue as soon as possible,
|
||||
but it may take some time.
|
||||
* We gradually stop maintaining old LTS major versions, so your
|
||||
request may take longer or be declined if it's for an old LTS.
|
||||
|
||||
## LTS package guarantees and exceptions
|
||||
|
||||
|
||||
65
README.md
65
README.md
@ -1,16 +1,16 @@
|
||||
stackage
|
||||
========
|
||||
|
||||
[](https://travis-ci.org/commercialhaskell/stackage)
|
||||
[](https://github.com/commercialhaskell/stackage/actions/workflows/check.yml)
|
||||
[](https://gitter.im/commercialhaskell/stackage?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
"Stable Hackage": creating a vetted set of packages from Hackage.
|
||||
This repository is for package authors and maintainers to get their packages into Stackage.
|
||||
Stable sets of Haskell Packages from Hackage
|
||||
|
||||
_This repository is for package authors and maintainers to get their packages into Stackage._
|
||||
|
||||
If you simply want to use Stackage as an end user, please follow the instructions on [https://www.stackage.org/](https://www.stackage.org).
|
||||
|
||||
We strongly recommend using the Haskell tool stack for doing builds, which
|
||||
includes built-in Stackage support: [stack](https://github.com/commercialhaskell/stack) [](https://dev.azure.com/commercialhaskell/stack/_build/latest?definitionId=1?branchName=master).
|
||||
|
||||
We strongly recommend using the Haskell [stack](https://github.com/commercialhaskell/stack) tool for doing builds, which
|
||||
includes built-in Stackage support.
|
||||
|
||||
Add your package
|
||||
----------------
|
||||
@ -20,12 +20,12 @@ We welcome all packages, provided:
|
||||
* The package author/maintainer agrees to the [maintainers agreement](https://github.com/commercialhaskell/stackage/blob/master/MAINTAINERS.md).
|
||||
* The package is buildable and testable from Hackage. We recommend [the Stack Travis script](https://docs.haskellstack.org/en/stable/travis_ci/), which ensures a package is not accidentally incomplete.
|
||||
* The package is compatible with the newest versions of all dependencies (You can find restrictive upper bounds by visiting http://packdeps.haskellers.com/feed?needle=PACKAGENAME).
|
||||
* The package is compatible with the versions of libraries that ship with GHC ([more information on lenient lower bounds](https://www.fpcomplete.com/blog/2014/05/lenient-lower-bounds)).
|
||||
* The package is compatible with the versions of libraries that ship with GHC ([more information on lenient lower bounds](https://tech.fpcomplete.com/blog/2014/05/lenient-lower-bounds)).
|
||||
|
||||
Full details on how to add and test a package can be found in the [maintainers agreement](https://github.com/commercialhaskell/stackage/blob/master/MAINTAINERS.md#adding-a-package).
|
||||
|
||||
__NOTE__: There is an approximate 30 minute delay between a package uploading
|
||||
to Hackage and being available to the Travis build script to check upper
|
||||
to Hackage and being available to the Github workflow action to check upper
|
||||
bounds. If a pull request is marked as failed due to using an older version,
|
||||
please close and reopen the PR to retrigger a Travis build.
|
||||
|
||||
@ -36,24 +36,14 @@ The Stackage project consists of multiple repositories. This repository
|
||||
contains the metadata on packages to be included in future builds and some
|
||||
project information. In addition, we have the following repositories:
|
||||
|
||||
* [stackage-server](https://github.com/fpco/stackage-server) [](https://travis-ci.org/fpco/stackage-server)
|
||||
* [stackage-curator](https://github.com/fpco/stackage-curator) [](https://travis-ci.org/fpco/stackage-curator)
|
||||
* [lts-haskell](https://github.com/fpco/lts-haskell)
|
||||
* [stackage-nightly](https://github.com/fpco/stackage-nightly)
|
||||
|
||||
We also support some add-on tools to cabal-install to make its usage with
|
||||
Stackage both easier and more secure:
|
||||
|
||||
* [stackage-cli](https://github.com/fpco/stackage-cli) [](https://travis-ci.org/fpco/stackage-cli)
|
||||
* [stackage-update](https://github.com/fpco/stackage-update) [](https://travis-ci.org/fpco/stackage-update)
|
||||
* [stackage-upload](https://github.com/fpco/stackage-upload) [](https://travis-ci.org/fpco/stackage-upload)
|
||||
* [stackage-install](https://github.com/fpco/stackage-install) [](https://travis-ci.org/fpco/stackage-install)
|
||||
* [stackage-build-plan](https://github.com/fpco/stackage-build-plan) [](https://travis-ci.org/fpco/stackage-build-plan)
|
||||
* [stackage-server](https://github.com/fpco/stackage-server) [](https://github.com/fpco/stackage-server/actions/workflows/base.yml)
|
||||
* [curator](https://github.com/commercialhaskell/curator) [](https://travis-ci.org/fpco/stackage-curator)
|
||||
* [lts-haskell](https://github.com/commercialhaskell/lts-haskell)
|
||||
* [stackage-snapshots](https://github.com/commercialhaskell/stackage-snapshots/)
|
||||
|
||||
Curious how it all fits together? See the [Stackage data
|
||||
flow](https://github.com/commercialhaskell/stackage/blob/master/DATA-FLOW.md).
|
||||
|
||||
|
||||
Build the package set
|
||||
---------------------
|
||||
|
||||
@ -88,6 +78,17 @@ The following describes at a high level the series of steps for processing
|
||||
Frequently Asked Questions
|
||||
--------------------------
|
||||
|
||||
__Why is Stackage LTS still on an older version of GHC?__
|
||||
|
||||
Typically it takes some months from a new major ghc release before
|
||||
the Haskell ecosystem supports it fully enough that we can push it
|
||||
to a new stable Stackage major version release. There can also be
|
||||
ghc regressions that hold up a LTS major release.
|
||||
|
||||
The lag for minor ghc releases should be less
|
||||
but it still requires extra work and there is usually some delay - this also
|
||||
allows for some community testing before updating LTS.
|
||||
|
||||
__Why does Stackage have an older version of a package than Hackage?__
|
||||
|
||||
There are a number of answers to this question:
|
||||
@ -109,14 +110,14 @@ There are a number of answers to this question:
|
||||
and packages depending on them - are fixed to GHC versions. Common
|
||||
examples of this are containers and transformers. There's a lot more
|
||||
information on this in
|
||||
[an FP Complete blog post](https://www.fpcomplete.com/blog/2014/05/lenient-lower-bounds)
|
||||
[an FP Complete blog post](https://tech.fpcomplete.com/blog/2014/05/lenient-lower-bounds)
|
||||
|
||||
__How long do you maintain an LTS build?__
|
||||
|
||||
We only guarantee that we will maintain a single LTS major version at
|
||||
a time, and that it will be maintained for at least three months. This
|
||||
is the
|
||||
[originally proposed support window](https://www.fpcomplete.com/blog/2014/12/backporting-bug-fixes),
|
||||
[originally proposed support window](https://tech.fpcomplete.com/blog/2014/12/backporting-bug-fixes),
|
||||
and hasn't changed since then.
|
||||
|
||||
That said, we do maintain the capability to keep multiple LTS runs
|
||||
@ -126,4 +127,16 @@ trying to push out the bounds a bit farther.
|
||||
|
||||
__What time are Stackage snapshots published?__
|
||||
|
||||
Stackage Nightly and LTS are not released at a fixed time of day, they get pushed to stackage.org (and the metadata to the stackage-nightly and stackage-lts github repos) when their builds finish on the Stackage build server and the latest built haddocks have been synced over. This time varies greatly depending on build times for package updates, bounds breakage, problems with new packages being added and other build issues, etc. There are days when a release does not happen. LTS releases tend to happen over the weekend or early in the week.
|
||||
Stackage Nightly and LTS are not released at a fixed time of day, they get
|
||||
pushed to stackage.org (and the metadata to the stackage-nightly and
|
||||
stackage-lts github repos) when their builds finish on the Stackage build
|
||||
server and the latest built haddocks have been synced over. This time varies
|
||||
greatly depending on build times for package updates, bounds breakage,
|
||||
problems with new packages being added and other build issues, etc. There are
|
||||
days when a release does not happen. LTS releases tend to happen over the
|
||||
weekend or early in the week.
|
||||
|
||||
__Where to get help regarding uploading packages?__
|
||||
|
||||
Please ask on [Gitter](https://gitter.im/commercialhaskell/stackage) or open
|
||||
an issue or comment on the PR which uploads the package.
|
||||
|
||||
14
automated/.gitignore
vendored
14
automated/.gitignore
vendored
@ -1,12 +1,2 @@
|
||||
/auth-token
|
||||
/bin/
|
||||
/gitconfig
|
||||
/hackage-creds
|
||||
/ssh-nightly/
|
||||
/ssh-lts/
|
||||
/nighlty/
|
||||
/lts-*/
|
||||
/stackage-curator/
|
||||
/stackage-update/
|
||||
/aws.sh
|
||||
/crondir/
|
||||
/work/
|
||||
/*-build.log
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu +x
|
||||
set -eu +x -o pipefail
|
||||
|
||||
ROOT=$(cd $(dirname $0) ; pwd)
|
||||
TARGET=$1
|
||||
|
||||
source aws.sh
|
||||
source work/aws.sh
|
||||
|
||||
# For nightly-YYYY-MM-DD, tag should be nightly
|
||||
# For lts-X.Y, tag should be ltsX
|
||||
@ -13,47 +13,36 @@ SHORTNAME=$(echo $TARGET | cut -d- -f 1)
|
||||
if [ $SHORTNAME = "lts" ]
|
||||
then
|
||||
TAG=$(echo $TARGET | sed 's@^lts-\([0-9]*\)\.[0-9]*@lts\1@')
|
||||
WORKDIR=$ROOT/work/$(echo $TARGET | sed 's@^lts-\([0-9]*\)\.[0-9]*@lts-\1@')
|
||||
else
|
||||
TAG=$SHORTNAME
|
||||
WORKDIR=$ROOT/work/$TAG
|
||||
fi
|
||||
|
||||
IMAGE=commercialhaskell/stackage:$TAG
|
||||
|
||||
PLAN_FILE=current-plan.yaml
|
||||
DOCMAP_FILE=current-docmap.yaml
|
||||
|
||||
CABAL_DIR=$ROOT/cabal
|
||||
STACK_DIR=$ROOT/stack
|
||||
GHC_DIR=$ROOT/ghc
|
||||
DOT_STACKAGE_DIR=$ROOT/dot-stackage
|
||||
WORKDIR=$ROOT/$TAG/work
|
||||
EXTRA_BIN_DIR=$ROOT/extra-bin
|
||||
SSH_DIR=$ROOT/ssh-$SHORTNAME
|
||||
PANTRY_DIR=$ROOT/work/stack/pantry
|
||||
STACK_DIR=$ROOT/work/stack
|
||||
DOT_STACKAGE_DIR=$ROOT/work/dot-stackage
|
||||
# ssh key is used for committing snapshots (and their constraints) to Github
|
||||
SSH_DIR=$ROOT/work/ssh
|
||||
USERID=$(id -u)
|
||||
|
||||
mkdir -p \
|
||||
"$CABAL_DIR" \
|
||||
"$PANTRY_DIR" \
|
||||
"$STACK_DIR" \
|
||||
"$GHC_DIR" \
|
||||
"$DOT_STACKAGE_DIR" \
|
||||
"$WORKDIR" \
|
||||
"$EXTRA_BIN_DIR" \
|
||||
"$SSH_DIR"
|
||||
|
||||
GITCONFIG=$ROOT/gitconfig
|
||||
GITCONFIG=$ROOT/work/gitconfig
|
||||
cat >$GITCONFIG <<EOF
|
||||
[user]
|
||||
email = michael+stackage-build@fpcomplete.com
|
||||
name = Stackage Build host
|
||||
EOF
|
||||
|
||||
cat >$SSH_DIR/known_hosts <<EOF
|
||||
|1|Qn0iij8BnxGZXbyFSozS9zWkH+Q=|YrKKNp2KHO3/oc4UBFIe1zOvhDc= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
|
||||
|1|RxBEt2ljiEppr019szMIhbY12m0=|0FZ2Oji1LphRbPLLEQhFzTmL69I= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
|
||||
EOF
|
||||
|
||||
AUTH_TOKEN=$ROOT/auth-token
|
||||
HACKAGE_CREDS=$ROOT/hackage-creds
|
||||
HACKAGE_CREDS=$ROOT/work/hackage-creds
|
||||
|
||||
function require_400_file {
|
||||
if [ ! -f "$1" ]
|
||||
@ -66,24 +55,35 @@ function require_400_file {
|
||||
}
|
||||
|
||||
require_400_file "$SSH_DIR/id_rsa"
|
||||
require_400_file "$AUTH_TOKEN"
|
||||
require_400_file "$HACKAGE_CREDS"
|
||||
|
||||
mkdir -p $ROOT/bin
|
||||
BINDIR=$(cd $ROOT/bin ; pwd)
|
||||
mkdir -p $ROOT/work/bin
|
||||
BINDIR=$(cd $ROOT/work/bin ; pwd)
|
||||
(
|
||||
cd $BINDIR
|
||||
rm -f stackage-curator stackage-curator.bz2
|
||||
wget https://s3.amazonaws.com/stackage-travis/stackage-curator/stackage-curator.bz2
|
||||
bunzip2 stackage-curator.bz2
|
||||
chmod +x stackage-curator
|
||||
./stackage-curator --version
|
||||
rm -f curator stack *.bz2
|
||||
|
||||
curl -L "https://github.com/commercialhaskell/curator/releases/download/commit-1ef870178f6a0544fe5a3fd23a83fc075aabd695/curator.bz2" | bunzip2 > curator
|
||||
chmod +x curator
|
||||
echo -n "curator version: "
|
||||
docker run --rm -v $(pwd)/curator:/exe $IMAGE /exe --version
|
||||
|
||||
curl -L https://github.com/commercialhaskell/stack/releases/download/v2.5.1/stack-2.5.1-linux-x86_64-bin > stack
|
||||
#curl -L "https://download.fpcomplete.com/stackage-curator-2/stack-fffc0a40e2253788f6b9cb7471c03fd571d69bde.bz2" | bunzip2 > stack
|
||||
chmod +x stack
|
||||
echo -n "stack version: "
|
||||
docker run --rm -v $(pwd)/stack:/exe $IMAGE /exe --version
|
||||
)
|
||||
|
||||
ARGS_COMMON="--rm -v $WORKDIR:$HOME/work -w $HOME/work -v $BINDIR/stackage-curator:/usr/bin/stackage-curator:ro -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v $EXTRA_BIN_DIR/stack:/usr/bin/stack:ro"
|
||||
ARGS_PREBUILD="$ARGS_COMMON -u $USERID -e HOME=$HOME -v $CABAL_DIR:$HOME/.cabal -v $STACK_DIR:$HOME/.stack -v $GHC_DIR:$HOME/.ghc -v $DOT_STACKAGE_DIR:$HOME/.stackage"
|
||||
ARGS_BUILD="$ARGS_COMMON -v $CABAL_DIR:$HOME/.cabal:ro -v $STACK_DIR:$HOME/.stack:ro -v $GHC_DIR:$HOME/.ghc:ro"
|
||||
ARGS_UPLOAD="$ARGS_COMMON -u $USERID -e HOME=$HOME -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -v $AUTH_TOKEN:/auth-token:ro -v $HACKAGE_CREDS:/hackage-creds:ro -v $DOT_STACKAGE_DIR:$HOME/.stackage -v $SSH_DIR:$HOME/.ssh:ro -v $GITCONFIG:$HOME/.gitconfig:ro -v $CABAL_DIR:$HOME/.cabal:ro -v $STACK_DIR:$HOME/.stack:ro"
|
||||
# We share pantry directory between snapshots while the other content in .stack
|
||||
# is stored separately (because e.g. Ubuntu releases between LTS and nightly
|
||||
# could differ). Also the order of binds is important.
|
||||
ARGS_COMMON="--rm -v $WORKDIR:$HOME/work -w $HOME/work -v $BINDIR/curator:/usr/bin/curator:ro -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v $BINDIR/stack:/usr/bin/stack:ro -v $STACK_DIR:$HOME/.stack -v $PANTRY_DIR:$HOME/.stack/pantry"
|
||||
ARGS_PREBUILD="$ARGS_COMMON -u $USERID -e HOME=$HOME -v $DOT_STACKAGE_DIR:$HOME/.stackage"
|
||||
ARGS_BUILD="$ARGS_COMMON"
|
||||
# instance-data is an undocumented feature of S3 used by amazonka,
|
||||
# see https://github.com/brendanhay/amazonka/issues/271
|
||||
ARGS_UPLOAD="$ARGS_COMMON -u $USERID -e HOME=$HOME -v $HACKAGE_CREDS:/hackage-creds:ro -v $DOT_STACKAGE_DIR:$HOME/.stackage -v $SSH_DIR:$HOME/.ssh:ro -v $GITCONFIG:$HOME/.gitconfig:ro -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -v $DOT_STACKAGE_DIR:/dot-stackage"
|
||||
|
||||
# Make sure we actually need this snapshot. We only check this for LTS releases
|
||||
# since, for nightlies, we'd like to run builds even if they are unnecessary to
|
||||
@ -91,11 +91,9 @@ ARGS_UPLOAD="$ARGS_COMMON -u $USERID -e HOME=$HOME -e AWS_ACCESS_KEY_ID=$AWS_ACC
|
||||
# below for why this is safe.)
|
||||
if [ $SHORTNAME = "lts" ]
|
||||
then
|
||||
docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec stackage-curator check-target-available --target $TARGET"
|
||||
docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec curator check-target-available --target $TARGET"
|
||||
fi
|
||||
|
||||
# Get latest stack
|
||||
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C $EXTRA_BIN_DIR '*/stack'
|
||||
|
||||
# Determine the new build plan unless NOPLAN is set
|
||||
#
|
||||
@ -105,18 +103,20 @@ if [ "${NOPLAN:-}x" = "x" ]
|
||||
then
|
||||
if [ $SHORTNAME = "lts" ]
|
||||
then
|
||||
docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "exec stackage-curator create-plan --plan-file $PLAN_FILE --target $TARGET ${CONSTRAINTS:-}"
|
||||
docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "curator constraints --target $TARGET && curator snapshot-incomplete --target $TARGET && curator snapshot"
|
||||
else
|
||||
docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "stack update && exec stackage-curator create-plan --plan-file $PLAN_FILE --target $TARGET ${CONSTRAINTS:-}"
|
||||
docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "curator update && curator constraints --target $TARGET && curator snapshot-incomplete --target $TARGET && curator snapshot"
|
||||
fi
|
||||
else
|
||||
docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "curator snapshot-incomplete --target $TARGET && curator snapshot"
|
||||
fi
|
||||
|
||||
|
||||
# Do the rest of the pre-build actions:
|
||||
#
|
||||
# * Check that the plan is valid
|
||||
# * Fetch all needed tarballs (the build step does not have write access to the tarball directory)
|
||||
# * Do a single unpack to create the package index cache (again due to directory perms)
|
||||
docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "stackage-curator check --plan-file $PLAN_FILE && stackage-curator fetch --plan-file $PLAN_FILE && cd /tmp && exec stack unpack random"
|
||||
# * Check that the snapshot is valid
|
||||
# * Fetch and unpack all needed tarballs (the build step does not have write access to the tarball directory)
|
||||
docker run $ARGS_PREBUILD $IMAGE /bin/bash -c 'GHCVER=$(sed -n "s/^ghc-version: \(.*\)/\1/p" constraints.yaml) && stack setup ghc-$GHCVER --verbosity=error && stack exec --resolver=ghc-$GHCVER curator check-snapshot && curator unpack'
|
||||
|
||||
case $SHORTNAME in
|
||||
lts) JOBS=1 ;;
|
||||
@ -126,22 +126,32 @@ esac
|
||||
# Now do the actual build. We need to first set the owner of the home directory
|
||||
# correctly, so we run the command as root, change owner, and then use sudo to
|
||||
# switch back to the current user
|
||||
docker run $ARGS_BUILD $IMAGE nice -n 15 /bin/bash -c "chown $USER $HOME && exec sudo -E -u $USER env \"HOME=$HOME\" \"PATH=\$PATH\" stackage-curator make-bundle --jobs $JOBS --plan-file $PLAN_FILE --docmap-file $DOCMAP_FILE --target $TARGET"
|
||||
docker run $ARGS_BUILD $IMAGE nice -n 15 /bin/bash -c "chown $USER $HOME && exec sudo -E -u $USER env \"HOME=$HOME\" \"PATH=\$PATH\" curator build --jobs $JOBS" 2>&1 | tee "$SHORTNAME-build.log"
|
||||
|
||||
# Make sure we actually need this snapshot. We used to perform this check
|
||||
# exclusively before building. Now we perform it after as well for the case of
|
||||
# nightly, where we don't perform this check beforehand. This is also slightly
|
||||
# safer, in case someone else already uploaded a specific snapshot while we
|
||||
# were building.
|
||||
docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec stackage-curator check-target-available --target $TARGET"
|
||||
docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec curator check-target-available --target $TARGET"
|
||||
|
||||
# Successful build, so we need to:
|
||||
#
|
||||
# * Upload the docs to S3
|
||||
# * Upload the 00-index.tar file to S3 (TODO: this is probably no longer necessary, since snapshots never modify .cabal files)
|
||||
# * Upload the new plan .yaml file to the appropriate Github repo
|
||||
# * Register as a new Hackage distro
|
||||
docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "stackage-curator upload-docs --target $TARGET && stackage-curator upload-index --plan-file $PLAN_FILE --target $TARGET && stackage-curator upload-github --plan-file $PLAN_FILE --docmap-file $DOCMAP_FILE --target $TARGET && exec stackage-curator hackage-distro --plan-file $PLAN_FILE --target $TARGET"
|
||||
# * Upload the new snapshot .yaml file to the appropriate Github repo, also upload its constraints
|
||||
docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "curator upload-docs --target $TARGET && curator upload-github --target $TARGET"
|
||||
|
||||
# fixed in https://github.com/commercialhaskell/curator/pull/24
|
||||
docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec curator hackage-distro --target $TARGET"
|
||||
|
||||
# Build and push docker image fpco/stack-build & fpco/stack-build-small for current release
|
||||
|
||||
if [ $SHORTNAME = "lts" ]
|
||||
then
|
||||
$ROOT/dockerfiles/build.sh $TARGET
|
||||
$ROOT/dockerfiles/build.sh --push $TARGET
|
||||
$ROOT/dockerfiles/build.sh --push --small $TARGET
|
||||
fi
|
||||
|
||||
echo -n "Completed at "
|
||||
date
|
||||
|
||||
@ -1,72 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script is intended for testing Cabal HEAD against a Stackage snapshot.
|
||||
|
||||
set -eux
|
||||
|
||||
ROOT=$(cd $(dirname $0) ; pwd)
|
||||
TARGET=$1
|
||||
|
||||
# For nightly-YYYY-MM-DD, tag should be nightly
|
||||
# For lts-X.Y, tag should be ltsX
|
||||
SHORTNAME=$(echo $TARGET | cut -d- -f 1)
|
||||
if [ $SHORTNAME = "lts" ]
|
||||
then
|
||||
TAG=$(echo $TARGET | sed 's@^lts-\([0-9]*\)\.[0-9]*@lts\1@')
|
||||
PLAN_URL=https://raw.githubusercontent.com/fpco/lts-haskell/master/$TARGET.yaml
|
||||
else
|
||||
TAG=$SHORTNAME
|
||||
PLAN_URL=https://raw.githubusercontent.com/fpco/stackage-nightly/master/$TARGET.yaml
|
||||
fi
|
||||
|
||||
IMAGE=snoyberg/stackage:$TAG
|
||||
|
||||
PLAN_FILE=$TARGET-plan.yaml
|
||||
DOCMAP_FILE=$TARGET-docmap.yaml
|
||||
BUNDLE_FILE=$TARGET.bundle=
|
||||
|
||||
CABAL_DIR=$ROOT/cabal
|
||||
STACK_DIR=$ROOT/stack
|
||||
GHC_DIR=$ROOT/ghc
|
||||
DOT_STACKAGE_DIR=$ROOT/dot-stackage
|
||||
WORKDIR=$ROOT/$TAG/work
|
||||
EXTRA_BIN_DIR=$ROOT/extra-bin
|
||||
|
||||
mkdir -p \
|
||||
"$CABAL_DIR" \
|
||||
"$STACK_DIR" \
|
||||
"$GHC_DIR" \
|
||||
"$DOT_STACKAGE_DIR" \
|
||||
"$WORKDIR" \
|
||||
"$EXTRA_BIN_DIR"
|
||||
|
||||
curl "$PLAN_URL" > $WORKDIR/$PLAN_FILE
|
||||
|
||||
mkdir -p $ROOT/bin
|
||||
BINDIR=$(cd $ROOT/bin ; pwd)
|
||||
(
|
||||
cd $BINDIR
|
||||
rm -f stackage-curator stackage-curator.bz2
|
||||
wget https://s3.amazonaws.com/stackage-travis/stackage-curator/stackage-curator.bz2
|
||||
bunzip2 stackage-curator.bz2
|
||||
chmod +x stackage-curator
|
||||
)
|
||||
|
||||
ARGS_COMMON="--rm -v $WORKDIR:/home/stackage/work -w /home/stackage/work -v $BINDIR/stackage-curator:/usr/bin/stackage-curator:ro -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v $EXTRA_BIN_DIR:/home/stackage/bin:ro"
|
||||
ARGS_PREBUILD="$ARGS_COMMON -u $USER -v $CABAL_DIR:/home/stackage/.cabal -v $STACK_DIR:/home/stackage/.stack -v $GHC_DIR:/home/stackage/.ghc -v $DOT_STACKAGE_DIR:/home/stackage/.stackage"
|
||||
ARGS_BUILD="$ARGS_COMMON -v $CABAL_DIR:/home/stackage/.cabal:ro -v $STACK_DIR:/home/stackage/.stack:ro -v $GHC_DIR:/home/stackage/.ghc:ro"
|
||||
|
||||
# Get latest stack
|
||||
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C $EXTRA_BIN_DIR '*/stack'
|
||||
|
||||
# Do all of the pre-build actions:
|
||||
#
|
||||
# * Update the package index
|
||||
# * Fetch all needed tarballs (the build step does not have write access to the tarball directory)
|
||||
# * Do a single unpack to create the package index cache (again due to directory perms)
|
||||
docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "/home/stackage/bin/stack update && stackage-curator fetch --plan-file $PLAN_FILE && cd /tmp && /home/stackage/bin/stack unpack random"
|
||||
|
||||
# Now do the actual build. We need to first set the owner of the home directory
|
||||
# correctly, so we run the command as root, change owner, and then use sudo to
|
||||
# switch back to the current user
|
||||
docker run $ARGS_BUILD $IMAGE /bin/bash -c "chown $USER /home/stackage && sudo -E -u $USER env \"PATH=\$PATH:/home/stackage/bin\" stackage-curator make-bundle --plan-file $PLAN_FILE --docmap-file $DOCMAP_FILE --bundle-file $BUNDLE_FILE --target $TARGET --cabal-from-head"
|
||||
@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
CRONDIR=$(pwd)/crondir
|
||||
mkdir -p $CRONDIR
|
||||
source aws.sh
|
||||
|
||||
IMAGE=fpco/stackage-server-prod:latest
|
||||
docker pull $IMAGE
|
||||
|
||||
stack update
|
||||
|
||||
date
|
||||
echo "Running stackage-server-cron..."
|
||||
docker run --rm \
|
||||
-v $CRONDIR:/home/ubuntu \
|
||||
-v $HOME/.stack/indices:/home/ubuntu/.stack/indices:ro \
|
||||
--workdir /home/ubuntu \
|
||||
-p 17834:17834 \
|
||||
$IMAGE \
|
||||
bash -c "useradd $(whoami) -u $(id -u); sudo -u $(whoami) env HOME=/home/ubuntu AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY bash -c '/usr/local/bin/stackage-server-cron 2>&1 | tee -a /home/ubuntu/stackage-server-cron.log'"
|
||||
33
automated/dockerfiles/README.md
Normal file
33
automated/dockerfiles/README.md
Normal file
@ -0,0 +1,33 @@
|
||||
dockerfiles/stack-build
|
||||
=======================
|
||||
|
||||
Build [fpco/stack-build](https://hub.docker.com/r/fpco/stack-build/) Docker
|
||||
images. This script and its Dockerfiles are used for building images for LTS >=
|
||||
8.0.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
./build.sh [--push] [--dry-run] [--small] lts-X.Y"
|
||||
|
||||
Options
|
||||
-------
|
||||
|
||||
`--help`: show this help
|
||||
|
||||
`--push`: push the image after building/tagging it
|
||||
|
||||
`--dry-run`: print the important commands that will be run, but don't actually
|
||||
run them
|
||||
|
||||
`--small`: build the small variant of the image
|
||||
|
||||
Argument
|
||||
---------
|
||||
|
||||
The image for the selected LTS version will be built.
|
||||
|
||||
This searches for a Dockerfile for the selected snapshot in
|
||||
`lts-X.Y/Dockerfile`, and if one isn't found reuses the same image as built the
|
||||
most recent `lts-X.Y/Dockerfile` found for earlier minor versions of the same
|
||||
major version.
|
||||
177
automated/dockerfiles/build.sh
Executable file
177
automated/dockerfiles/build.sh
Executable file
@ -0,0 +1,177 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
#
|
||||
# Constants and defaults
|
||||
#
|
||||
|
||||
DOCKER_REPO=fpco/stack-build
|
||||
PUSH=false
|
||||
DRY=false
|
||||
VARIANT=build
|
||||
|
||||
#
|
||||
# Functions
|
||||
#
|
||||
|
||||
# Print usage information and exit with failure status. First argument is an
|
||||
# error message.
|
||||
usage() {
|
||||
echo "$0: $1" >&2
|
||||
echo
|
||||
echo "Usage: $0 [--push] [--dry-run] [--small] lts-X.Y]"
|
||||
echo "See README.md for more information."
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Print a command, and if --dry-run disabled also run it
|
||||
dry() {
|
||||
echo ">>> $*"
|
||||
[[ $DRY = true ]] || "$@"
|
||||
}
|
||||
|
||||
# Push an image if --push is enabled (otherwise do nothing)
|
||||
push() {
|
||||
[[ $PUSH = false ]] || dry docker push "$1"
|
||||
}
|
||||
|
||||
# Tag an image, and then push it if --push is enabled
|
||||
tagpush() {
|
||||
dry docker tag "$1" "$2"
|
||||
push "$2"
|
||||
}
|
||||
|
||||
#
|
||||
# Parse command-line
|
||||
#
|
||||
|
||||
LTS_SLUG_ARG=
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--push)
|
||||
PUSH=true
|
||||
shift
|
||||
;;
|
||||
--dry-run)
|
||||
DRY=true
|
||||
shift
|
||||
;;
|
||||
--small)
|
||||
VARIANT=small
|
||||
DOCKER_REPO=fpco/stack-build-small
|
||||
shift
|
||||
;;
|
||||
-*)
|
||||
usage "Unknown option: $1"
|
||||
;;
|
||||
*)
|
||||
if [[ -n "$LTS_SLUG_ARG" ]]; then
|
||||
usage "Cannot specify multiple snaphots: $1"
|
||||
fi
|
||||
LTS_SLUG_ARG="$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "$LTS_SLUG_ARG" in
|
||||
"")
|
||||
usage "Missing argument: snapshot"
|
||||
;;
|
||||
lts-*.*)
|
||||
LTS_SLUG="$LTS_SLUG_ARG"
|
||||
;;
|
||||
*)
|
||||
echo "$0: Wrong snapshot format: $LTS_SLUG_ARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Determine if lts slug is latest
|
||||
#
|
||||
|
||||
SNAPSHOTS="$(mktemp "lts-snapshots.json.XXXXXX")"
|
||||
trap "rm -f \"$SNAPSHOTS\"" EXIT
|
||||
wget -qO- https://www.stackage.org/download/lts-snapshots.json >"$SNAPSHOTS"
|
||||
|
||||
LTS_VERSION="${LTS_SLUG#lts-}"
|
||||
LTS_MAJOR="${LTS_VERSION%.*}"
|
||||
LTS_MINOR="${LTS_VERSION#*.}"
|
||||
|
||||
#
|
||||
# Determine latest LTS version
|
||||
#
|
||||
|
||||
if [[ ! -x "$HOME/.local/bin/jq" ]]; then
|
||||
mkdir -p $HOME/.local/bin
|
||||
if [[ "$(uname)" = "Darwin" ]]; then
|
||||
curl -o $HOME/.local/bin/jq -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-osx-amd64
|
||||
else
|
||||
curl -o $HOME/.local/bin/jq -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
|
||||
fi
|
||||
chmod +x $HOME/.local/bin/jq
|
||||
fi
|
||||
|
||||
LATEST_LTS_SLUG=$($HOME/.local/bin/jq -r ".[\"lts\"]" $SNAPSHOTS)
|
||||
LATEST_LTS_VERSION="${LATEST_LTS_SLUG#lts-}"
|
||||
LATEST_LTS_MAJOR="${LATEST_LTS_VERSION%.*}"
|
||||
LATEST_LTS_MINOR="${LATEST_LTS_VERSION#*.}"
|
||||
|
||||
#
|
||||
# Determine latest minor version of the selected major version
|
||||
#
|
||||
|
||||
MAJOR_LATEST_LTS_SLUG=$(jq -r ".[\"lts-$LTS_MAJOR\"]" $SNAPSHOTS)
|
||||
MAJOR_LATEST_LTS_VERSION="${MAJOR_LATEST_LTS_SLUG#lts-}"
|
||||
MAJOR_LATEST_LTS_MAJOR="${MAJOR_LATEST_LTS_VERSION%.*}"
|
||||
MAJOR_LATEST_LTS_MINOR="${MAJOR_LATEST_LTS_VERSION#*.}"
|
||||
|
||||
#
|
||||
# Find the Dockerfile for the selected snapshot
|
||||
#
|
||||
|
||||
if [[ -s "$LTS_SLUG/Dockerfile" ]]; then
|
||||
|
||||
# If there is an exact match, build and push that image
|
||||
|
||||
sed "s/\\\$DOCKER_REPO/$(echo $DOCKER_REPO|sed 's/\//\\\//')/g" "$LTS_SLUG/Dockerfile" >"$LTS_SLUG/Dockerfile.sub"
|
||||
dry docker build -t "$DOCKER_REPO:$LTS_SLUG" --build-arg "DOCKER_REPO=$DOCKER_REPO" --build-arg "LTS_SLUG=$LTS_SLUG" --build-arg "VARIANT=$VARIANT" -f "$LTS_SLUG/Dockerfile.sub" "$LTS_SLUG"
|
||||
rm -f "$LTS_SLUG/Dockerfile.sub"
|
||||
push "$DOCKER_REPO:$LTS_SLUG"
|
||||
else
|
||||
|
||||
# If no exact match, find a dockerfile for any earlier minor version of the
|
||||
# selected major version, and just create a new tag from version's image with the selected
|
||||
# minor version (assuming that nothing needs to change), and push it.
|
||||
|
||||
minor=$(( LTS_MINOR - 1 ))
|
||||
while [[ ! -s "lts-$LTS_MAJOR.$minor/Dockerfile" && $minor -ge 0 ]]; do
|
||||
minor=$(( minor - 1 ))
|
||||
done
|
||||
if [[ $minor -lt 0 ]]; then
|
||||
echo "$0: Cannot find any Dockerfile for LTS major version" >&2
|
||||
exit 1
|
||||
fi
|
||||
dry docker pull "$DOCKER_REPO:lts-$LTS_MAJOR.$minor" || true
|
||||
tagpush "$DOCKER_REPO:lts-$LTS_MAJOR.$minor" "$DOCKER_REPO:$LTS_SLUG"
|
||||
fi
|
||||
|
||||
#
|
||||
# Create and push additional tags
|
||||
#
|
||||
|
||||
# If we select the latest minor version for the selected major version, then
|
||||
# also create and push an 'lts-X' tag.
|
||||
if [[ $LTS_MINOR -ge $MAJOR_LATEST_LTS_MINOR ]]; then
|
||||
tagpush "$DOCKER_REPO:$LTS_SLUG" "$DOCKER_REPO:lts-$LTS_MAJOR"
|
||||
fi
|
||||
|
||||
# If we selected the latest LTS snapshot, also create and push the 'lts' and 'latest' tags.
|
||||
if [[ "$LTS_MAJOR" = "$LATEST_LTS_MAJOR" ]] && [[ $LTS_MINOR -ge $LATEST_LTS_MINOR ]]; then
|
||||
tagpush "$DOCKER_REPO:$LTS_SLUG" "$DOCKER_REPO:lts"
|
||||
tagpush "$DOCKER_REPO:$LTS_SLUG" "$DOCKER_REPO:latest"
|
||||
fi
|
||||
67
automated/dockerfiles/lts-10.0/Dockerfile
Normal file
67
automated/dockerfiles/lts-10.0/Dockerfile
Normal file
@ -0,0 +1,67 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.2.2
|
||||
ARG LTS_SLUG=lts-10.0
|
||||
ARG PID1_VERSION=0.1.0.1
|
||||
ARG STACK_VERSION=1.6.3
|
||||
ARG BOOTSTRAP_COMMIT=a8234cb586c3022099a3b0155275ed067df00f72
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget && \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Create symlink to help tools find GHC documentation
|
||||
#
|
||||
|
||||
RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
|
||||
cd $HOME/.stack && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/pid1%2F$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Install Stack
|
||||
#
|
||||
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
3
automated/dockerfiles/lts-10.1/Dockerfile
Normal file
3
automated/dockerfiles/lts-10.1/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-10.0
|
||||
ARG STACK_VERSION=1.6.3
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
3
automated/dockerfiles/lts-10.5/Dockerfile
Normal file
3
automated/dockerfiles/lts-10.5/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-10.0
|
||||
ARG STACK_VERSION=1.6.5
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
67
automated/dockerfiles/lts-11.0/Dockerfile
Normal file
67
automated/dockerfiles/lts-11.0/Dockerfile
Normal file
@ -0,0 +1,67 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.2.2
|
||||
ARG LTS_SLUG=lts-11.0
|
||||
ARG PID1_VERSION=0.1.0.1
|
||||
ARG STACK_VERSION=1.6.5
|
||||
ARG BOOTSTRAP_COMMIT=13ab2b86779c98598e96af7f4c4b9653ba280be5
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget && \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Create symlink to help tools find GHC documentation
|
||||
#
|
||||
|
||||
RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
|
||||
cd $HOME/.stack && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/pid1%2F$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Install Stack
|
||||
#
|
||||
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
3
automated/dockerfiles/lts-11.22/Dockerfile
Normal file
3
automated/dockerfiles/lts-11.22/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-11.6
|
||||
ARG STACK_VERSION=1.9.3
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
3
automated/dockerfiles/lts-11.6/Dockerfile
Normal file
3
automated/dockerfiles/lts-11.6/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-11.5
|
||||
ARG STACK_VERSION=1.7.1
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
69
automated/dockerfiles/lts-12.0/Dockerfile
Normal file
69
automated/dockerfiles/lts-12.0/Dockerfile
Normal file
@ -0,0 +1,69 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.4.3
|
||||
ARG LTS_SLUG=lts-12.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=1.7.1
|
||||
ARG CUDA_VERSION=8.0
|
||||
ARG BOOTSTRAP_COMMIT=56c62ccbf31229ee2b09d3a0b4cd2ad94e7406a8
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget && \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Create symlink to help tools find GHC documentation
|
||||
#
|
||||
|
||||
RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
|
||||
cd $HOME/.stack && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Install Stack
|
||||
#
|
||||
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
3
automated/dockerfiles/lts-12.13/Dockerfile
Normal file
3
automated/dockerfiles/lts-12.13/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-12.0
|
||||
ARG STACK_VERSION=1.9.1
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
14
automated/dockerfiles/lts-12.15/Dockerfile
Normal file
14
automated/dockerfiles/lts-12.15/Dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
FROM fpco/stack-build:lts-12.0
|
||||
ARG STACK_VERSION=1.9.1
|
||||
ARG GHC_VERSION=8.4.4
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
ghc-$GHC_VERSION \
|
||||
ghc-$GHC_VERSION-dyn \
|
||||
ghc-$GHC_VERSION-htmldocs \
|
||||
ghc-$GHC_VERSION-prof && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
RUN ln -s ghc-$GHC_VERSION /opt/ghc/$GHC_VERSION/share/doc/ghc
|
||||
ARG CUDA_VERSION=8.0
|
||||
ENV PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
3
automated/dockerfiles/lts-12.21/Dockerfile
Normal file
3
automated/dockerfiles/lts-12.21/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-12.15
|
||||
ARG STACK_VERSION=1.9.3
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
89
automated/dockerfiles/lts-12.26/Dockerfile
Normal file
89
automated/dockerfiles/lts-12.26/Dockerfile
Normal file
@ -0,0 +1,89 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.4.4
|
||||
ARG LTS_SLUG=lts-12.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=1.9.3
|
||||
ARG CUDA_VERSION=8.0
|
||||
ARG BOOTSTRAP_COMMIT=7f982f63a3734ddb2a7cbbc52b8cec983c496efa
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends wget netbase ca-certificates && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
echo "deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
|
||||
echo "deb-src http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 063DAB2BDC0B3F9FCEBC378BFF3AEACEF6F88286 && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ghc-$GHC_VERSION ghc-$GHC_VERSION-htmldocs \
|
||||
g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg \
|
||||
libtinfo-dev; \
|
||||
else \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Create symlink to help tools find GHC documentation
|
||||
#
|
||||
|
||||
RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
|
||||
|
||||
#
|
||||
# Install Stack
|
||||
#
|
||||
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN export STACK_ROOT=/usr/local/lib/stack && \
|
||||
stack --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
69
automated/dockerfiles/lts-13.0/Dockerfile
Normal file
69
automated/dockerfiles/lts-13.0/Dockerfile
Normal file
@ -0,0 +1,69 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.6.3
|
||||
ARG LTS_SLUG=lts-13.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=1.9.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG BOOTSTRAP_COMMIT=26b29f2862462afd47fb916ed0a2c2a6844ebca9
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget && \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Create symlink to help tools find GHC documentation
|
||||
#
|
||||
|
||||
RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
|
||||
cd $HOME/.stack && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Install Stack
|
||||
#
|
||||
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
93
automated/dockerfiles/lts-13.12/Dockerfile
Normal file
93
automated/dockerfiles/lts-13.12/Dockerfile
Normal file
@ -0,0 +1,93 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.6.4
|
||||
ARG LTS_SLUG=lts-13.11
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=1.9.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG BOOTSTRAP_COMMIT=9f2b7ab95c711794257b059604e80ab9ad3c0c45
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends wget netbase ca-certificates && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
echo "deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
|
||||
echo "deb-src http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 063DAB2BDC0B3F9FCEBC378BFF3AEACEF6F88286 && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ghc-$GHC_VERSION ghc-$GHC_VERSION-htmldocs \
|
||||
g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg \
|
||||
libtinfo-dev; \
|
||||
else \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.3$/GHCVER=$GHC_VERSION/" | bash && \
|
||||
# Add g++ version required for building 'double-conversion' \
|
||||
# (see https://github.com/commercialhaskell/stack/issues/4470) \
|
||||
apt-get install -y g++-7; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Create symlink to help tools find GHC documentation
|
||||
#
|
||||
|
||||
RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
|
||||
|
||||
#
|
||||
# Install Stack
|
||||
#
|
||||
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN export STACK_ROOT=/usr/local/lib/stack && \
|
||||
stack --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
93
automated/dockerfiles/lts-13.20/Dockerfile
Normal file
93
automated/dockerfiles/lts-13.20/Dockerfile
Normal file
@ -0,0 +1,93 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.6.5
|
||||
ARG LTS_SLUG=lts-13.20
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=1.9.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG BOOTSTRAP_COMMIT=9f2b7ab95c711794257b059604e80ab9ad3c0c45
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends wget netbase ca-certificates && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
echo "deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
|
||||
echo "deb-src http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 063DAB2BDC0B3F9FCEBC378BFF3AEACEF6F88286 && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ghc-$GHC_VERSION ghc-$GHC_VERSION-htmldocs \
|
||||
g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg \
|
||||
libtinfo-dev; \
|
||||
else \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.3$/GHCVER=$GHC_VERSION/" | bash && \
|
||||
# Add g++ version required for building 'double-conversion' \
|
||||
# (see https://github.com/commercialhaskell/stack/issues/4470) \
|
||||
apt-get install -y g++-7; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Create symlink to help tools find GHC documentation
|
||||
#
|
||||
|
||||
RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
|
||||
|
||||
#
|
||||
# Install Stack
|
||||
#
|
||||
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN export STACK_ROOT=/usr/local/lib/stack && \
|
||||
stack --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
3
automated/dockerfiles/lts-13.25/Dockerfile
Normal file
3
automated/dockerfiles/lts-13.25/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM $DOCKER_REPO:lts-13.24
|
||||
ARG STACK_VERSION=2.1.1
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
9
automated/dockerfiles/lts-13.27/Dockerfile
Normal file
9
automated/dockerfiles/lts-13.27/Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM $DOCKER_REPO:lts-13.26
|
||||
ARG VARIANT
|
||||
RUN if [ "$VARIANT" = "small" ]; then \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends sudo && \
|
||||
rm -rf /var/lib/apt/lists/*; \
|
||||
fi
|
||||
ARG STACK_VERSION=2.1.3
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64-static.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
10
automated/dockerfiles/lts-13.3/Dockerfile
Normal file
10
automated/dockerfiles/lts-13.3/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM fpco/stack-build:lts-13.0
|
||||
|
||||
#
|
||||
# Add g++ version required for building 'double-conversion'
|
||||
# (see https://github.com/commercialhaskell/stack/issues/4470)
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y g++-7 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
89
automated/dockerfiles/lts-14.0/Dockerfile
Normal file
89
automated/dockerfiles/lts-14.0/Dockerfile
Normal file
@ -0,0 +1,89 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.6.5
|
||||
ARG LTS_SLUG=lts-14.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.1.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_VERSION=3.9
|
||||
ARG BOOTSTRAP_COMMIT=d4143f1845f26e8e99d0a1a8134d6ff535ab98b2
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
ARG STACK_ROOT=/home/stackage/.stack
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:$STACK_ROOT/programs/x86_64-linux/ghc-$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
CPATH=$JVM_PATH/include:$JVM_PATH/include/linux:/usr/lib/llvm-$LLVM_VERSION/include
|
||||
|
||||
#
|
||||
# Install pre-requisites
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
wget netbase ca-certificates g++ gcc libc6-dev libffi-dev libgmp-dev \
|
||||
make xz-utils zlib1g-dev git gnupg libtinfo-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running debian-bootstrap.sh since that may have
|
||||
# installed a different version.
|
||||
# In the case of 'small' image, just install Stack and GHC.
|
||||
#
|
||||
|
||||
RUN if [ "$VARIANT" != "small" ]; then \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.5$/GHCVER=$GHC_VERSION/" | GHCVER=$GHC_VERSION bash; \
|
||||
fi && \
|
||||
wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack' && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
stack setup --resolver ghc-$GHC_VERSION; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --resolver=$LTS_SLUG --local-bin-path=/usr/bin install \
|
||||
happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -and -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
89
automated/dockerfiles/lts-14.0/Dockerfile.sub
Normal file
89
automated/dockerfiles/lts-14.0/Dockerfile.sub
Normal file
@ -0,0 +1,89 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.6.5
|
||||
ARG LTS_SLUG=lts-14.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.1.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_VERSION=3.9
|
||||
ARG BOOTSTRAP_COMMIT=d4143f1845f26e8e99d0a1a8134d6ff535ab98b2
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
ARG STACK_ROOT=/home/stackage/.stack
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:$STACK_ROOT/programs/x86_64-linux/ghc-$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
CPATH=$JVM_PATH/include:$JVM_PATH/include/linux:/usr/lib/llvm-$LLVM_VERSION/include
|
||||
|
||||
#
|
||||
# Install pre-requisites
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
wget netbase ca-certificates g++ gcc libc6-dev libffi-dev libgmp-dev \
|
||||
make xz-utils zlib1g-dev git gnupg libtinfo-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running debian-bootstrap.sh since that may have
|
||||
# installed a different version.
|
||||
# In the case of 'small' image, just install Stack and GHC.
|
||||
#
|
||||
|
||||
RUN if [ "$VARIANT" != "small" ]; then \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.5$/GHCVER=$GHC_VERSION/" | GHCVER=$GHC_VERSION bash; \
|
||||
fi && \
|
||||
wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack' && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
stack setup --resolver ghc-$GHC_VERSION; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --resolver=$LTS_SLUG --local-bin-path=/usr/bin install \
|
||||
happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -and -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
89
automated/dockerfiles/lts-15.0/Dockerfile
Normal file
89
automated/dockerfiles/lts-15.0/Dockerfile
Normal file
@ -0,0 +1,89 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.8.2
|
||||
ARG LTS_SLUG=lts-15.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.1.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-7
|
||||
ARG BOOTSTRAP_COMMIT=77790c7bcb21fd8875871245df5c5c39a55ec0c1
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
ARG STACK_ROOT=/home/stackage/.stack
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:$STACK_ROOT/programs/x86_64-linux/ghc-$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
CPATH=$JVM_PATH/include:$JVM_PATH/include/linux:$LLVM_PATH/include
|
||||
|
||||
#
|
||||
# Install pre-requisites
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
wget netbase ca-certificates g++ gcc libc6-dev libffi-dev libgmp-dev \
|
||||
make xz-utils zlib1g-dev git gnupg libtinfo-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running debian-bootstrap.sh since that may have
|
||||
# installed a different version.
|
||||
# In the case of 'small' image, just install Stack and GHC.
|
||||
#
|
||||
|
||||
RUN if [ "$VARIANT" != "small" ]; then \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.5$/GHCVER=$GHC_VERSION/" | GHCVER=$GHC_VERSION bash; \
|
||||
fi && \
|
||||
wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack' && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
stack setup --resolver ghc-$GHC_VERSION; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --resolver=$LTS_SLUG --local-bin-path=/usr/bin install \
|
||||
happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -and -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
3
automated/dockerfiles/lts-15.10/Dockerfile
Normal file
3
automated/dockerfiles/lts-15.10/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM $DOCKER_REPO:lts-15.5
|
||||
ARG STACK_VERSION=2.3.1
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
89
automated/dockerfiles/lts-15.5/Dockerfile
Normal file
89
automated/dockerfiles/lts-15.5/Dockerfile
Normal file
@ -0,0 +1,89 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.8.3
|
||||
ARG LTS_SLUG=lts-15.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.1.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-7
|
||||
ARG BOOTSTRAP_COMMIT=77790c7bcb21fd8875871245df5c5c39a55ec0c1
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
ARG STACK_ROOT=/home/stackage/.stack
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:$STACK_ROOT/programs/x86_64-linux/ghc-$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
CPATH=$JVM_PATH/include:$JVM_PATH/include/linux:$LLVM_PATH/include
|
||||
|
||||
#
|
||||
# Install pre-requisites
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
wget netbase ca-certificates g++ gcc libc6-dev libffi-dev libgmp-dev \
|
||||
make xz-utils zlib1g-dev git gnupg libtinfo-dev jq && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running debian-bootstrap.sh since that may have
|
||||
# installed a different version.
|
||||
# In the case of 'small' image, just install Stack and GHC.
|
||||
#
|
||||
|
||||
RUN if [ "$VARIANT" != "small" ]; then \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.5$/GHCVER=$GHC_VERSION/" | GHCVER=$GHC_VERSION bash; \
|
||||
fi && \
|
||||
wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack' && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
stack setup --resolver ghc-$GHC_VERSION; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --resolver=$LTS_SLUG --local-bin-path=/usr/bin install \
|
||||
happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -and -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
90
automated/dockerfiles/lts-16.0/Dockerfile
Normal file
90
automated/dockerfiles/lts-16.0/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.8.3
|
||||
ARG LTS_SLUG=lts-16.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.3.1
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-7
|
||||
ARG BOOTSTRAP_COMMIT=1afd08ff0a3c3627f17eb1b928d35f337db40e08
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
ARG STACK_ROOT=/home/stackage/.stack
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:$STACK_ROOT/programs/x86_64-linux/ghc-$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
CPATH=$JVM_PATH/include:$JVM_PATH/include/linux:$LLVM_PATH/include
|
||||
|
||||
#
|
||||
# Install pre-requisites
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
wget netbase ca-certificates g++ gcc libc6-dev libffi-dev libgmp-dev \
|
||||
make xz-utils zlib1g-dev git gnupg libtinfo-dev jq && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running debian-bootstrap.sh since that may have
|
||||
# installed a different version.
|
||||
# In the case of 'small' image, just install Stack and GHC.
|
||||
#
|
||||
|
||||
RUN if [ "$VARIANT" != "small" ]; then \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.5$/GHCVER=$GHC_VERSION/" | GHCVER=$GHC_VERSION bash; \
|
||||
fi && \
|
||||
wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack' && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
stack setup --resolver ghc-$GHC_VERSION; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --resolver=$LTS_SLUG --local-bin-path=/usr/bin install \
|
||||
happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -and -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
90
automated/dockerfiles/lts-16.12/Dockerfile
Normal file
90
automated/dockerfiles/lts-16.12/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.8.4
|
||||
ARG LTS_SLUG=lts-16.12
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.3.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-7
|
||||
ARG BOOTSTRAP_COMMIT=1afd08ff0a3c3627f17eb1b928d35f337db40e08
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
ARG STACK_ROOT=/home/stackage/.stack
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:$STACK_ROOT/programs/x86_64-linux/ghc-$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
CPATH=$JVM_PATH/include:$JVM_PATH/include/linux:$LLVM_PATH/include
|
||||
|
||||
#
|
||||
# Install pre-requisites
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
wget netbase ca-certificates g++ gcc libc6-dev libffi-dev libgmp-dev \
|
||||
make xz-utils zlib1g-dev git gnupg libtinfo-dev jq && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running debian-bootstrap.sh since that may have
|
||||
# installed a different version.
|
||||
# In the case of 'small' image, just install Stack and GHC.
|
||||
#
|
||||
|
||||
RUN if [ "$VARIANT" != "small" ]; then \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.5$/GHCVER=$GHC_VERSION/" | GHCVER=$GHC_VERSION bash; \
|
||||
fi && \
|
||||
wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack' && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
stack setup --resolver ghc-$GHC_VERSION; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --resolver=$LTS_SLUG --local-bin-path=/usr/bin install \
|
||||
happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -and -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
3
automated/dockerfiles/lts-16.8/Dockerfile
Normal file
3
automated/dockerfiles/lts-16.8/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM $DOCKER_REPO:lts-16.0
|
||||
ARG STACK_VERSION=2.3.3
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
90
automated/dockerfiles/lts-17.0/Dockerfile
Normal file
90
automated/dockerfiles/lts-17.0/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.8.3
|
||||
ARG LTS_SLUG=lts-17.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.5.1
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-7
|
||||
ARG BOOTSTRAP_COMMIT=1afd08ff0a3c3627f17eb1b928d35f337db40e08
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
ARG STACK_ROOT=/home/stackage/.stack
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:$STACK_ROOT/programs/x86_64-linux/ghc-$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
CPATH=$JVM_PATH/include:$JVM_PATH/include/linux:$LLVM_PATH/include
|
||||
|
||||
#
|
||||
# Install pre-requisites
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
wget netbase ca-certificates g++ gcc libc6-dev libffi-dev libgmp-dev \
|
||||
make xz-utils zlib1g-dev git gnupg libtinfo-dev jq && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running debian-bootstrap.sh since that may have
|
||||
# installed a different version.
|
||||
# In the case of 'small' image, just install Stack and GHC.
|
||||
#
|
||||
|
||||
RUN if [ "$VARIANT" != "small" ]; then \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.5$/GHCVER=$GHC_VERSION/" | GHCVER=$GHC_VERSION bash; \
|
||||
fi && \
|
||||
wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack' && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
stack setup --resolver ghc-$GHC_VERSION; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --resolver=$LTS_SLUG --local-bin-path=/usr/bin install \
|
||||
happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -and -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
90
automated/dockerfiles/lts-17.3/Dockerfile
Normal file
90
automated/dockerfiles/lts-17.3/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.8.4
|
||||
ARG LTS_SLUG=lts-17.3
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.5.1
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-7
|
||||
ARG BOOTSTRAP_COMMIT=1afd08ff0a3c3627f17eb1b928d35f337db40e08
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
ARG STACK_ROOT=/home/stackage/.stack
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:$STACK_ROOT/programs/x86_64-linux/ghc-$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
CPATH=$JVM_PATH/include:$JVM_PATH/include/linux:$LLVM_PATH/include
|
||||
|
||||
#
|
||||
# Install pre-requisites
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
wget netbase ca-certificates g++ gcc libc6-dev libffi-dev libgmp-dev \
|
||||
make xz-utils zlib1g-dev git gnupg libtinfo-dev jq && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running debian-bootstrap.sh since that may have
|
||||
# installed a different version.
|
||||
# In the case of 'small' image, just install Stack and GHC.
|
||||
#
|
||||
|
||||
RUN if [ "$VARIANT" != "small" ]; then \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.5$/GHCVER=$GHC_VERSION/" | GHCVER=$GHC_VERSION bash; \
|
||||
fi && \
|
||||
wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack' && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
stack setup --resolver ghc-$GHC_VERSION; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --resolver=$LTS_SLUG --local-bin-path=/usr/bin install \
|
||||
happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -and -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
55
automated/dockerfiles/lts-9.0/Dockerfile
Normal file
55
automated/dockerfiles/lts-9.0/Dockerfile
Normal file
@ -0,0 +1,55 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.0.2
|
||||
ARG LTS_SLUG=lts-9.0
|
||||
ARG PID1_VERSION=0.1.0.1
|
||||
ARG BOOTSTRAP_COMMIT=1bc67bb54eda08c90d8421bc11d257354a379d11
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget && \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
|
||||
ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
|
||||
cd $HOME/.stack && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install proper 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/pid1%2F$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
3
automated/dockerfiles/lts-9.20/Dockerfile
Normal file
3
automated/dockerfiles/lts-9.20/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-9.0
|
||||
ARG STACK_VERSION=1.6.1
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
3
automated/dockerfiles/lts-9.21/Dockerfile
Normal file
3
automated/dockerfiles/lts-9.21/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-9.0
|
||||
ARG STACK_VERSION=1.6.5
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
if [[ ! -f convert ]]
|
||||
then
|
||||
curl https://s3.amazonaws.com/michael.snoyman.com/convert-old-stackage-22f85f4829da949df601f2facf2d9b8c794232cf.bz2 > convert.bz2
|
||||
chmod +x convert.bz2
|
||||
bunzip2 convert.bz2
|
||||
fi
|
||||
|
||||
cd $(dirname ${BASH_SOURCE[0]})
|
||||
|
||||
for d in lts-haskell stackage-nightly stackage-snapshots
|
||||
do
|
||||
if [[ ! -d "$d" ]]
|
||||
then
|
||||
git clone https://github.com/commercialhaskell/$d
|
||||
else
|
||||
(cd "$d" && git pull || echo "Git pull failed, ignoring")
|
||||
fi
|
||||
done
|
||||
|
||||
./convert
|
||||
|
||||
cd stackage-snapshots
|
||||
git add lts nightly
|
||||
git diff-index --quiet HEAD && echo No changes && exit 0
|
||||
git config user.name "Stackage build server"
|
||||
git config user.email "michael@snoyman.com"
|
||||
git commit -m "More conversions $(date)"
|
||||
GIT_SSH_COMMAND='ssh -i ../../ssh-lts/id_rsa' git push git@github.com:commercialhaskell/stackage-snapshots master
|
||||
@ -1,5 +0,0 @@
|
||||
# Building Stackage with Nix
|
||||
|
||||
The script `build.sh` is supposed to be run in a directory where `curator unpack`
|
||||
was run - it assumes existence of `unpack-dir` directory with a Stackage
|
||||
snapshot `stack.yaml` and unpacked packages in it.
|
||||
@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu +x
|
||||
|
||||
NIX_VERSION="2.0.4"
|
||||
curl https://nixos.org/releases/nix/nix-$NIX_VERSION/install | sh
|
||||
|
||||
# no code to install stack2nix yet
|
||||
|
||||
stack2nix --cabal2nix-args="--no-hpack" unpack-dir > snapshot.nix
|
||||
|
||||
nix build -f snapshot-fixed.nix
|
||||
@ -1,23 +0,0 @@
|
||||
let
|
||||
spec = builtins.fromJSON (builtins.readFile ./nixpkgs-src.json);
|
||||
src = import <nix/fetchurl.nix> {
|
||||
url = "https://github.com/${spec.owner}/${spec.repo}/archive/${spec.rev}.tar.gz";
|
||||
inherit (spec) sha256;
|
||||
};
|
||||
nixcfg = import <nix/config.nix>;
|
||||
in builtins.derivation {
|
||||
system = builtins.currentSystem;
|
||||
name = "${src.name}-unpacked";
|
||||
builder = builtins.storePath nixcfg.shell;
|
||||
inherit src;
|
||||
args = [
|
||||
(builtins.toFile "builder" ''
|
||||
$coreutils/mkdir $out
|
||||
cd $out
|
||||
$gzip -d < $src | $tar -x --strip-components=1
|
||||
'')
|
||||
];
|
||||
coreutils = builtins.storePath nixcfg.coreutils;
|
||||
tar = builtins.storePath nixcfg.tar;
|
||||
gzip = builtins.storePath nixcfg.gzip;
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c2950341d038995bf46a7b72db961bb3d3e9ac12",
|
||||
"sha256": "0ghirjm6xvsihci3fladrn4nrnh2yr529v7c406hmw0yp25kv0i4"
|
||||
}
|
||||
@ -1,41 +0,0 @@
|
||||
{ pkgs ? import (import ./fetch-nixpkgs.nix) {}
|
||||
, compiler ? pkgs.haskell.packages.ghc863
|
||||
}:
|
||||
let
|
||||
snapshot = import ./snapshot.nix { pkgs = pkgs; compiler = compiler; };
|
||||
in
|
||||
snapshot.override (with pkgs.haskell.lib; {
|
||||
overrides = self: super: {
|
||||
# disabling packages from non-hackage-packages.nix
|
||||
futhark = null;
|
||||
multi-ghc-travis = null;
|
||||
vaultenv = null;
|
||||
# native deps
|
||||
check-email = super.check-email.override { resolv = null; };
|
||||
flac = super.flac.override { FLAC = pkgs.flac; };
|
||||
freenect = super.freenect.override { freenect_sync = null; libfreenect = null; };
|
||||
haskell-gi = super.haskell-gi.override { gobject-introspection = pkgs.gnome3.gobjectIntrospection; };
|
||||
HDBC-mysql = super.HDBC-mysql.override { mysqlclient = pkgs.mysql;};
|
||||
libffi = super.libffi.override { ffi = null; };
|
||||
# fixes
|
||||
blas-ffi = overrideCabal super.blas-ffi (
|
||||
old: { libraryPkgconfigDepends = old.libraryPkgconfigDepends ++ [ pkgs.openblasCompat ]; }
|
||||
);
|
||||
odbc = overrideCabal super.odbc (
|
||||
old: { librarySystemDepends = old.librarySystemDepends ++ [ pkgs.freetds ]; }
|
||||
);
|
||||
html-entities = null; # https://github.com/nikita-volkov/html-entities/issues/8
|
||||
category = null; # conflict in Prelude.hs
|
||||
constraint = null; # because of category
|
||||
lame = null; # fails with 'Total ticks: 451489'
|
||||
proto-lens-protobuf-types = overrideCabal super.proto-lens-protobuf-types (
|
||||
old: { libraryToolDepends = old.libraryToolDepends ++ [ pkgs.protobuf ]; }
|
||||
);
|
||||
# libraft = null; # xxx/postgres/entries.sql: openFile: does not exist (No such file or directory) in libraft-0.2.0.0
|
||||
xmlbf-xeno = null; # because of html-entities
|
||||
xmonad = null; # xmonad requires extra patches for Nix
|
||||
xmonad-contrib = null;
|
||||
xmonad-extras = null;
|
||||
hlibgit2 = disableHardening super.hlibgit2 [ "format" ];
|
||||
};
|
||||
})
|
||||
@ -6,9 +6,6 @@ while true; do
|
||||
./build.sh nightly-$(date -u +%F)
|
||||
date
|
||||
|
||||
./new-stackage-format/convert.sh
|
||||
date
|
||||
|
||||
sleep 30m
|
||||
echo
|
||||
done
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
12
check
12
check
@ -1,6 +1,14 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# Convenience script for checking constraints locally
|
||||
|
||||
cd `dirname $0`
|
||||
exec stack exec --resolver ghc-8.6.4 stackage-curator check
|
||||
|
||||
export GHCVER=$(sed -n "s/^ghc-version: \"\(.*\)\"/\1/p" "build-constraints.yaml")
|
||||
|
||||
NIGHTLY="nightly-$(date +%Y-%m-%d)"
|
||||
curator update &&
|
||||
curator constraints --target=$NIGHTLY &&
|
||||
curator snapshot-incomplete --target=$NIGHTLY &&
|
||||
curator snapshot &&
|
||||
stack --resolver ghc-$GHCVER exec curator check-snapshot
|
||||
|
||||
@ -17,9 +17,19 @@ mkdir -p /home/stackage
|
||||
export LANG=C.UTF-8
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Get curl
|
||||
# Get curl and unzip
|
||||
apt-get update
|
||||
apt-get install -y curl
|
||||
apt-get install -y curl unzip
|
||||
|
||||
# Install AWS CLI
|
||||
mkdir -p /tmp/awscli
|
||||
(
|
||||
cd /tmp/awscli
|
||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||
unzip awscliv2.zip
|
||||
./aws/install --bin-dir /usr/bin
|
||||
)
|
||||
rm -rf /tmp/awscli
|
||||
|
||||
# Get Stack and GHC
|
||||
curl -sSL https://get.haskellstack.org/ | sh -s - -d /usr/bin
|
||||
@ -52,6 +62,8 @@ apt-get install -y \
|
||||
libclang-3.9-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libcwiid-dev \
|
||||
libdbusmenu-glib-dev \
|
||||
libdbusmenu-gtk3-dev \
|
||||
libdevil-dev \
|
||||
libedit-dev \
|
||||
libedit2 \
|
||||
@ -66,6 +78,7 @@ apt-get install -y \
|
||||
libglu1-mesa-dev \
|
||||
libgmp3-dev \
|
||||
libgnutls28-dev \
|
||||
libgraphene-1.0-dev \
|
||||
libgsasl7-dev \
|
||||
libgsl-dev \
|
||||
libgtk-3-dev \
|
||||
@ -77,10 +90,12 @@ apt-get install -y \
|
||||
libimlib2-dev \
|
||||
libjack-jackd2-dev \
|
||||
libjavascriptcoregtk-4.0-dev \
|
||||
libjansson-dev \
|
||||
libjudy-dev \
|
||||
liblapack-dev \
|
||||
libleveldb-dev \
|
||||
liblmdb-dev \
|
||||
liblz4-tool \
|
||||
liblzma-dev \
|
||||
libmagic-dev \
|
||||
libmagickcore-dev \
|
||||
@ -89,15 +104,16 @@ apt-get install -y \
|
||||
libmono-2.0-dev \
|
||||
libmp3lame-dev \
|
||||
libmpfr-dev \
|
||||
libmpich-dev \
|
||||
libmysqlclient-dev \
|
||||
libncurses5-dev \
|
||||
libnfc-dev \
|
||||
liboath-dev \
|
||||
libnotify-dev \
|
||||
libopenal-dev \
|
||||
libopenmpi-dev \
|
||||
libpango1.0-dev \
|
||||
libpcap0.8-dev \
|
||||
libpcre2-dev \
|
||||
libpq-dev \
|
||||
libprotobuf-dev \
|
||||
libre2-dev \
|
||||
@ -130,7 +146,9 @@ apt-get install -y \
|
||||
libzip-dev \
|
||||
libzstd-dev \
|
||||
libzmq3-dev \
|
||||
llvm-6.0 \
|
||||
llvm-7 \
|
||||
llvm-8 \
|
||||
llvm-9 \
|
||||
locales \
|
||||
m4 \
|
||||
minisat \
|
||||
@ -145,6 +163,7 @@ apt-get install -y \
|
||||
python3-scipy \
|
||||
r-base \
|
||||
r-base-dev \
|
||||
rpm \
|
||||
ruby-dev \
|
||||
software-properties-common \
|
||||
sudo \
|
||||
@ -152,7 +171,6 @@ apt-get install -y \
|
||||
unixodbc-dev \
|
||||
wget \
|
||||
xclip \
|
||||
z3 \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh
|
||||
@ -163,13 +181,13 @@ curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources
|
||||
apt-get update
|
||||
ACCEPT_EULA=Y apt-get install msodbcsql17 -y
|
||||
|
||||
locale-gen en_US.UTF-8
|
||||
# llvm for llvm-hs
|
||||
curl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
||||
add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main"
|
||||
apt-get update
|
||||
apt-get install llvm-9-dev -y
|
||||
|
||||
# llvm-7.0 for llvm-hs (separate since it needs wget)
|
||||
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
|
||||
&& add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main" \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y llvm-7
|
||||
locale-gen en_US.UTF-8
|
||||
|
||||
# Buggy versions of ld.bfd fail to link some Haskell packages:
|
||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=17689. Gold is
|
||||
@ -181,9 +199,9 @@ update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10
|
||||
# This version is tracked here:
|
||||
# https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM/Installing
|
||||
#
|
||||
# GHC 8.6 requires LLVM 6.0 tools (specifically, llc-6.0 and opt-6.0).
|
||||
update-alternatives --install "/usr/bin/llc" "llc" "/usr/bin/llc-6.0" 50
|
||||
update-alternatives --install "/usr/bin/opt" "opt" "/usr/bin/opt-6.0" 50
|
||||
# GHC 8.10 requires LLVM 9 tools (?) (specifically, llc-9 and opt-9).
|
||||
update-alternatives --install "/usr/bin/llc" "llc" "/usr/bin/llc-9" 50
|
||||
update-alternatives --install "/usr/bin/opt" "opt" "/usr/bin/opt-9" 50
|
||||
|
||||
# nodejs 10 (nodejs8 in bionic needs conflicting libssl10-dev)
|
||||
curl -sL https://deb.nodesource.com/setup_10.x | bash -
|
||||
@ -217,10 +235,9 @@ echo "/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/" > /etc/ld.so.conf
|
||||
&& ldconfig
|
||||
|
||||
# Install erlang/otp platform and its dependencies
|
||||
ERLANG_VERSION="20.2.2"
|
||||
ERLANG_DEB_FILE="esl-erlang_21.2-1~ubuntu~bionic_amd64.deb"
|
||||
ERLANG_DEB_FILE="esl-erlang_21.1-1~ubuntu~bionic_amd64.deb"
|
||||
pushd /tmp \
|
||||
&& wget http://packages.erlang-solutions.com/site/esl/esl-erlang/FLAVOUR_1_general/${ERLANG_DEB_FILE} \
|
||||
&& wget https://packages.erlang-solutions.com/erlang/debian/pool/${ERLANG_DEB_FILE} \
|
||||
&& (dpkg -i ${ERLANG_DEB_FILE}; apt-get install -yf) \
|
||||
&& rm ${ERLANG_DEB_FILE} \
|
||||
&& popd
|
||||
@ -256,8 +273,8 @@ apt-add-repository multiverse \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y nvidia-cuda-dev
|
||||
|
||||
export CLANG_PURE_LLVM_LIB_DIR=/usr/lib/llvm-6.0/lib;
|
||||
export CLANG_PURE_LLVM_INCLUDE_DIR=/usr/lib/llvm-6.0/include;
|
||||
export CLANG_PURE_LLVM_LIB_DIR=/usr/lib/llvm-9/lib;
|
||||
export CLANG_PURE_LLVM_INCLUDE_DIR=/usr/lib/llvm-9/include;
|
||||
|
||||
# protoc, for proto-lens-combinators test suite
|
||||
# Instructions from: https://google.github.io/proto-lens/installing-protoc.html
|
||||
@ -275,6 +292,49 @@ echo /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server > /etc/ld.so.conf.d/
|
||||
echo /usr/lib/llvm-3.7/lib > /etc/ld.so.conf.d/llvm.conf
|
||||
|
||||
ldconfig
|
||||
|
||||
# Install librdkafka (Apache Kafka C/C++ library)
|
||||
wget -qO - https://packages.confluent.io/deb/5.2/archive.key | apt-key add -
|
||||
add-apt-repository "deb https://packages.confluent.io/deb/5.2 stable main"
|
||||
apt-get update && apt install -y librdkafka-dev
|
||||
|
||||
# Install binaryen
|
||||
curl -L https://github.com/WebAssembly/binaryen/archive/version_94.tar.gz | tar xz -C /tmp
|
||||
pushd /tmp/binaryen-version_94
|
||||
mkdir build
|
||||
cd build
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-G "Unix Makefiles" \
|
||||
..
|
||||
sudo make install
|
||||
popd
|
||||
|
||||
Z3_VER=4.8.8
|
||||
(
|
||||
cd /usr/local/ \
|
||||
&& wget https://github.com/Z3Prover/z3/releases/download/z3-${Z3_VER}/z3-${Z3_VER}-x64-ubuntu-16.04.zip \
|
||||
&& unzip z3-${Z3_VER}-x64-ubuntu-16.04.zip \
|
||||
&& rm z3-${Z3_VER}-x64-ubuntu-16.04.zip \
|
||||
&& ln -s /usr/local/z3-${Z3_VER}-x64-ubuntu-16.04/bin/z3 /usr/bin/z3
|
||||
)
|
||||
|
||||
LIBJWT_VER=1.12.1
|
||||
(
|
||||
pushd /tmp \
|
||||
&& wget https://github.com/benmcollins/libjwt/archive/v${LIBJWT_VER}.zip \
|
||||
&& unzip v${LIBJWT_VER}.zip \
|
||||
&& pushd libjwt-${LIBJWT_VER} \
|
||||
&& autoreconf -fiv \
|
||||
&& ./configure --disable-valgrind --disable-doxygen-doc --prefix /usr \
|
||||
&& make \
|
||||
&& sudo make install \
|
||||
&& popd \
|
||||
&& popd
|
||||
)
|
||||
|
||||
|
||||
# EOF: don't build anything below this line
|
||||
|
||||
# Cleanup
|
||||
|
||||
28
etc/check.sh
Executable file
28
etc/check.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
ETC=$(cd $(dirname $0) ; pwd)
|
||||
export GHCVER=$(sed -n "s/^ghc-version: \"\(.*\)\"/\1/p" "$ETC/../build-constraints.yaml")
|
||||
|
||||
# Download and unpack the stack executable
|
||||
mkdir -p ~/.local/bin
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
|
||||
|
||||
# Get new Stackage curator
|
||||
curl -L "https://github.com/commercialhaskell/curator/releases/download/commit-a79aadca0f6497ec6accc927df5be7c49f5de86a/curator.bz2" | bunzip2 > curator
|
||||
chmod +x curator
|
||||
|
||||
# Install GHC
|
||||
stack setup $GHCVER
|
||||
|
||||
# curator's constraint command has target as a required parameter
|
||||
# because of a different constraints handling in minor LTS version bumps
|
||||
NIGHTLY="nightly-$(date +%Y-%m-%d)"
|
||||
# New curator check
|
||||
./curator update &&
|
||||
./curator constraints --target=$NIGHTLY &&
|
||||
./curator snapshot-incomplete --target=$NIGHTLY &&
|
||||
./curator snapshot &&
|
||||
stack --resolver ghc-$GHCVER exec ./curator check-snapshot
|
||||
@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
export GHCVER=8.6.4
|
||||
|
||||
# Download and unpack the stack executable
|
||||
mkdir -p ~/.local/bin
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
|
||||
|
||||
# Get stackage-curator
|
||||
wget https://s3.amazonaws.com/stackage-travis/stackage-curator/stackage-curator.bz2
|
||||
bunzip2 stackage-curator.bz2
|
||||
chmod +x stackage-curator
|
||||
mv stackage-curator ~/.local/bin
|
||||
|
||||
# Install GHC
|
||||
stack setup $GHCVER
|
||||
|
||||
# Update the index
|
||||
stack update
|
||||
|
||||
# Check
|
||||
exec stack --resolver ghc-$GHCVER exec stackage-curator check
|
||||
@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
mkdir -p ~/.local/bin
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
|
||||
# Get new Stackage curator
|
||||
CURATOR2=stackage-curator-2-90cf65bfddea4e8abb5bc68fe83d59a7f8766757
|
||||
wget "https://s3.amazonaws.com/www.snoyman.com/stackage-curator-2/$CURATOR2.bz2"
|
||||
bunzip2 "$CURATOR2.bz2"
|
||||
chmod +x $CURATOR2
|
||||
mv $CURATOR2 ~/.local/bin/stackage-curator-2
|
||||
|
||||
# New curator check
|
||||
stackage-curator-2 update &&
|
||||
stackage-curator-2 constraints &&
|
||||
stackage-curator-2 snapshotincomplete &&
|
||||
stackage-curator-2 snapshot &&
|
||||
stackage-curator-2 checksnapshot
|
||||
1
etc/curator-exes/.gitignore
vendored
Normal file
1
etc/curator-exes/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/bin/
|
||||
13
etc/curator-exes/Dockerfile
Normal file
13
etc/curator-exes/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM fpco/stack-build:lts-14
|
||||
|
||||
# Prime the snapshot so rebuilds are faster
|
||||
RUN mkdir -p /artifacts
|
||||
RUN stack update
|
||||
RUN stack build --no-install-ghc --resolver lts-13.28 --only-dependencies stack amazonka-s3
|
||||
|
||||
RUN git clone --depth 1 https://github.com/commercialhaskell/stack && \
|
||||
git clone --depth 1 https://github.com/commercialhaskell/curator
|
||||
|
||||
COPY stack.yaml .
|
||||
|
||||
RUN stack --no-install-ghc install --local-bin-path /artifacts
|
||||
5
etc/curator-exes/README.md
Normal file
5
etc/curator-exes/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
Scripts to create and upload the curator-exes.tar.bz2 files. Make sure to
|
||||
update the hash in automated/build-next.sh.
|
||||
|
||||
NOTE: Depending on what's exactly on the master branches when running the
|
||||
`./run.sh` script, the `stack.yaml` file may need some tweaks.
|
||||
11
etc/curator-exes/run.sh
Executable file
11
etc/curator-exes/run.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
rm -rf bin
|
||||
mkdir -p bin
|
||||
|
||||
docker build . --tag curator-exes
|
||||
|
||||
docker run --rm -v $(pwd)/bin:/output curator-exes cp /artifacts/* output
|
||||
aws s3 cp curators-exes/* s3://download.fpcomplete.com/curator-exes/
|
||||
22
etc/curator-exes/stack.yaml
Normal file
22
etc/curator-exes/stack.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
resolver: lts-13.28
|
||||
|
||||
packages:
|
||||
- stack
|
||||
- curator
|
||||
|
||||
extra-deps:
|
||||
- hi-file-parser-0.1.0.0@sha256:3fc95852035c8e0fa6d5f9d22e5108067c8f4816ac84675bddc971b20144a9ae,2317
|
||||
- http-download-0.1.0.0@sha256:b02d76d28364b74fb90d3ec3c46fd81f9d77bcf71fa40c1d341a7251a0fc40e8,2023
|
||||
- pantry-0.1.1.2@sha256:6f06556f8e934afd517559d6f3dae947db91ef3801ee4e5cee9916c83a0c4d52,4628
|
||||
- rio-prettyprint-0.1.0.0@sha256:764e1a357275c3c62d57c494d038feae01cf745788e7d0e97367ba793c9670c3,1359
|
||||
- ansi-terminal-0.9.1@sha256:48f53532d0f365ffa568c8cf0adc84c66f800a7d80d3329e4f04fa75392f4af1,3225
|
||||
- rio-0.1.12.0@sha256:a0b42682a455ffde6a4d894b135117e379aea7ed1810c2cfed471b8f5879968c,3633
|
||||
- unliftio-0.2.12@sha256:b089fbc2ff2628a963c2c4b12143f2020874e3e5144ffd6c62b25639a0ca1483,3325
|
||||
|
||||
- github: fpco/casa
|
||||
commit: a0cd05c1a9ce33acbb1bdfb9324370f884916e88
|
||||
# sha256: 812e05de8f9abdbd1101fc94895dcfd5c35962c4d67a43cc20cbc06eb59ea1f0
|
||||
# size: 9508
|
||||
subdirs:
|
||||
- casa-client
|
||||
- casa-types
|
||||
13
etc/diskspace/clean-old-stack-libs.sh
Executable file
13
etc/diskspace/clean-old-stack-libs.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ $# != 1 ]; then
|
||||
echo "Usage: $0 [nightly|lts-xx]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ~/stackage/automated/work/$1/unpack-dir/.stack-work/install/x86_64-linux/*/*/lib/x86_64-linux-ghc-*
|
||||
pwd
|
||||
|
||||
stack --resolver nightly-2020-07-04 script ~/stackage/etc/diskspace/remove-old-stack-work-libs.hs
|
||||
57
etc/diskspace/remove-old-stack-work-libs.hs
Normal file
57
etc/diskspace/remove-old-stack-work-libs.hs
Normal file
@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env stack
|
||||
-- stack --resolver nightly script
|
||||
|
||||
-- Utility to remove old libs installed under .stack-work/ to save diskspace
|
||||
|
||||
-- Should be run in:
|
||||
-- work/*/unpack-dir/.stack-work/install/x86_64-linux/*/*/lib/x86_64-linux-ghc-*
|
||||
|
||||
import Data.List
|
||||
import System.Directory
|
||||
import System.FilePath
|
||||
import Text.Regex.TDFA
|
||||
|
||||
-- keep 2 latest builds
|
||||
keepBuilds :: Int
|
||||
keepBuilds = 2
|
||||
|
||||
main = do
|
||||
files <- sort <$> listDirectory "."
|
||||
let (dynlibs,libdirs) = partition (".so" `isExtensionOf`) files
|
||||
pkglibdirs = groupBy samePkgLibDir libdirs
|
||||
pkgdynlibs = groupBy samePkgDynLib dynlibs
|
||||
mapM_ (removeOlder removeDirectoryRecursive) pkglibdirs
|
||||
mapM_ (removeOlder removeFile) pkgdynlibs
|
||||
where
|
||||
samePkgLibDir l1 l2 = pkgDirName l1 == pkgDirName l2
|
||||
where
|
||||
pkgDirName p =
|
||||
if length p < 25
|
||||
then error $ p ++ " too short to be in correct name-version-hash format"
|
||||
else extractNameInternal p
|
||||
|
||||
extractNameInternal :: String -> String
|
||||
extractNameInternal p =
|
||||
let (name,match,internal) = p =~ "-[0-9.]+-[0-9A-Za-z]{19,22}" :: (String, String, String)
|
||||
in if null match || null name then error $ p ++ " not in correct name-version-hash format"
|
||||
else name ++ internal
|
||||
|
||||
samePkgDynLib d1 d2 = pkgDynName d1 == pkgDynName d2
|
||||
where
|
||||
pkgDynName p =
|
||||
if length p < 42
|
||||
then error $ p ++ " too short to be libHSname-version-hash-ghc*.so format"
|
||||
else (extractNameInternal . removeDashSegment) p
|
||||
|
||||
removeDashSegment = dropWhileEnd (/= '-')
|
||||
|
||||
removeOlder remover files = do
|
||||
oldfiles <- drop keepBuilds . reverse <$> sortByAge files
|
||||
mapM_ remover oldfiles
|
||||
|
||||
sortByAge files = do
|
||||
timestamps <- mapM getModificationTime files
|
||||
let fileTimes = zip files timestamps
|
||||
return $ map fst $ sortBy compareSnd fileTimes
|
||||
|
||||
compareSnd (_,t1) (_,t2) = compare t1 t2
|
||||
47
verify-package
Executable file
47
verify-package
Executable file
@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Script to verify a package to build successfully
|
||||
# Provide pacakge name by the first argument
|
||||
#
|
||||
# Example:
|
||||
# ./verify-package mtl
|
||||
# or
|
||||
# ./verify-package mtl-2.2.2
|
||||
|
||||
set -eu
|
||||
|
||||
die() {
|
||||
>&2 echo "$1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
package="${1:-}"
|
||||
if [[ -z $package ]]; then
|
||||
die "Package name is not given"
|
||||
fi
|
||||
|
||||
|
||||
here="$(cd "$(dirname "$0")" > /dev/null; pwd)"
|
||||
dir="$(mktemp -d tmp.XXXX)"
|
||||
|
||||
exit() {
|
||||
cd "$here"
|
||||
rm -rf "$dir"
|
||||
}
|
||||
trap exit EXIT
|
||||
|
||||
# When updating these commands, make sure to update .github/PULL_REQUEST_TEMPLATE.md as well.
|
||||
cd "$dir"
|
||||
stack unpack "$package"
|
||||
cd "$(ls | head -n 1)"
|
||||
rm -f stack.yaml
|
||||
stack init --resolver nightly --ignore-subdirs
|
||||
stack build --resolver nightly --haddock --test --bench --no-run-benchmarks
|
||||
|
||||
|
||||
cat <<EOF
|
||||
|
||||
|
||||
🎉 It looks good!
|
||||
|
||||
EOF
|
||||
Loading…
Reference in New Issue
Block a user