Skip to content

Commit 0dd3fac

Browse files
committed
Update release scripts and documentation
1 parent 625203e commit 0dd3fac

File tree

29 files changed

+576
-537
lines changed

29 files changed

+576
-537
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ build:
1919
- stable
2020
script: &build
2121
- export PATH=$HOME/.local/bin:$PATH
22-
- (cd etc/scripts && stack --install-ghc install --pedantic)
23-
- stack-release-script check
22+
- stack etc/scripts/release.hs check
2423

2524
manual_build:
2625
stage: build

doc/maintainers/ghc.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<div class="hidden-warning"><a href="https://docs.haskellstack.org/"><img src="https://rawgit.com/commercialhaskell/stack/master/doc/img/hidden-warning.svg"></a></div>
2+
3+
# Adding a new GHC version
4+
5+
* Push new tag to our fork:
6+
7+
git clone [email protected]:commercialhaskell/ghc.git
8+
cd ghc
9+
git remote add upstream [email protected]:ghc/ghc.git
10+
git fetch upstream
11+
git push origin ghc-X.Y.Z-release
12+
13+
* [Publish a new Github release](https://github.com/commercialhaskell/ghc/releases/new)
14+
with tag `ghc-X.Y.Z-release` and same name.
15+
16+
* Download all the relevant GHC bindists from https://www.haskell.org/ghc/download_ghc_X_Y_Z and upload them to the just-created Github release (see
17+
[stack-setup-2.yaml](https://github.com/fpco/stackage-content/blob/master/stack/stack-setup-2.yaml)
18+
for the ones we used in the last GHC release).
19+
20+
In the case of macOS, repackage the `.xz` bindist as a `.bz2`, since macOS does
21+
not include `xz` by default or provide an easy way to install it.
22+
23+
The script at `etc/scripts/mirror-ghc-bindists-to-github.sh` will help with
24+
this. See the comments within the script.
25+
26+
* [Edit stack-setup-2.yaml](https://github.com/fpco/stackage-content/edit/master/stack/stack-setup-2.yaml)
27+
and add the new bindists, pointing to the Github release version. Be sure to
28+
update the `content-length` and `sha1` values.
29+
30+
31+
## Building GHC
32+
33+
TODO: look into using https://github.com/bgamari/ghc-utils/blob/master/rel-eng/bin-release.sh, which is the script used to official bindists.
34+
35+
On systems with a small `/tmp`, you should set TMP and TEMP to an alternate
36+
location.
37+
38+
Setup the system based on [these instructions](https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Linux). On Ubuntu (`docker run -ti --rm ubuntu:16.04`):
39+
40+
apt-get update && apt-get install -y ghc alex happy make autoconf g++ git vim xz-utils automake libtool gcc libgmp-dev ncurses-dev libtinfo-dev python3
41+
42+
on Void Linux (`docker run -ti --rm voidlinux/voidlinux bash`):
43+
44+
xbps-install -S curl gcc make xz ghc autoconf git vim automake gmp-devel ncurses-devel python3 cabal-install && \
45+
cabal update && \
46+
cabal install alex happy
47+
48+
For GHC >= 7.10.2, set the `GHC_VERSION` environment variable to the version to build:
49+
50+
* `export GHC_VERSION=8.2.2`
51+
* `export GHC_VERSION=8.2.1`
52+
* `export GHC_VERSION=8.0.2`
53+
* `export GHC_VERSION=8.0.1`
54+
* `export GHC_VERSION=7.10.3a`
55+
* `export GHC_VERSION=7.10.2`
56+
57+
then, run (from [here](https://ghc.haskell.org/trac/ghc/wiki/Newcomers)):
58+
59+
git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/ && \
60+
git clone -b ghc-${GHC_VERSION}-release --recursive git://github.com/ghc/ghc ghc-${GHC_VERSION} && \
61+
cd ghc-${GHC_VERSION}/ && \
62+
cp mk/build.mk.sample mk/build.mk && \
63+
sed -i 's/^#BuildFlavour *= *perf$/BuildFlavour = perf/' mk/build.mk && \
64+
./boot && \
65+
./configure --enable-tarballs-autodownload && \
66+
sed -i 's/^TAR_COMP *= *bzip2$/TAR_COMP = xz/' mk/config.mk && \
67+
make -j$(cat /proc/cpuinfo|grep processor|wc -l) && \
68+
make binary-dist
69+
70+
GHC 7.8.4 is slightly different:
71+
72+
export GHC_VERSION=7.8.4 && \
73+
git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/ && \
74+
git clone -b ghc-${GHC_VERSION}-release --recursive git://github.com/ghc/ghc ghc-${GHC_VERSION} && \
75+
cd ghc-${GHC_VERSION}/ && \
76+
./sync-all --extra --nofib -r git://git.haskell.org get -b ghc-7.8 && \
77+
cp mk/build.mk.sample mk/build.mk && \
78+
sed -i 's/^#BuildFlavour *= *perf$/BuildFlavour = perf/' mk/build.mk && \
79+
perl boot && \
80+
./configure && \
81+
sed -i 's/^TAR_COMP *= *bzip2$/TAR_COMP = xz/' mk/config.mk && \
82+
make -j$(cat /proc/cpuinfo|grep processor|wc -l) && \
83+
make binary-dist

doc/maintainers/msys.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<div class="hidden-warning"><a href="https://docs.haskellstack.org/"><img src="https://rawgit.com/commercialhaskell/stack/master/doc/img/hidden-warning.svg"></a></div>
2+
3+
# Upgrading msys
4+
5+
When installing GHC on Windows, Stack will also install
6+
[msys2](http://www.msys2.org/) to provide a Unix shell and environment,
7+
necessary for such things as running configure scripts. This section explains
8+
the steps required to upgrade the msys2 version used by Stack.
9+
10+
1. Download latest installers from msys2's website. These installers are
11+
executables, versioned by date (YYYYMMDD), and are separate for `x86_64`
12+
and `i686`. You'll usually be upgrading both at the same time, which we'll
13+
assume here.
14+
15+
2. Run the installer and install to the default location (`c:\msys64` and
16+
`c:\msys32`, respectively).
17+
18+
3. Create tarballs for each directory:
19+
20+
```
21+
$ cd /c/
22+
$ tar cJf msys2-YYYYMMDD-x86_64.tar.xz msys64
23+
$ tar cJf msys2-YYYYMMDD-i686.tar.xz msys32
24+
```
25+
26+
4. Create a new release named `msys2-YYYYMMDD` on the
27+
[fpco/stackage-content](https://github.com/fpco/stackage-content)
28+
repo, and upload these two files.
29+
30+
5. Create a PR for the [stack-setup-2.yaml file](https://github.com/fpco/stackage-content/blob/master/stack/stack-setup-2.yaml)
31+
to switch over to using the newly uploaded files. You should test this file locally first.

0 commit comments

Comments
 (0)