Merge branch 'master' of github.com:commercialhaskell/stackage

This commit is contained in:
Athan Clark 2020-04-11 10:54:12 -07:00
commit 8609916f9c
51 changed files with 3357 additions and 1258 deletions

View File

@ -6,3 +6,5 @@ cabal.sandbox.config
tarballs
*.yaml
.git
automated
.github

View File

@ -4,5 +4,6 @@ Checklist:
- [ ] 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):
stack unpack $package-$version # $version is optional
stack init --resolver nightly
cd $package-$version
rm -f stack.yaml && stack init --resolver nightly
stack build --resolver nightly --haddock --test --bench --no-run-benchmarks

3
.gitignore vendored
View File

@ -5,3 +5,6 @@ lts-*.yaml
*.swp
check-plan.yaml
*~
/constraints.yaml
/snapshot.yaml
/snapshot-incomplete.yaml

View File

@ -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

View File

@ -1,5 +1,6 @@
# Disable Docker stuff to try to make it faster
sudo: true
dist: bionic
# Choose a lightweight base image; we provide our own build tools.
language: generic
@ -12,7 +13,7 @@ addons:
# Edit etc/ci-script.sh to change GHC version
script:
- ./etc/ci-script.sh
- ./etc/check.sh
# Caching doesn't work with sudo: true
#cache:

View File

