mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-12 07:18:31 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
6581a8f4f5
13
.github/PULL_REQUEST_TEMPLATE.md
vendored
13
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,13 +0,0 @@
|
||||
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, you have successfully run the following command (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):
|
||||
|
||||
./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
|
||||
stack build --resolver nightly --haddock --test --bench --no-run-benchmarks
|
||||
13
.github/pull_request_template.md
vendored
Normal file
13
.github/pull_request_template.md
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
Checklist:
|
||||
- [ ] Meaningful commit message, eg `add my-cool-package` (please don't mention `build-constraints.yml`)
|
||||
- [ ] At least 30 minutes have passed since uploading to Hackage
|
||||
- [ ] If applicable, required system libraries are added to [02-apt-get-install.sh](https://github.com/commercialhaskell/stackage/blob/master/docker/02-apt-get-install.sh) or [03-custom-install.sh](https://github.com/commercialhaskell/stackage/blob/master/docker/03-custom-install.sh)
|
||||
- [ ] (optional) Package is compatible with the latest version of all dependencies (Run `cabal update && cabal outdated`)
|
||||
- [ ] (optional) Package have been verified to work with the latest nightly snapshot, e.g by running the [verify-package script](https://github.com/commercialhaskell/stackage/blob/master/verify-package)
|
||||
|
||||
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
|
||||
24
.github/workflows/check.yml
vendored
Normal file
24
.github/workflows/check.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
name: check
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
name: Stackage check
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.stack
|
||||
~/.stackage/curator/cache
|
||||
key: ${{ runner.os }}-stackage-nightly-${{ hashFiles('**/build-constraints.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-
|
||||
- run: etc/check.sh
|
||||
27
.github/workflows/image.yml
vendored
Normal file
27
.github/workflows/image.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- nightly
|
||||
- lts21
|
||||
- lts22
|
||||
|
||||
jobs:
|
||||
push:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Log into Github registry
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/build:${GITHUB_REF#refs/heads/}
|
||||
#IMAGE_ID=${{ github.repository }}:${GITHUB_REF#refs/heads/}
|
||||
docker build . -f Dockerfile --tag $IMAGE_ID
|
||||
docker push $IMAGE_ID
|
||||
echo Pushed new build image $IMAGE_ID
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
/builds/
|
||||
/logs/
|
||||
/tmp.*/
|
||||
nightly-*.yaml
|
||||
lts-*.yaml
|
||||
*.swp
|
||||
|
||||
21
.travis.yml
21
.travis.yml
@ -1,21 +0,0 @@
|
||||
# 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
|
||||
|
||||
# GHC depends on GMP. You can add other dependencies here as well.
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libgmp-dev
|
||||
|
||||
# Edit etc/ci-script.sh to change GHC version
|
||||
script:
|
||||
- ./etc/check.sh
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.stack
|
||||
- $HOME/.stackage/curator/cache
|
||||
3
CODE_OF_CONDUCT.md
Normal file
3
CODE_OF_CONDUCT.md
Normal file
@ -0,0 +1,3 @@
|
||||
We use the [Haskell Foundation's Guidelines For Respectful
|
||||
Communication](https://haskell.foundation/guidelines-for-respectful-communication/)
|
||||
as our Code of Conduct.
|
||||
236
CURATORS.md
236
CURATORS.md
@ -5,11 +5,11 @@ The following is the current list of curators, in alphabetical order:
|
||||
|
||||
* Adam Bergmark (@bergmark)
|
||||
* Alexey Zabelin (@alexeyzab)
|
||||
* Andreas Ländle (@alaendle)
|
||||
* Chris Dornan (@cdornan)
|
||||
* Dan Burton (@danburton)
|
||||
* Jens Petersen (@juhp)
|
||||
* Joe Kachmar (@jkachmar)
|
||||
* Michael Snoyman (@snoyberg)
|
||||
* Mihai Maruseac (@mihaimaruseac)
|
||||
|
||||
## Workflow overview
|
||||
@ -21,10 +21,10 @@ process works:
|
||||
* [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
|
||||
* Docker builds [builds](https://github.com/commercialhaskell/stackage/actions/workflows/image.yml)
|
||||
* 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/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)
|
||||
* When a new (nightly or LTS) build is completed, it is uploaded to [stackage-snapshots](https://github.com/commercialhaskell/stackage-snapshots)
|
||||
* 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 generated constraint.
|
||||
* Cutting a new LTS major release is essentially just a Stackage Nightly that gets rebuilt and uploaded as an LTS
|
||||
|
||||
## Pull requests
|
||||
@ -173,12 +173,12 @@ This typically happens when we move to a new major GHC release or when
|
||||
there are only a few packages waiting for updates on an upper bounds
|
||||
issue.
|
||||
|
||||
Comment out the offending packages from the "packages" section and add
|
||||
a comment saying why it was disabled:
|
||||
If a package needs to be disabled due to build failures: Add a `< 0`
|
||||
bound to the package to exclude it, and add a comment stating why it
|
||||
was disabled: `- swagger < 0 # compile failure againts aeson 1.0`
|
||||
|
||||
```
|
||||
# - swagger # bounds: aeson 1.0
|
||||
```
|
||||
If a package needs to be disabled due to bounds issues, see the "Large
|
||||
scale enabling/disabling of packages" section below.
|
||||
|
||||
If this causes reverse dependencies to be disabled we should notify
|
||||
the maintainers of those packages.
|
||||
@ -187,9 +187,9 @@ the maintainers of those packages.
|
||||
## Updating the content of the Docker image used for building
|
||||
|
||||
### Adding Debian packages for required system tools or libraries
|
||||
Additional (non-Haskell) system libraries or tools should be added to `stackage/debian-bootstrap.sh`.
|
||||
Additional (non-Haskell) system libraries or tools should be added to `docker/02-apt-get-install.sh` or `docker/03-custom-install.sh`.
|
||||
After you've committed those changes, merging them into the `nightly` branch should
|
||||
trigger a DockerHub build. Simply run:
|
||||
trigger an image build. Simply run:
|
||||
|
||||
```bash
|
||||
$ git checkout nightly
|
||||
@ -197,6 +197,8 @@ trigger a DockerHub build. Simply run:
|
||||
$ git push
|
||||
```
|
||||
|
||||
This will [trigger a build](https://github.com/commercialhaskell/stackage/actions/workflows/image.yml).
|
||||
|
||||
Use [Ubuntu Package content search](http://packages.ubuntu.com/) to determine which package provides particular dev files (it defaults to xenial which is the version used to build Nightly).
|
||||
|
||||
Note that we generally don't install/run services needed for testsuites in the docker images - packages with tests requiring some system service can be added to `expected-test-failures`.
|
||||
@ -204,23 +206,28 @@ It's good to inform the maintainer of any disabled tests (commenting in the PR i
|
||||
|
||||
If a new package fails to build because of missing system libraries we often ask the maintainer to help figure out what to install.
|
||||
|
||||
|
||||
### Upgrading GHC version
|
||||
The Dockerfile contains information on which GHC versions should be used. You
|
||||
can modify it and push it to Github to trigger a DockerHub build. The nightly
|
||||
branch is used for nightlies. For LTSes, we use the ltsX branch, where X is the
|
||||
major version number (e.g., lts3 for lts-3.\*).
|
||||
The nightly branch is used for nightlies. For LTSes, we use the ltsX branch,
|
||||
where X is the major version number (e.g., lts20 for lts-20.\*).)
|
||||
|
||||
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.
|
||||
|
||||
Update `GHCVER` in `Dockerfile`. (This env var automatically gets passed to `debian-bootstrap.sh`.)
|
||||
Note that when starting a new LTS major release, you'll need to modify `.github/workflows/image.yml` to add a new lts branch.
|
||||
|
||||
Ensure that the [global-hints.yaml
|
||||
file](https://github.com/fpco/stackage-content/blob/master/stack/global-hints.yaml)
|
||||
file](https://github.com/commercialhaskell/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`.
|
||||
repo and running `./update-global-hints.hs 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/wrk/lts-$THIS_LTS_MAJOR_VER/constraints.yaml` and update the ghc-version. Then run `NOPLAN=1 /var/stackage/stackage/automated/build lts-$THIS_LTS_MINOR_BUMP` to build the LTS.
|
||||
If enountering an error like the following, this means that the [Stack metadata](https://github.com/commercialhaskell/stackage-content)
|
||||
has not yet been updated, so wait some time until this happens:
|
||||
|
||||
```
|
||||
This probably means a GHC bindist has not yet been added for OS key 'linux64', 'linux64-ncurses6', 'linux64-tinfo6'.
|
||||
Supported versions: ...
|
||||
update-global-hints.hs: Received ExitFailure 1 when running
|
||||
```
|
||||
|
||||
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
|
||||
@ -232,14 +239,14 @@ docker rm $(docker ps -a -q)
|
||||
docker rmi $(docker images -q)
|
||||
```
|
||||
|
||||
but `docker pull commercialhaskell/stackage:nightly` can also be run instead just to update the nightly image say.
|
||||
but `docker pull ghcr.io/commercialhaskell/stackage/build:nightly` can also be run instead just to update the nightly image say.
|
||||
|
||||
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:
|
||||
|
||||
```
|
||||
# for example
|
||||
SNAP_SERIES=nightly # or lts16
|
||||
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/
|
||||
```
|
||||
@ -274,7 +281,7 @@ You'll need to get your SSH public key added to the machine. ~/.ssh/config info:
|
||||
```
|
||||
Host stackage-build
|
||||
User curators
|
||||
Hostname build.stackage.org
|
||||
Hostname stackage-builder.haskell.org
|
||||
```
|
||||
|
||||
### Running the build script
|
||||
@ -301,20 +308,18 @@ info above).
|
||||
### 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.
|
||||
* If you are building the first release of a new LTS major version, create a new `lts-X.0/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.
|
||||
|
||||
First run `build.sh` to regenerate updated `ltsXX/work/constraints.yaml` and `ltsXX/work/snapshot-incomplete.yaml` files.
|
||||
|
||||
For an LTS minor bump, you'll typically want to:
|
||||
|
||||
* Add constraints to package `range:` fields _under_ the `source:` field in that `constraints.yaml`.
|
||||
* Add constraints to package `range:` fields _under_ the `source:` field in that `constraints.yaml` (should not be necessary normally to edit `snapshot-incomplete.yaml` to change the version used for that package).
|
||||
* 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
|
||||
version bound to avoid that version or something else. It's difficult to give
|
||||
@ -326,10 +331,13 @@ build plan, you can set the environment variable `NOPLAN=1`. This is
|
||||
useful for such cases as an intermittent test failure, out of memory
|
||||
condition, or manually tweaking the plan file. (When using `NOPLAN=1`,
|
||||
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,
|
||||
one can edit `snapshot-incomplete.yaml`
|
||||
(the SHA256 hash of the .cabal file will get updated),
|
||||
to avoid having to rebuild everything again.)
|
||||
|
||||
_Sadly no longer true currently_: ~~Note LTS builds inherit the current Hackage data (stack updated for Nightly) to avoid excess extra rebuilding.~~
|
||||
Note LTS builds without NOPLAN will use the latest Hackage data.
|
||||
|
||||
If you need to make further modifications beyond what `constraints.yaml` allows, you can directly edit the `snapshot-incomplete.yaml` file. Then, instead of `NOPLAN=1 build.sh`, you need to use `NOPLAN=2 build.sh`. Note that from this point on, further changes to `constraints.yaml` will not impact the build plan.
|
||||
|
||||
### Timing
|
||||
|
||||
@ -338,15 +346,19 @@ with `sleep 30m` interleaved. It only publishes the nightly once per
|
||||
day. This way new package versions or build failures can be caught
|
||||
early and hopefully the nightlies will be timely.
|
||||
|
||||
LTS minor bumps typically are run on Sundays.
|
||||
LTS minor bumps are typically run on weekends. It can be a good idea
|
||||
to start the build on friday or saturday to have enough time to
|
||||
resolve any issues before the next curator shift the coming monday.
|
||||
|
||||
### 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.
|
||||
* If you see that `/var/stackage/` is out of space, you can:
|
||||
* run `./etc/diskspace/clean-old-stack-libs.sh [nightly|lts-XX]` (hopefully sufficient)
|
||||
* run `./etc/diskspace/remove-old-stack-work-libs.hs [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?):
|
||||
optionally:
|
||||
* `rm -r /var/stackage/stackage/automated/work/lts*/unpack-dir/unpacked/`
|
||||
* `rm -r /var/stackage/stackage/automated/work/nightly/unpack-dir/unpacked/`
|
||||
|
||||
@ -406,12 +418,160 @@ errors for builds, tests and benchmarks.
|
||||
|
||||
[tell-me-when-its-released]: https://github.com/commercialhaskell/stackage/blob/master/CURATORS.md#waiting-for-new-releases
|
||||
|
||||
### Large scale enabling/disabling of packages
|
||||
|
||||
`etc/commenter` is a binary that automates `build-constraints.yaml` workflows.
|
||||
|
||||
#### Setup
|
||||
This is currently a rust program, You can install the rust toolchain
|
||||
by using [rustup](https://rustup.rs/).
|
||||
|
||||
#### Example usage
|
||||
|
||||
After disabling a few packages you get this curator output:
|
||||
|
||||
```
|
||||
ConfigFile (GHC 9 bounds issues, @maintainer) (not present) depended on by:
|
||||
- [ ] xdg-desktop-entry-0.1.1.1 (-any). @maintainer. Used by: library
|
||||
|
||||
|
||||
pipes-misc (GHC 9 bounds issues, @maintainer) (not present) depended on by:
|
||||
- [ ] pipes-fluid-0.6.0.1 (>=0.5). @handles. Used by: test-suite
|
||||
|
||||
|
||||
testing-feat (GHC 9 bounds issues, Grandfathered dependencies) (not present) depended on by:
|
||||
- [ ] dual-tree-0.2.3.0 (-any). Grandfathered dependencies. @handles. Used by: test-suite
|
||||
```
|
||||
|
||||
Now run:
|
||||
```
|
||||
./check 2>&1 >/dev/null | ./commenter add
|
||||
```
|
||||
|
||||
You will get this output:
|
||||
```
|
||||
[INFO] ...
|
||||
LIBS + EXES
|
||||
|
||||
- xdg-desktop-entry < 0 # tried xdg-desktop-entry-0.1.1.1, but its *library* requires the disabled package: ConfigFile
|
||||
|
||||
TESTS
|
||||
|
||||
- dual-tree # tried dual-tree-0.2.3.0, but its *test-suite* requires the disabled package: testing-feat
|
||||
- pipes-fluid # tried pipes-fluid-0.6.0.1, but its *test-suite* requires the disabled package: pipes-misc
|
||||
|
||||
Adding 1 libs, 2 tests, 0 benches to build-constraints.yaml
|
||||
```
|
||||
|
||||
These bounds are added to build-constraints.yaml automatically.
|
||||
|
||||
Re-run this command until no more packages are disabled.
|
||||
|
||||
#### Re-enabling
|
||||
|
||||
We can periodically remove all packages under the bounds sections and then re-run the disabling flow above until we get a clean plan. This will automatically pick up packages that have been fixed.
|
||||
|
||||
```
|
||||
./commenter clear
|
||||
./check 2>&1 >/dev/null | ./commenter add
|
||||
```
|
||||
|
||||
Repeat the second command until no updates are made to build-constraints.yaml (or use `commenter add-loop` instead).
|
||||
|
||||
#### Checking for new releases
|
||||
|
||||
Run `stack update` before doing this.
|
||||
|
||||
`./commenter outdated` looks through all bounds issues and library
|
||||
compilation failures and compares the marked version with the latest hackage release. Example output is
|
||||
|
||||
```
|
||||
Fin mismatch, manual: 0.2.8.0, hackage: 0.2.9.0
|
||||
aeson mismatch, auto: 1.5.6.0, hackage: 2.0.2.0
|
||||
```
|
||||
|
||||
where "manual" means the bound was added manually by a curator,
|
||||
perhaps due to a compilation failure so we could try re-enabling the
|
||||
package. "auto" means it's part of the sections generated by
|
||||
`./commenter`, to update that run the `Re-enabling` step as documented
|
||||
above.
|
||||
|
||||
`outdated` only finds packages that are in the auto generated
|
||||
sections, or that are of the form `- package < 0 # $version`.
|
||||
|
||||
#### Notes
|
||||
|
||||
* Please make sure to separate bounds issues from compilation failures/test run failures, as we cannot verify that a package builds or that tests pass without running the build!
|
||||
|
||||
#### Diffing snapshots / Inspecting changes
|
||||
|
||||
To diff existing snapshots, or to evaluate changes before they end up
|
||||
in a snapshot you can run:
|
||||
|
||||
```
|
||||
./commenter diff-snapshot <old-snapshot.yaml> <new-snapshot.yaml>
|
||||
```
|
||||
|
||||
Existing snapshots can be retrieved from https://github.com/commercialhaskell/stackage-snapshots. Preliminary snapshots can be generated by running relevant parts of `automated/build.sh`, at the time of writing:
|
||||
|
||||
```
|
||||
TARGET=nightly-2021-01-14 \ # the date doesn't matter
|
||||
curator update && \
|
||||
curator constraints --target $TARGET && \
|
||||
curator snapshot-incomplete --target $TARGET && \
|
||||
curator snapshot
|
||||
```
|
||||
|
||||
#### Pinging maintainers after disabling packages
|
||||
|
||||
After lifting a bound We often have to disable additional packages due
|
||||
to compilation failures. `affected` figures out which packages have
|
||||
been disabled and which maintainers are affected. Note that this does
|
||||
not handle disabled test suites and benchmarks as the snapshots don't
|
||||
contain this information.
|
||||
|
||||
```
|
||||
./commenter affected <old-snapshot.yaml> <new-snapshot.yaml>
|
||||
```
|
||||
|
||||
E.g.:
|
||||
```
|
||||
$ commenter affected ../stackage-snapshots/nightly/2022/1/2.yaml ../stackage-snapshots/nightly/2022/2/7.yaml
|
||||
```
|
||||
```
|
||||
alg-0.2.13.1: Matthew Farkas-Dyck <strake888@gmail.com> @strake
|
||||
butter-0.1.0.6: Matthew Ahrens <matt.p.ahrens@gmail.com> @mpahrens
|
||||
category-0.2.5.0: Matthew Farkas-Dyck <strake888@gmail.com> @strake
|
||||
constraint-0.1.4.0: Matthew Farkas-Dyck <strake888@gmail.com> @strake
|
||||
dl-fedora-0.9.2: Jens Petersen <juhpetersen@gmail.com> @juhp
|
||||
foldable1-0.1.0.0: Matthew Farkas-Dyck <strake888@gmail.com> @strake
|
||||
gitlab-haskell-0.3.2.0: Rob Stewart <robstewart57@gmail.com> @robstewart57
|
||||
hslua-module-doclayout-1.0.0: Albert Krewinkel <albert+stackage@zeitkraut.de> @tarleb
|
||||
util-0.1.17.1: Matthew Farkas-Dyck <strake888@gmail.com> @strake
|
||||
wai-middleware-auth-0.2.5.1: Alexey Kuleshevich <lehins@yandex.ru> @lehins
|
||||
yesod-csp-0.2.5.0: Bob Long <robertjflong@gmail.com> @bobjflong
|
||||
```
|
||||
|
||||
#### Finding disabled packages with lots of dependents
|
||||
|
||||
`./commenter disabled` prints the number of transitive dependents a disabled package has. Low hanging fruit to get a lot of packages included again.
|
||||
|
||||
Example output:
|
||||
```
|
||||
[...]
|
||||
stringable is disabled with 10 dependents
|
||||
llvm-hs is disabled with 12 dependents
|
||||
th-data-compat is disabled with 12 dependents
|
||||
amazonka-core is disabled with 96 dependents
|
||||
gogol-core is disabled with 96 dependents
|
||||
```
|
||||
|
||||
## Adding new curators
|
||||
|
||||
1. Add public ssh key to `~/.ssh/authorized_keys` on build server
|
||||
2. Add to commercialhaskell/stackage project.
|
||||
|
||||
## Dealing with a new GHC release
|
||||
## Dealing with a new GHC major release
|
||||
|
||||
As mentioned in the [GHC upgrade note], the major impact of a new GHC release
|
||||
is on the packages that are causing upper bounds to be put in place. In order
|
||||
@ -426,9 +586,6 @@ will upgrade their packages to allow for the new GHC release.
|
||||
We prefer to prune packages causing upper bounds constraints **after** the LTS
|
||||
release to allow the maximum amount of packages to get into the newest LTS.
|
||||
|
||||
You will almost always need to update the Win32 package version listed in the
|
||||
build-constraints.yaml file.
|
||||
|
||||
After the first LTS release, the package pruning process may begin in the
|
||||
nightly build in order to move forward with getting the latest versions of
|
||||
packages compatible with the new GHC release.
|
||||
@ -447,8 +604,7 @@ Every 3-6 months, we make a new major release of LTS. The procedure we follow fo
|
||||
relaxed upper bounds. There will likely be some hard decisions to be made
|
||||
regarding relaxing a bound versus keeping more packages. All of these changes
|
||||
occur on master and affect nightly.
|
||||
4. Once the estimated date hits, push a new `lts-XX` branch and trigger Docker
|
||||
Hub to build a Docker image for the new release.
|
||||
4. Once the estimated date hits, push a new `ltsXX` and wait for the docker image build.
|
||||
5. Run the build procedure for the new LTS release.
|
||||
6. After the LTS build completes, more aggressively prune upper bounds from
|
||||
`build-constraints.yaml`.
|
||||
|
||||
13
DATA-FLOW.md
13
DATA-FLOW.md
@ -20,7 +20,7 @@ There are three inputs into the data flow:
|
||||
packages to the Stackage package set. This also defines upper bounds, skipped
|
||||
tests, and a few other pieces of metadata.
|
||||
|
||||
* [stackage-content](https://github.com/fpco/stackage-content) is a Github
|
||||
* [stackage-content](https://github.com/commercialhaskell/stackage-content) is a Github
|
||||
repository containing static file content served from stackage.org
|
||||
|
||||
## Travis
|
||||
@ -57,10 +57,10 @@ each of the above builds every 30 minutes.
|
||||
## stackage-curator
|
||||
|
||||
The heart of running Stackage builds is the
|
||||
[stackage-curator](https://github.com/fpco/stackage-curator) tool. We run this
|
||||
[stackage-curator](https://github.com/commercialhaskell/curator) tool. We run this
|
||||
on a daily basis on the Stackage build server for Stackage Nightly, and on a
|
||||
weekly basis for LTS Haskell. The build process is [highly
|
||||
automated](https://github.com/commercialhaskell/stackage/blob/master/automated/build.sh) and
|
||||
weekly basis for LTS Haskell. The build process is
|
||||
[automated](https://github.com/commercialhaskell/stackage/blob/master/automated/build.sh) and
|
||||
leverages Docker quite a bit.
|
||||
|
||||
stackage-curator needs to know about the most recent versions of all packages,
|
||||
@ -88,9 +88,8 @@ Once a valid build plan is found, stackage-curator will build all packages,
|
||||
build docs, and run test suites. Assuming that all succeeds, it generates some
|
||||
artifacts:
|
||||
|
||||
* Uploads the build plan as a YAML file to either
|
||||
[stackage-nightly](https://github.com/fpco/stackage-nightly) or
|
||||
[lts-haskell](https://github.com/fpco/lts-haskell)
|
||||
* Uploads the build plan as a YAML file to
|
||||
[stackage-snapshots](https://github.com/commercialhaskell/stackage-snapshots)
|
||||
* Uploads the generated Haddock docs and a package index (containing all used
|
||||
.cabal files) to haddock.stackage.org.
|
||||
|
||||
|
||||
18
Dockerfile
18
Dockerfile
@ -1,15 +1,19 @@
|
||||
FROM fpco/pid1:18.04
|
||||
FROM fpco/pid1:22.04
|
||||
|
||||
ENV HOME /home/stackage
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV GHCVER 8.10.2
|
||||
|
||||
# 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
|
||||
ENV CUDA_PATH /usr/local/cuda-10.0
|
||||
ADD docker/01-build-server.sh /tmp/01-build-server.sh
|
||||
RUN /tmp/01-build-server.sh && rm /tmp/01-build-server.sh
|
||||
|
||||
ADD debian-bootstrap.sh /tmp/debian-bootstrap.sh
|
||||
RUN /tmp/debian-bootstrap.sh && rm /tmp/debian-bootstrap.sh
|
||||
ADD docker/02-apt-get-install.sh /tmp/02-apt-get-install.sh
|
||||
RUN /tmp/02-apt-get-install.sh && rm /tmp/02-apt-get-install.sh
|
||||
|
||||
ADD docker/03-custom-install.sh /tmp/03-custom-install.sh
|
||||
RUN /tmp/03-custom-install.sh && rm /tmp/03-custom-install.sh
|
||||
|
||||
ADD docker/04-cleanup.sh /tmp/04-cleanup.sh
|
||||
RUN /tmp/04-cleanup.sh && rm /tmp/04-cleanup.sh
|
||||
|
||||
# Include file path
|
||||
ENV CPATH /usr/lib/jvm/java-8-openjdk-amd64/include:/usr/lib/jvm/java-8-openjdk-amd64/include/linux:/usr/lib/llvm-3.7/include
|
||||
|
||||
110
MAINTAINERS.md
110
MAINTAINERS.md
@ -10,15 +10,18 @@ Packages in Stackage are not patched: all package changes occur upstream in Hack
|
||||
|
||||
## Adding a package
|
||||
|
||||
Anyone can add any package to Stackage but you may only add packages under your own name. It's highly encouraged that the actual package maintainer is also the Stackage maintainer, if that is not the case you should drop the package maintainer a note first.
|
||||
Anyone can add any package to Stackage but you should talk to the upstream maintainer before putting another person's package under your own name.
|
||||
It's generally better the actual package maintainer is also the Stackage maintainer, if that is not the case you should write the package maintainer a note first, eg by opening an upstream issue or sending them an email.
|
||||
|
||||
To add your package you can edit [`build-constraints.yaml`](https://github.com/fpco/stackage/blob/master/build-constraints.yaml) directly on github or fork the project. There's a section called `packages` where you would add yourself and your packages:
|
||||
To add your package you can edit [`build-constraints.yaml`](https://github.com/commercialhaskell/stackage/blob/master/build-constraints.yaml) directly on github or fork the project. There's a section called `packages` where you would add yourself and your packages:
|
||||
|
||||
"My Name <myemail@example.com> @mygithubuser":
|
||||
- package1
|
||||
- package2
|
||||
- package3
|
||||
|
||||
(If you are adding yourself for the first time, you can add yourself anywhere under the `packages:` section, it does not have to be at the end: this actually helps to avoid merge conflicts between new contributions.)
|
||||
|
||||
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
|
||||
@ -26,23 +29,15 @@ 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.
|
||||
|
||||
If your library depends on a C library, please add it to the `debian-bootstrap.sh` script.
|
||||
If your package depends on a C library, please add it to `docker/02-apt-get-install.sh` or `docker/03-custom-install.sh`.
|
||||
|
||||
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
|
||||
# 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:
|
||||
@ -50,26 +45,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
|
||||
@ -91,6 +71,14 @@ If the new version doesn't compile then the package author should upload a fixed
|
||||
|
||||
If a package's test suite is failing, the first job is to investigate why. If this is due to a bad interaction with versions of other packages in Stackage, then it is the responsibility of the maintainer to fix the test suite. In some situations, it is acceptable to not run the test suite.
|
||||
|
||||
## Moving or retiring maintainership of a Stackage package
|
||||
|
||||
If you no longer wish to be listed as maintainer of a package in Stackage,
|
||||
you can open a pull request to move it to a new maintainer or
|
||||
to either the "Grandfathered dependencies" or the "Abandoned packages" sections in `build-constraints.yaml`.
|
||||
Unless there is a compelling technical reason to remove the package,
|
||||
this is better than just dropping it from the distribution.
|
||||
|
||||
## Following dependency upgrades
|
||||
|
||||
If a new version of a dependency is released your package may fail to
|
||||
@ -128,6 +116,59 @@ remove that: Anyone is free to add a package to Stackage regardless of
|
||||
responsiveness guarantees. However, as stated above, we may elect to
|
||||
temporarily remove a package if it is not updated in a timely manner.
|
||||
|
||||
## Understanding stackage issues
|
||||
|
||||
### Bounds issues
|
||||
|
||||
These are the most common.
|
||||
|
||||
Using https://github.com/commercialhaskell/stackage/issues/6217 as an example.
|
||||
|
||||
Our convention is to title a PR after the package that is being held
|
||||
back from the nightly snapshot (here: aeson).
|
||||
|
||||
The issue body is templated and looks like this:
|
||||
|
||||
```
|
||||
aeson-2.0.0.0 ([changelog](http://hackage.haskell.org/package/aeson-2.0.0.0/changelog)) (MAINTAINER) is out of bounds for:
|
||||
- [ ] Agda-2.6.2 (>=1.1.2.0 && < 1.6). MAINTAINER. Used by: library
|
||||
- [ ] HsYAML-aeson-0.2.0.0 (>=1.4.0.0 && < 1.6). MAINTAINER. Used by: library
|
||||
- [ ] IPv6Addr-2.0.2 (>=0.8.0.2 && < 1.6). MAINTAINER. Used by: library
|
||||
[...]
|
||||
```
|
||||
|
||||
This (usually - see "Other issues") means that there was a new release of the package in the
|
||||
header (aeson). This is expected and the aeson maintainer is
|
||||
not expected to act. They are pinged to notify them that the
|
||||
latest version of their package will not be part of the nightly
|
||||
snapshots until the issue closed.
|
||||
|
||||
The list of packages with checkboxes denote the packages that prevent
|
||||
us from using the latest version of aeson, the first version number is
|
||||
the current version of that package in nightly (e.g. Agda 2.6.2). The
|
||||
constraint in parenthesis `(>=1.1.2.0 && < 1.6)` is Agda's current
|
||||
bound on `aeson`. To check this box we expect there to be an update
|
||||
of Agda to support aeson 2.0.0.0.
|
||||
|
||||
Once all boxes are checked we should be able to close the issue and
|
||||
upgrade aeson.
|
||||
|
||||
### Other issues
|
||||
|
||||
Other common types of issues are
|
||||
* Packages with failing tests, haddocks, or benchmarks (note that we only *compile* benchmarks)
|
||||
+ Maintainers may choose to update these parts of their package, or
|
||||
to exclude them from the stackage build (e.g. adding a package to
|
||||
`skipped-tests`)
|
||||
* New releases of packages that depend on packages that are not a part
|
||||
of stackage. This is denoted as `not present`
|
||||
+ Maintainers are encouraged to ask the maintainer of these packages
|
||||
to join stackage, or to be the stackage contact person themselves.
|
||||
* A new release of a package with stricter upper bounds than its previous version
|
||||
+ This will look like a normal bounds issue, and should be treated
|
||||
the same way by maintainers. Curators usually resolve this by
|
||||
adding an upper bound to that package instead of its dependency.
|
||||
|
||||
## Delays
|
||||
|
||||
Maintainers are humans, humans get sick/have babies/go on
|
||||
@ -173,13 +214,12 @@ 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 the current LTS Haskell
|
||||
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 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)
|
||||
* Provide a list of packages you would like added
|
||||
* If relevant, mention any upper bounds that are needed on those packages
|
||||
* Fork [lts-haskell repo](https://github.com/commercialhaskell/lts-haskell/) if you haven't already
|
||||
* Open up a pull request on the [lts-haskell repo](https://github.com/commercialhaskell/lts-haskell/compare) for the appropriate `build-constraints/lts-*-build-constraints.yaml`
|
||||
* 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.
|
||||
@ -206,7 +246,7 @@ purely on Stackage Curator discretion. The most common examples are:
|
||||
would not be a breaking change, and curators may elect to include
|
||||
it. Note though that curators and their tooling will not know your
|
||||
package is following SemVer, so in this case you would have to open
|
||||
an issue on the [lts-haskell repo](https://github.com/fpco/lts-haskell/issues/new).
|
||||
an issue on the [lts-haskell repo](https://github.com/commercialhaskell/lts-haskell/issues/new).
|
||||
|
||||
* If a package has overly restrictive version bounds on a
|
||||
dependency, in particular constraining a minor version
|
||||
|
||||
55
README.md
55
README.md
@ -1,16 +1,15 @@
|
||||
stackage
|
||||
========
|
||||
[](https://github.com/commercialhaskell/stackage/actions/workflows/check.yml)
|
||||
|
||||
[](https://travis-ci.org/commercialhaskell/stackage)
|
||||
[](https://gitter.im/commercialhaskell/stackage?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
Stable sets of Haskell Packages from Hackage
|
||||
|
||||
_This repository is for package authors and maintainers to get their packages into Stackage._
|
||||
|
||||
"Stable Hackage": creating a vetted set of 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
|
||||
----------------
|
||||
@ -25,7 +24,7 @@ We welcome all packages, provided:
|
||||
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 +35,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) 
|
||||
* [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 +77,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:
|
||||
@ -127,9 +127,9 @@ 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
|
||||
pushed to stackage.org (and the metadata to the stackage-snapshots github repo)
|
||||
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
|
||||
@ -137,5 +137,6 @@ 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.
|
||||
Please ask on the #stackage channel on the
|
||||
[Haskell Foundation Slack](https://join.slack.com/t/haskell-foundation/shared_invite/zt-mjh76fw0-CEjg2NbyVE8rVQDvR~0F4A)
|
||||
or open an issue or comment on the PR which uploads the package.
|
||||
|
||||
@ -19,7 +19,8 @@ else
|
||||
WORKDIR=$ROOT/work/$TAG
|
||||
fi
|
||||
|
||||
IMAGE=commercialhaskell/stackage:$TAG
|
||||
#IMAGE=commercialhaskell/stackage:$TAG
|
||||
IMAGE=ghcr.io/commercialhaskell/stackage/build:$TAG
|
||||
|
||||
PANTRY_DIR=$ROOT/work/stack/pantry
|
||||
STACK_DIR=$ROOT/work/stack
|
||||
@ -63,13 +64,15 @@ BINDIR=$(cd $ROOT/work/bin ; pwd)
|
||||
cd $BINDIR
|
||||
rm -f curator stack *.bz2
|
||||
|
||||
curl -L "https://download.fpcomplete.com/stackage-curator-2/curator-7c719d6d48839c94a79dc2ad2ace89074e3dd997.bz2" | bunzip2 > curator
|
||||
curl -L "https://github.com/commercialhaskell/curator/releases/download/commit-558215d639561301a0069dc749896ad3e71b5c24/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.3.3/stack-2.3.3-linux-x86_64-bin > stack
|
||||
#curl -L "https://download.fpcomplete.com/stackage-curator-2/stack-fffc0a40e2253788f6b9cb7471c03fd571d69bde.bz2" | bunzip2 > stack
|
||||
STACK_VERSION=2.13.1
|
||||
# rc url
|
||||
#curl -L https://github.com/commercialhaskell/stack/releases/download/rc%2Fv${STACK_VERSION}/stack-${STACK_VERSION}-linux-x86_64-bin > stack
|
||||
curl -L https://github.com/commercialhaskell/stack/releases/download/v${STACK_VERSION}/stack-${STACK_VERSION}-linux-x86_64-bin > stack
|
||||
chmod +x stack
|
||||
echo -n "stack version: "
|
||||
docker run --rm -v $(pwd)/stack:/exe $IMAGE /exe --version
|
||||
@ -99,16 +102,17 @@ fi
|
||||
#
|
||||
# * Update the package index (unless LTS)
|
||||
# * Create a new plan
|
||||
if [ "${NOPLAN:-}x" = "x" ]
|
||||
if [ "${NOPLAN:-}x" = "1x" ]
|
||||
then
|
||||
if [ $SHORTNAME = "lts" ]
|
||||
then
|
||||
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 "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"
|
||||
elif [ "${NOPLAN:-}x" = "2x" ]
|
||||
then
|
||||
docker run $ARGS_PREBUILD $IMAGE curator snapshot
|
||||
elif [ $SHORTNAME = "lts" ]
|
||||
then
|
||||
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 "curator update && curator constraints --target $TARGET && curator snapshot-incomplete --target $TARGET && curator snapshot"
|
||||
fi
|
||||
|
||||
|
||||
@ -119,10 +123,15 @@ fi
|
||||
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 ;;
|
||||
nightly) JOBS=2 ;;
|
||||
lts) JOBS=16 ;;
|
||||
nightly) JOBS=16 ;;
|
||||
esac
|
||||
|
||||
if [ -e "$SHORTNAME-build.log" ]
|
||||
then
|
||||
cp -p $SHORTNAME-build.log $SHORTNAME-build.log-previous
|
||||
fi
|
||||
|
||||
# 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
|
||||
@ -141,8 +150,8 @@ docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec curator check-target-available
|
||||
# * 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"
|
||||
# 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
|
||||
|
||||
|
||||
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"]
|
||||
3
automated/dockerfiles/lts-17.10/Dockerfile
Normal file
3
automated/dockerfiles/lts-17.10/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM $DOCKER_REPO:lts-17.9
|
||||
ARG STACK_VERSION=2.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'
|
||||
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"]
|
||||
90
automated/dockerfiles/lts-18.0/Dockerfile
Normal file
90
automated/dockerfiles/lts-18.0/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.10.4
|
||||
ARG LTS_SLUG=lts-18.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.7.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=b91382f2ff1f2775f4aa9d42c9a6b06b33e5904d
|
||||
|
||||
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=9.0.1$/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-18.27/Dockerfile
Normal file
3
automated/dockerfiles/lts-18.27/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM $DOCKER_REPO:lts-18.26
|
||||
ARG STACK_VERSION=2.7.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'
|
||||
90
automated/dockerfiles/lts-18.7/Dockerfile
Normal file
90
automated/dockerfiles/lts-18.7/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.10.6
|
||||
ARG LTS_SLUG=lts-18.6
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.7.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=b1d40e112040a7f44eff47a9fafb6937f5d02dff
|
||||
|
||||
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=9.0.1$/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-18.9/Dockerfile
Normal file
90
automated/dockerfiles/lts-18.9/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.10.7
|
||||
ARG LTS_SLUG=lts-18.9
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.7.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=b1d40e112040a7f44eff47a9fafb6937f5d02dff
|
||||
|
||||
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=9.0.1$/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-19.0/Dockerfile
Normal file
90
automated/dockerfiles/lts-19.0/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=9.0.2
|
||||
ARG LTS_SLUG=lts-19.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.7.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-9
|
||||
ARG BOOTSTRAP_COMMIT=70317ea1c42e6caae625059980575157cf9525ed
|
||||
|
||||
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=9.0.1$/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-20.0/Dockerfile
Normal file
90
automated/dockerfiles/lts-20.0/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=9.2.5
|
||||
ARG LTS_SLUG=lts-20.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.9.1
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-9
|
||||
ARG BOOTSTRAP_COMMIT=80f68bd733963b71c09b1e8ef6c19bf5b3347245
|
||||
|
||||
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=9.0.1$/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-21.0/Dockerfile
Normal file
90
automated/dockerfiles/lts-21.0/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=9.4.5
|
||||
ARG LTS_SLUG=lts-21.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.11.1
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-9
|
||||
ARG BOOTSTRAP_COMMIT=56d27e1cfead1a37ff55942a9d2f14c0733459c9
|
||||
|
||||
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=9.0.1$/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-21.12/Dockerfile
Normal file
90
automated/dockerfiles/lts-21.12/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=9.4.7
|
||||
ARG LTS_SLUG=lts-21.12
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.11.1
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-9
|
||||
ARG BOOTSTRAP_COMMIT=56d27e1cfead1a37ff55942a9d2f14c0733459c9
|
||||
|
||||
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 docker/*.sh scripts to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running docker/*.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/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/01-build-server.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/02-apt-get-install.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/03-custom-install.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/04-cleanup.sh | sed "s/^GHCVER=9.0.1$/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-21.22/Dockerfile
Normal file
90
automated/dockerfiles/lts-21.22/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=9.4.8
|
||||
ARG LTS_SLUG=lts-21.22
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.11.1
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-9
|
||||
ARG BOOTSTRAP_COMMIT=56d27e1cfead1a37ff55942a9d2f14c0733459c9
|
||||
|
||||
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 docker/*.sh scripts to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running docker/*.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/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/01-build-server.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/02-apt-get-install.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/03-custom-install.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/04-cleanup.sh | sed "s/^GHCVER=9.0.1$/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-21.6/Dockerfile
Normal file
90
automated/dockerfiles/lts-21.6/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=9.4.5
|
||||
ARG LTS_SLUG=lts-21.6
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.11.1
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-9
|
||||
ARG BOOTSTRAP_COMMIT=56d27e1cfead1a37ff55942a9d2f14c0733459c9
|
||||
|
||||
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 docker/*.sh scripts to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running docker/*.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/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/01-build-server.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/02-apt-get-install.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/03-custom-install.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/04-cleanup.sh | sed "s/^GHCVER=9.0.1$/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-21.7/Dockerfile
Normal file
90
automated/dockerfiles/lts-21.7/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=9.4.6
|
||||
ARG LTS_SLUG=lts-21.7
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.11.1
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-9
|
||||
ARG BOOTSTRAP_COMMIT=56d27e1cfead1a37ff55942a9d2f14c0733459c9
|
||||
|
||||
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 docker/*.sh scripts to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running docker/*.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/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/01-build-server.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/02-apt-get-install.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/03-custom-install.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/04-cleanup.sh | sed "s/^GHCVER=9.0.1$/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-22.0/Dockerfile
Normal file
90
automated/dockerfiles/lts-22.0/Dockerfile
Normal file
@ -0,0 +1,90 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=9.6.3
|
||||
ARG LTS_SLUG=lts-22.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.11.1
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-9
|
||||
ARG BOOTSTRAP_COMMIT=56d27e1cfead1a37ff55942a9d2f14c0733459c9
|
||||
|
||||
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 docker/*.sh scripts to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running docker/*.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/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/01-build-server.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/02-apt-get-install.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/03-custom-install.sh https://raw.githubusercontent.com/commercialhaskell/stackage/$BOOTSTRAP_COMMIT/docker/04-cleanup.sh | sed "s/^GHCVER=9.0.1$/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,6 +3,7 @@
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
while true; do
|
||||
git pull
|
||||
./build.sh nightly-$(date -u +%F)
|
||||
date
|
||||
|
||||
|
||||
@ -28,14 +28,14 @@ github.
|
||||
We also have a curator slack channel where we help each other out.
|
||||
|
||||
The current curator team consists of:
|
||||
* Adam Bergmark
|
||||
* Dan Burton
|
||||
* Jens Petersen
|
||||
* Luke Murphy
|
||||
* Michael Snoyman
|
||||
|
||||
We onboarded Luke as the newest member a few months ago and this
|
||||
helped us iron out and document the process further.
|
||||
* Adam Bergmark (@bergmark)
|
||||
* Alexey Zabelin (@alexeyzab)
|
||||
* Andreas Ländle (@alaendle)
|
||||
* Chris Dornan (@cdornan)
|
||||
* Dan Burton (@danburton)
|
||||
* Jens Petersen (@juhp)
|
||||
* Joe Kachmar (@jkachmar)
|
||||
* Mihai Maruseac (@mihaimaruseac)
|
||||
|
||||
You can read the curator documentation here: https://github.com/commercialhaskell/stackage/blob/master/CURATORS.md
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
9
commenter
Executable file
9
commenter
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if ! command -v commenter &> /dev/null
|
||||
then
|
||||
echo "commenter is not installed, get it from https://github.com/bergmark/commenter"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
commenter $@
|
||||
@ -1,342 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Work in progress: create a list of commands necessary to get Stackage
|
||||
# up-and-running on a freshly installed Debian-based system (including Ubuntu).
|
||||
|
||||
# Quick start:
|
||||
# wget -O - https://raw.github.com/commercialhaskell/stackage/master/debian-bootstrap.sh | bash -ex
|
||||
|
||||
# NOTE: Requires that GHC and Cabal are installed and on your PATH. For
|
||||
# instructions, see:
|
||||
# http://www.stackage.org/install
|
||||
|
||||
set -exuo pipefail
|
||||
|
||||
mkdir -p /home/stackage
|
||||
|
||||
export LANG=C.UTF-8
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Get curl and unzip
|
||||
apt-get update
|
||||
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
|
||||
stack setup --resolver ghc-$GHCVER
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y \
|
||||
apt-transport-https \
|
||||
build-essential \
|
||||
cmake \
|
||||
curl \
|
||||
dvipng \
|
||||
freeglut3-dev \
|
||||
freetds-dev \
|
||||
fsharp \
|
||||
g++ \
|
||||
gawk \
|
||||
git \
|
||||
gnupg \
|
||||
gradle \
|
||||
hscolour \
|
||||
libadns1-dev \
|
||||
libaio1 \
|
||||
libalut-dev \
|
||||
libasound2-dev \
|
||||
libblas-dev \
|
||||
libbz2-dev \
|
||||
libcairo2-dev \
|
||||
libclang-3.9-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libcwiid-dev \
|
||||
libdbusmenu-glib-dev \
|
||||
libdbusmenu-gtk3-dev \
|
||||
libdevil-dev \
|
||||
libedit-dev \
|
||||
libedit2 \
|
||||
libfftw3-dev \
|
||||
libflac-dev \
|
||||
libfreenect-dev \
|
||||
libgd-dev \
|
||||
libgeoip-dev \
|
||||
libgirepository1.0-dev \
|
||||
libglfw3-dev \
|
||||
libglib2.0-dev \
|
||||
libglu1-mesa-dev \
|
||||
libgmp3-dev \
|
||||
libgnutls28-dev \
|
||||
libgraphene-1.0-dev \
|
||||
libgsasl7-dev \
|
||||
libgsl-dev \
|
||||
libgtk-3-dev \
|
||||
libgtk2.0-dev \
|
||||
libgtksourceview-3.0-dev \
|
||||
libhidapi-dev \
|
||||
libi2c-dev \
|
||||
libicu-dev \
|
||||
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 \
|
||||
libmagickwand-dev \
|
||||
libmarkdown2-dev \
|
||||
libmono-2.0-dev \
|
||||
libmp3lame-dev \
|
||||
libmpfr-dev \
|
||||
libmpich-dev \
|
||||
libmysqlclient-dev \
|
||||
libncurses5-dev \
|
||||
libnfc-dev \
|
||||
liboath-dev \
|
||||
libnotify-dev \
|
||||
libopenal-dev \
|
||||
libpango1.0-dev \
|
||||
libpcap0.8-dev \
|
||||
libpcre2-dev \
|
||||
libpq-dev \
|
||||
libprotobuf-dev \
|
||||
libre2-dev \
|
||||
librocksdb-dev \
|
||||
libsdl1.2-dev \
|
||||
libsdl2-dev \
|
||||
libsdl2-gfx-dev \
|
||||
libsdl2-image-dev \
|
||||
libsdl2-mixer-dev \
|
||||
libsdl2-ttf-dev \
|
||||
libsecp256k1-dev \
|
||||
libsnappy-dev \
|
||||
libsndfile1-dev \
|
||||
libsodium-dev \
|
||||
libsox-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libtagc0-dev \
|
||||
libtre-dev \
|
||||
libudev-dev \
|
||||
libusb-1.0-0-dev \
|
||||
libvte-2.91-dev \
|
||||
libwebkitgtk-3.0-dev \
|
||||
libxau-dev \
|
||||
libxml2-dev \
|
||||
libxrandr-dev \
|
||||
libxss-dev \
|
||||
libyaml-dev \
|
||||
libzip-dev \
|
||||
libzstd-dev \
|
||||
libzmq3-dev \
|
||||
llvm-7 \
|
||||
llvm-8 \
|
||||
llvm-9 \
|
||||
locales \
|
||||
m4 \
|
||||
minisat \
|
||||
mono-mcs \
|
||||
nettle-dev \
|
||||
ninja-build \
|
||||
openjdk-8-jdk \
|
||||
python-mpltoolkits.basemap \
|
||||
python3-matplotlib \
|
||||
python3-numpy \
|
||||
python3-pip \
|
||||
python3-scipy \
|
||||
r-base \
|
||||
r-base-dev \
|
||||
rpm \
|
||||
ruby-dev \
|
||||
software-properties-common \
|
||||
sudo \
|
||||
texlive \
|
||||
unixodbc-dev \
|
||||
wget \
|
||||
xclip \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh
|
||||
|
||||
# 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
|
||||
|
||||
# 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.
|
||||
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20
|
||||
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10
|
||||
|
||||
# GHC requires a specific LLVM version on the system PATH for its LLVM backend.
|
||||
# This version is tracked here:
|
||||
# https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM/Installing
|
||||
#
|
||||
# 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 -
|
||||
apt-get install -y nodejs
|
||||
|
||||
# install ocilib dependencies then build and install ocilib
|
||||
cd /tmp \
|
||||
&& wget https://storage.googleapis.com/oracle.fpinsight.com/instantClient/oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
|
||||
&& dpkg -i oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
|
||||
&& rm -f oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
|
||||
&& wget https://storage.googleapis.com/oracle.fpinsight.com/instantClient/oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
|
||||
&& dpkg -i oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
|
||||
&& rm -f oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
|
||||
&& wget https://github.com/vrogier/ocilib/archive/v4.3.2.tar.gz \
|
||||
&& tar xvf v4.3.2.tar.gz \
|
||||
&& cd /tmp/ocilib-4.3.2 \
|
||||
&& ./configure --with-oracle-import=linkage \
|
||||
--with-oracle-charset=ansi \
|
||||
--with-oracle-headers-path=/usr/include/oracle/12.1/client64 \
|
||||
--with-oracle-lib-path=/usr/lib/oracle/12.1/client64/lib \
|
||||
&& make \
|
||||
&& make install \
|
||||
&& cd \
|
||||
&& rm -rf /tmp/ocilib-4.3.2 \
|
||||
&& echo "/usr/local/lib" > /etc/ld.so.conf.d/usr-local.conf \
|
||||
&& echo "/usr/lib/oracle/12.1/client64/lib" > /etc/ld.so.conf.d/oracle-client.conf \
|
||||
&& ldconfig
|
||||
|
||||
# Add JDK to system paths.
|
||||
echo "/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/" > /etc/ld.so.conf.d/openjdk.conf \
|
||||
&& ldconfig
|
||||
|
||||
# Install erlang/otp platform and its dependencies
|
||||
ERLANG_DEB_FILE="esl-erlang_21.1-1~ubuntu~bionic_amd64.deb"
|
||||
pushd /tmp \
|
||||
&& 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
|
||||
|
||||
# Install the TensorFlow C API.
|
||||
curl https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.1.0.tar.gz > libtensorflow.tar.gz \
|
||||
&& sudo tar zxf libtensorflow.tar.gz -C /usr \
|
||||
&& rm libtensorflow.tar.gz \
|
||||
&& ldconfig
|
||||
|
||||
# NOTE: also update Dockerfile when cuda version changes
|
||||
# Install CUDA toolkit
|
||||
# The current version can be found at: https://developer.nvidia.com/cuda-downloads
|
||||
CUDA_PKG=10.0.130-1
|
||||
CUDA_VER=10.0
|
||||
CUDA_APT=10-0
|
||||
|
||||
pushd /tmp \
|
||||
&& wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_${CUDA_PKG}_amd64.deb \
|
||||
&& apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub \
|
||||
&& dpkg -i cuda-repo-ubuntu1804_${CUDA_PKG}_amd64.deb \
|
||||
&& apt-get update -qq \
|
||||
&& apt-get install -y cuda-drivers cuda-core-${CUDA_APT} cuda-cudart-dev-${CUDA_APT} cuda-cufft-dev-${CUDA_APT} cuda-cublas-dev-${CUDA_APT} cuda-cusparse-dev-${CUDA_APT} cuda-cusolver-dev-${CUDA_APT} \
|
||||
&& rm cuda-repo-ubuntu1804_${CUDA_PKG}_amd64.deb \
|
||||
&& export CUDA_PATH=/usr/local/cuda-${CUDA_VER} \
|
||||
&& export LD_LIBRARY_PATH=${CUDA_PATH}/nvvm/lib64:${LD_LIBRARY_PATH+x} \
|
||||
&& export LD_LIBRARY_PATH=${CUDA_PATH}/lib64:${LD_LIBRARY_PATH} \
|
||||
&& export PATH=${CUDA_PATH}/bin:${PATH} \
|
||||
&& popd
|
||||
|
||||
# non-free repo for mediabus-fdk-aac
|
||||
apt-add-repository multiverse \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y nvidia-cuda-dev
|
||||
|
||||
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
|
||||
PROTOC_ZIP=protoc-3.3.0-linux-x86_64.zip
|
||||
curl -OL https://github.com/google/protobuf/releases/download/v3.3.0/$PROTOC_ZIP
|
||||
sudo unzip -o $PROTOC_ZIP -d /usr bin/protoc
|
||||
rm -f $PROTOC_ZIP
|
||||
|
||||
# Update library search paths
|
||||
echo /usr/local/cuda-10.0/lib64 > /etc/ld.so.conf.d/cuda.conf
|
||||
echo /usr/local/cuda-10.0/nvvm/lib64 >> /etc/ld.so.conf.d/cuda.conf
|
||||
|
||||
echo /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server > /etc/ld.so.conf.d/java.conf
|
||||
|
||||
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.0
|
||||
(
|
||||
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
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
23
docker/01-build-server.sh
Executable file
23
docker/01-build-server.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This file contains setup needed for the build server to function at all.
|
||||
|
||||
set -exuo pipefail
|
||||
|
||||
mkdir -p /home/stackage
|
||||
|
||||
export LANG=C.UTF-8
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get update
|
||||
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 -q awscliv2.zip
|
||||
./aws/install --bin-dir /usr/bin
|
||||
)
|
||||
rm -rf /tmp/awscli
|
||||
162
docker/02-apt-get-install.sh
Executable file
162
docker/02-apt-get-install.sh
Executable file
@ -0,0 +1,162 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -exuo pipefail
|
||||
|
||||
export LANG=C.UTF-8
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# List of ubuntu packages needed to build stackage's haskell packages.
|
||||
#
|
||||
# If new packages are added here, please document why they are needed
|
||||
# e.g. "# for my-package"
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y \
|
||||
apt-transport-https \
|
||||
build-essential \
|
||||
cmake \
|
||||
coinor-libclp-dev \
|
||||
curl \
|
||||
dvipng \
|
||||
freeglut3-dev \
|
||||
freetds-dev \
|
||||
fsharp \
|
||||
g++ \
|
||||
gawk \
|
||||
git \
|
||||
gnupg \
|
||||
gradle \
|
||||
hscolour \
|
||||
libadns1-dev \
|
||||
libaio1 \
|
||||
libalut-dev \
|
||||
libasound2-dev \
|
||||
libblas-dev \
|
||||
libbrotli-dev \
|
||||
libbz2-dev \
|
||||
libcairo2-dev \
|
||||
libclang-12-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libcwiid-dev \
|
||||
libdbusmenu-glib-dev \
|
||||
libdbusmenu-gtk3-dev \
|
||||
libdevil-dev \
|
||||
libedit-dev \
|
||||
libedit2 \
|
||||
libfftw3-dev \
|
||||
libflac-dev \
|
||||
libfreenect-dev \
|
||||
libgd-dev \
|
||||
libgeoip-dev \
|
||||
libgirepository1.0-dev \
|
||||
libglew-dev \
|
||||
libglfw3-dev \
|
||||
libglib2.0-dev \
|
||||
libglpk-dev \
|
||||
libglu1-mesa-dev \
|
||||
libgmp3-dev \
|
||||
libgnutls28-dev \
|
||||
libgraphene-1.0-dev \
|
||||
libgsasl7-dev \
|
||||
libgsl-dev \
|
||||
libgtk-3-dev \
|
||||
libgtk-4-dev \
|
||||
libgtk2.0-dev \
|
||||
libgtksourceview-3.0-dev \
|
||||
libhidapi-dev \
|
||||
libi2c-dev \
|
||||
libicu-dev \
|
||||
libimlib2-dev \
|
||||
libjack-jackd2-dev \
|
||||
libjansson-dev \
|
||||
libjavascriptcoregtk-4.0-dev \
|
||||
libjudy-dev \
|
||||
liblapack-dev \
|
||||
libleveldb-dev \
|
||||
liblmdb-dev \
|
||||
liblz4-tool \
|
||||
liblzma-dev \
|
||||
libmagic-dev \
|
||||
libmagickcore-dev \
|
||||
libmagickwand-dev \
|
||||
libmarkdown2-dev \
|
||||
libmono-2.0-dev \
|
||||
libmp3lame-dev \
|
||||
libmpfr-dev \
|
||||
libmpich-dev \
|
||||
libmysqlclient-dev \
|
||||
libncurses5-dev \
|
||||
libnfc-dev \
|
||||
libnotify-dev \
|
||||
liboath-dev \
|
||||
libopenal-dev \
|
||||
libpango1.0-dev \
|
||||
libpcap0.8-dev \
|
||||
libpcre2-dev \
|
||||
libpq-dev \
|
||||
libprimecount-dev \
|
||||
libprotobuf-dev \
|
||||
libre2-dev \
|
||||
librocksdb-dev \
|
||||
libsdl1.2-dev \
|
||||
libsdl2-dev \
|
||||
libsdl2-gfx-dev \
|
||||
libsdl2-image-dev \
|
||||
libsdl2-mixer-dev \
|
||||
libsdl2-ttf-dev \
|
||||
libsecp256k1-dev \
|
||||
libsnappy-dev \
|
||||
libsndfile1-dev \
|
||||
libsodium-dev \
|
||||
libsoup2.4-dev \
|
||||
libsox-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libtagc0-dev \
|
||||
libtre-dev \
|
||||
libudev-dev \
|
||||
libusb-1.0-0-dev \
|
||||
libvte-2.91-dev \
|
||||
libwebkit2gtk-4.0-dev \
|
||||
libxau-dev \
|
||||
libxml2-dev \
|
||||
libxrandr-dev \
|
||||
libxss-dev \
|
||||
libyaml-dev \
|
||||
libz3-dev \
|
||||
libzip-dev \
|
||||
libzmq3-dev \
|
||||
libzstd-dev \
|
||||
llvm-11 \
|
||||
llvm-12 \
|
||||
llvm-13 \
|
||||
locales \
|
||||
m4 \
|
||||
minisat \
|
||||
mono-mcs \
|
||||
nettle-dev \
|
||||
ninja-build \
|
||||
nodejs \
|
||||
nvidia-cuda-toolkit \
|
||||
openjdk-8-jdk \
|
||||
python-mpltoolkits.basemap \
|
||||
python3-matplotlib \
|
||||
python3-numpy \
|
||||
python3-pip \
|
||||
python3-scipy \
|
||||
r-base \
|
||||
r-base-dev \
|
||||
rpm \
|
||||
ruby-dev \
|
||||
software-properties-common \
|
||||
sudo \
|
||||
texlive \
|
||||
unixodbc-dev \
|
||||
unzip \
|
||||
wget \
|
||||
xclip \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh
|
||||
100
docker/03-custom-install.sh
Executable file
100
docker/03-custom-install.sh
Executable file
@ -0,0 +1,100 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -exuo pipefail
|
||||
|
||||
export LANG=C.UTF-8
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Add system dependencies not present in the ubuntu package registry here.
|
||||
# Please add a comment stating which haskell packages needs it.
|
||||
|
||||
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
|
||||
# faster anyways and uses less RAM.
|
||||
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20
|
||||
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10
|
||||
|
||||
# install ocilib dependencies then build and install ocilib
|
||||
cd /tmp \
|
||||
&& wget https://storage.googleapis.com/oracle.fpinsight.com/instantClient/oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
|
||||
&& dpkg -i oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
|
||||
&& rm -f oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
|
||||
&& wget https://storage.googleapis.com/oracle.fpinsight.com/instantClient/oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
|
||||
&& dpkg -i oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
|
||||
&& rm -f oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
|
||||
&& wget https://github.com/vrogier/ocilib/archive/v4.3.2.tar.gz \
|
||||
&& tar xvf v4.3.2.tar.gz \
|
||||
&& cd /tmp/ocilib-4.3.2 \
|
||||
&& ./configure --with-oracle-import=linkage \
|
||||
--with-oracle-charset=ansi \
|
||||
--with-oracle-headers-path=/usr/include/oracle/12.1/client64 \
|
||||
--with-oracle-lib-path=/usr/lib/oracle/12.1/client64/lib \
|
||||
&& make \
|
||||
&& make install \
|
||||
&& cd \
|
||||
&& rm -rf /tmp/ocilib-4.3.2 \
|
||||
&& echo "/usr/local/lib" > /etc/ld.so.conf.d/usr-local.conf \
|
||||
&& echo "/usr/lib/oracle/12.1/client64/lib" > /etc/ld.so.conf.d/oracle-client.conf \
|
||||
&& ldconfig
|
||||
|
||||
# Add JDK to system paths.
|
||||
echo "/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/" > /etc/ld.so.conf.d/openjdk.conf \
|
||||
&& ldconfig
|
||||
|
||||
# Install erlang/otp platform and its dependencies
|
||||
ERLANG_DEB_FILE="esl-erlang_21.1-1~ubuntu~bionic_amd64.deb"
|
||||
pushd /tmp \
|
||||
&& 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
|
||||
|
||||
# Install the TensorFlow C API.
|
||||
curl https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.1.0.tar.gz > libtensorflow.tar.gz \
|
||||
&& sudo tar zxf libtensorflow.tar.gz -C /usr \
|
||||
&& rm libtensorflow.tar.gz \
|
||||
&& ldconfig
|
||||
|
||||
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
|
||||
PROTOC_ZIP=protoc-3.3.0-linux-x86_64.zip
|
||||
curl -OL https://github.com/google/protobuf/releases/download/v3.3.0/$PROTOC_ZIP
|
||||
sudo unzip -o $PROTOC_ZIP -d /usr bin/protoc
|
||||
rm -f $PROTOC_ZIP
|
||||
|
||||
|
||||
echo /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server > /etc/ld.so.conf.d/java.conf
|
||||
|
||||
# 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 z3, for grisette test suite
|
||||
Z3_VER=4.12.4
|
||||
(
|
||||
cd /usr/local \
|
||||
&& wget https://github.com/Z3Prover/z3/releases/download/z3-${Z3_VER}/z3-${Z3_VER}-x64-glibc-2.35.zip \
|
||||
&& unzip z3-${Z3_VER}-x64-glibc-2.35.zip \
|
||||
&& rm z3-${Z3_VER}-x64-glibc-2.35.zip \
|
||||
&& ln -s /usr/local/z3-${Z3_VER}-x64-glibc-2.35/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
|
||||
)
|
||||
10
docker/04-cleanup.sh
Executable file
10
docker/04-cleanup.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -exuo pipefail
|
||||
|
||||
export LANG=C.UTF-8
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Cleanup
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
@ -11,7 +11,7 @@ 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
|
||||
curl -L "https://github.com/commercialhaskell/curator/releases/download/commit-62d4bce549af5fccb5089b8aa319891dbe032ccb/curator.bz2" | bunzip2 > curator
|
||||
chmod +x curator
|
||||
|
||||
# Install GHC
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
#!/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
|
||||
92
etc/diskspace/remove-old-stack-work-libs.hs
Normal file → Executable file
92
etc/diskspace/remove-old-stack-work-libs.hs
Normal file → Executable file
@ -1,21 +1,40 @@
|
||||
#!/usr/bin/env stack
|
||||
-- stack --resolver nightly script
|
||||
-- stack --resolver lts-19.33 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 Control.Monad
|
||||
import Data.List
|
||||
import System.Directory
|
||||
import System.FilePath
|
||||
import System.Environment
|
||||
import Text.Regex.TDFA
|
||||
|
||||
-- keep 2 latest builds
|
||||
keepBuilds :: Int
|
||||
keepBuilds = 2
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
args <- getArgs
|
||||
case args of
|
||||
[stream] -> do
|
||||
home <- getHomeDirectory
|
||||
withCurrentDirectory (home </> "stackage/automated/work" </> stream </> "unpack-dir") $ do
|
||||
cleanStackWorkInstall
|
||||
putStrLn ""
|
||||
cleanStackWorkPackages
|
||||
_ -> error "arg should be 'lts-XX' or 'nightly'"
|
||||
|
||||
-- navigates to: .stack-work/install/x86_64-linux*/*/*/lib/x86_64-linux-ghc-*
|
||||
cleanStackWorkInstall :: IO ()
|
||||
cleanStackWorkInstall =
|
||||
withCurrentDirectory ".stack-work/install"
|
||||
$ withOneDirectory_ -- "x86_64-linux*"
|
||||
$ withOneDirectory_ -- hash
|
||||
$ withOneDirectory $ \ghcver ->
|
||||
withCurrentDirectory ("lib" </> "x86_64-linux-ghc-" ++ ghcver) $ do
|
||||
getCurrentDirectory >>= putStrLn
|
||||
files <- sort <$> listDirectory "."
|
||||
let (dynlibs,libdirs) = partition (".so" `isExtensionOf`) files
|
||||
pkglibdirs = groupBy samePkgLibDir libdirs
|
||||
@ -32,8 +51,8 @@ main = do
|
||||
|
||||
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"
|
||||
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
|
||||
@ -45,13 +64,60 @@ main = do
|
||||
|
||||
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
|
||||
removeOlder :: (FilePath -> IO ()) -> [FilePath] -> IO ()
|
||||
removeOlder remover files = do
|
||||
oldfiles <- drop keepBuilds . reverse <$> sortByAge files
|
||||
mapM_ remover oldfiles
|
||||
|
||||
sortByAge :: [FilePath] -> IO [FilePath]
|
||||
sortByAge files = do
|
||||
timestamps <- mapM getModificationTime files
|
||||
let fileTimes = zip files timestamps
|
||||
return $ map fst $ sortBy compareSnd fileTimes
|
||||
where
|
||||
compareSnd (_,t1) (_,t2) = compare t1 t2
|
||||
|
||||
-- navigates to:
|
||||
-- unpacked/*/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.8.1.0/build/
|
||||
cleanStackWorkPackages :: IO ()
|
||||
cleanStackWorkPackages =
|
||||
withCurrentDirectory "unpacked" $ do
|
||||
getCurrentDirectory >>= putStrLn
|
||||
pkgs <- listDirectory "."
|
||||
forM_ pkgs $ \pkg ->
|
||||
withCurrentDirectory (pkg </> ".stack-work/dist") $ do
|
||||
-- [(dyn,stat)]
|
||||
libs <- do
|
||||
platforms <- listDirectory "." -- "x86_64-linux-tinfo6*"
|
||||
forM platforms $ \pl ->
|
||||
withCurrentDirectory pl $
|
||||
withOneDirectory -- "Cabal-*"
|
||||
$ \cbl ->
|
||||
withCurrentDirectory "build" $ do
|
||||
ls <- sort <$> listDirectory "."
|
||||
files <- filterM doesFileExist ls
|
||||
let (dynlibs,others) = partition (".so" `isExtensionOf`) files
|
||||
statlibs = filter (".a" `isExtensionOf`) others
|
||||
let dir = pl </> cbl </> "build"
|
||||
return (map (dir </>) dynlibs, map (dir </>) statlibs)
|
||||
removeOlder removeFile $ concatMap fst libs
|
||||
removeOlder removeFile $ concatMap snd libs
|
||||
|
||||
withOneDirectory_ :: IO a -> IO a
|
||||
withOneDirectory_ act = do
|
||||
ls <- listDirectory "."
|
||||
case ls of
|
||||
[l] -> withCurrentDirectory l act
|
||||
_ -> do
|
||||
cwd <- getCurrentDirectory
|
||||
error $ show (length ls) ++ " directories found in " ++ cwd ++ ": " ++ unwords ls
|
||||
|
||||
withOneDirectory :: (FilePath -> IO a) -> IO a
|
||||
withOneDirectory act = do
|
||||
ls <- listDirectory "."
|
||||
case ls of
|
||||
[l] -> withCurrentDirectory l $ act l
|
||||
_ -> do
|
||||
cwd <- getCurrentDirectory
|
||||
error $ show (length ls) ++ " directories found in " ++ cwd ++ ": " ++ unwords ls
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Script to verify a package to build successfully
|
||||
# Provide pacakge name by the first argument
|
||||
# Provide package name by the first argument
|
||||
#
|
||||
# Example:
|
||||
# ./verify-package mtl
|
||||
# or
|
||||
# ./verify-package mtl-2.2.2
|
||||
# or
|
||||
# ./verify-package mtl lts
|
||||
|
||||
set -eu
|
||||
|
||||
@ -20,6 +22,7 @@ if [[ -z $package ]]; then
|
||||
die "Package name is not given"
|
||||
fi
|
||||
|
||||
resolver="${2:-nightly}"
|
||||
|
||||
here="$(cd "$(dirname "$0")" > /dev/null; pwd)"
|
||||
dir="$(mktemp -d tmp.XXXX)"
|
||||
@ -30,13 +33,13 @@ exit() {
|
||||
}
|
||||
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
|
||||
stack build --resolver nightly --haddock --test --bench --no-run-benchmarks
|
||||
|
||||
stack init --resolver $resolver --ignore-subdirs
|
||||
stack build --resolver $resolver --haddock --test --bench --no-run-benchmarks
|
||||
|
||||
cat <<EOF
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user