@ -18,13 +18,13 @@ 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/stack/tree/master/subs/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)
* When a new Nightly build is completed, it is uploaded to [the nightly repo](https://github.com/fpco/stackage-nightly)
* Once a week, we run an LTS minor bump. Instead of using build-constraints.yaml, that job takes the previous LTS release, turns it into constraints, and then bumps the version numbers to the latest on Hackage, in accordance with the version bounds in the build plan. This plans are uploaded to [the LTS repo](https://github.com/fpco/lts-haskell)
* When a new Nightly build is completed, it is uploaded to [the nightly repo](https://github.com/commercialhaskell/stackage-nightly)
* Once a week, we run an LTS minor bump. Instead of using build-constraints.yaml, that job takes the previous LTS release, turns it into constraints, and then bumps the version numbers to the latest on Hackage, in accordance with the version bounds in the build plan. This plans are uploaded to [the LTS repo](https://github.com/commercialhaskell/lts-haskell)
* Cutting a new LTS major release is essentially just a Stackage Nightly that gets rebuilt and uploaded as an LTS
## Pull requests
@ -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
@ -280,31 +280,31 @@ 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
First run `build.sh` to regenerate updated `ltsXX/work/constraints.yaml` and `ltsXX/work/snapshot-incomplete.yaml` files.
Valid arguments to include in this environment variable:
For an LTS minor bump, you'll typically want to:
* `--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
* Add constraints to package `range:` fields _under_ the `source:` field in that `constraints.yaml`.
* 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.
This replaces `CONSTRAINTS=...' /var/stackage/stackage/automated/build.sh lts-x.y` for the old curator-1.
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 +320,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.
_Sadly no longer true currently_: ~~Note LTS builds inherit the current Hackage data (stack updated for Nightly) to avoid excess extra rebuilding.~~
### Timing
@ -334,6 +334,9 @@ LTS minor bumps typically are run on Sundays.
### Website sync debugging (and other out of disk space errors)
* 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:
* `rm -r /var/stackage/stackage/automated/work/lts*/unpack-dir/unpacked/`
* `rm -r /var/stackage/stackage/automated/work/nightly/unpack-dir/unpacked/`
* (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
@ -367,30 +370,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

View File

@ -2,9 +2,10 @@ FROM fpco/pid1:18.04
ENV HOME /home/stackage
ENV LANG en_US.UTF-8
ENV GHCVER 8.8.3
# NOTE: also update debian-bootstrap.sh when cuda version changes
ENV PATH /usr/local/cuda-10.0/bin:/opt/ghc/8.6.3/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PATH /home/stackage/.stack/programs/x86_64-linux/ghc-$GHCVER/bin:/usr/local/cuda-10.0/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV CUDA_PATH /usr/local/cuda-10.0
ADD debian-bootstrap.sh /tmp/debian-bootstrap.sh

View File

@ -19,10 +19,14 @@ 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 library 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.
@ -35,7 +39,7 @@ If you want to be proactive or if CI fails, you can make sure that your package
# 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
$ rm -f stack.yaml && stack init --resolver nightly
# Build, generate docs, test, and build benchmarks
$ stack build --resolver nightly --haddock --test --bench --no-run-benchmarks
```

View File

@ -9,7 +9,7 @@ This repository is for package authors and maintainers to get their packages int
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) [![Build Status](https://travis-ci.org/commercialhaskell/stack.svg?branch=master)](https://travis-ci.org/commercialhaskell/stack).
includes built-in Stackage support: [stack](https://github.com/commercialhaskell/stack) [![Build Status](https://dev.azure.com/commercialhaskell/stack/_apis/build/status/commercialhaskell.stack?branchName=master)](https://dev.azure.com/commercialhaskell/stack/_build/latest?definitionId=1?branchName=master).
Add your package
@ -126,4 +126,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
View File

@ -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

View File

@ -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,34 @@ 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://download.fpcomplete.com/stackage-curator-2/curator-85b021a53833ff310fc66b3fdc5ca3f7828ce18b.bz2" | bunzip2 > curator
chmod +x curator
echo -n "curator version: "
docker run --rm -v $(pwd)/curator:/exe $IMAGE /exe --version
curl -L "https://download.fpcomplete.com/stackage-curator-2/stack-4033c93815477e5b565d9a2a61b54e04da0863ef.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 +90,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 +102,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 +125,50 @@ 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"
# For some reason, registering on Hackage fails with inscrutable error messages. Disabling.
# docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec curator hackage-distro --target $TARGET"
docker run $ARGS_UPLOAD $IMAGE curator legacy-bulk --stackage-snapshots /dot-stackage/curator/stackage-snapshots/ --lts-haskell /dot-stackage/curator/lts-haskell/ --stackage-nightly /dot-stackage/curator/stackage-nightly/
# 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
(
if [ $SHORTNAME = "lts" ]
then
cd $DOT_STACKAGE_DIR/curator/lts-haskell
else
cd $DOT_STACKAGE_DIR/curator/stackage-nightly
fi
git add *.yaml
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 -a -m "More conversions $(date)"
GIT_SSH_COMMAND="ssh -i $SSH_DIR/id_rsa" git push origin master
)
echo -n "Completed at "
date

View File

@ -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"

View File

@ -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'"

View 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.

136
automated/dockerfiles/build.sh Executable file
View File

@ -0,0 +1,136 @@
#!/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
LTS_VERSION="${LTS_SLUG#lts-}"
LTS_MAJOR="${LTS_VERSION%.*}"
LTS_MINOR="${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
#
# Create and push an 'lts-X' tag.
tagpush "$DOCKER_REPO:$LTS_SLUG" "$DOCKER_REPO:lts-$LTS_MAJOR"
# Create and push the 'lts' and 'latest' tags.
tagpush "$DOCKER_REPO:$LTS_SLUG" "$DOCKER_REPO:lts"
tagpush "$DOCKER_REPO:$LTS_SLUG" "$DOCKER_REPO:latest"

View 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"]

View 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'

View 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'

View 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"]

View 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'

View 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'

View 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"]

View 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'

View 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

View 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'

View 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"]

View 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"]

View 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"]

View 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"]

View 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'

View 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'

View 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/*

View 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"]

View 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"]

View 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"]

View 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 && \
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"]

View 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"]

View 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'

View 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'

View File

@ -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

View File

@ -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
View File

@ -1,6 +1,14 @@
#!/bin/sh
#!/bin/bash
# Convenience script for checking constraints locally
cd `dirname $0`
exec stack exec --resolver ghc-8.6.3 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

View File

@ -10,13 +10,21 @@
# instructions, see:
# http://www.stackage.org/install
set -exu
set -exuo pipefail
mkdir -p /home/stackage
export LANG=C.UTF-8
export DEBIAN_FRONTEND=noninteractive
# Get curl
apt-get update
apt-get install -y curl
# Get Stack and GHC
curl -sSL https://get.haskellstack.org/ | sh -s - -d /usr/bin
stack setup --resolver ghc-$GHCVER
apt-get update
apt-get install -y \
@ -24,6 +32,7 @@ apt-get install -y \
build-essential \
cmake \
curl \
dvipng \
freeglut3-dev \
freetds-dev \
fsharp \
@ -43,6 +52,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 \
@ -57,6 +68,7 @@ apt-get install -y \
libglu1-mesa-dev \
libgmp3-dev \
libgnutls28-dev \
libgraphene-1.0-dev \
libgsasl7-dev \
libgsl-dev \
libgtk-3-dev \
@ -80,15 +92,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 \
@ -121,7 +134,8 @@ apt-get install -y \
libzip-dev \
libzstd-dev \
libzmq3-dev \
llvm-6.0 \
llvm-7 \
llvm-8 \
locales \
m4 \
minisat \
@ -133,11 +147,13 @@ apt-get install -y \
python3-matplotlib \
python3-numpy \
python3-pip \
python3-scipy \
r-base \
r-base-dev \
ruby-dev \
software-properties-common \
sudo \
texlive \
unixodbc-dev \
wget \
xclip \
@ -146,30 +162,20 @@ apt-get install -y \
zlib1g-dev \
zsh
GHCVER=8.6.3
add-apt-repository ppa:hvr/ghc -y
apt-get install -y ghc-$GHCVER ghc-$GHCVER-dyn ghc-$GHCVER-htmldocs ghc-$GHCVER-prof
# odbc
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list
apt-get update
ACCEPT_EULA=Y apt-get install msodbcsql17 -y
# 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
locale-gen en_US.UTF-8
curl -sSL https://get.haskellstack.org/ | sh
# Put documentation where we expect it
mv /opt/ghc/$GHCVER/share/doc/ghc-$GHCVER/ /opt/ghc/$GHCVER/share/doc/ghc
# 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
# Buggy versions of ld.bfd fail to link some Haskell packages:
# https://sourceware.org/bugzilla/show_bug.cgi?id=17689. Gold is
# faster anyways and uses less RAM.
@ -180,9 +186,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.8 requires LLVM 7 tools (?) (specifically, llc-7 and opt-7).
update-alternatives --install "/usr/bin/llc" "llc" "/usr/bin/llc-7" 50
update-alternatives --install "/usr/bin/opt" "opt" "/usr/bin/opt-7" 50
# nodejs 10 (nodejs8 in bionic needs conflicting libssl10-dev)
curl -sL https://deb.nodesource.com/setup_10.x | bash -
@ -216,10 +222,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
@ -255,12 +260,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;
# finally run:
ldconfig
# EOF: don't build anything below this line
export CLANG_PURE_LLVM_LIB_DIR=/usr/lib/llvm-7/lib;
export CLANG_PURE_LLVM_INCLUDE_DIR=/usr/lib/llvm-7/include;
# protoc, for proto-lens-combinators test suite
# Instructions from: https://google.github.io/proto-lens/installing-protoc.html
@ -278,3 +279,14 @@ 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
# EOF: don't build anything below this line
# Cleanup
apt-get clean
rm -rf /var/lib/apt/lists/*

28
etc/check.sh Executable file
View 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://download.fpcomplete.com/stackage-curator-2/curator-85b021a53833ff310fc66b3fdc5ca3f7828ce18b.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

View File

@ -1,25 +0,0 @@
#!/usr/bin/env bash
set -euxo pipefail
export GHCVER=8.6.3
# 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
etc/curator-exes/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/bin/

View 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

View 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
View 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/

View 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