diff options
author | Ben Gamari <ben@smart-cactus.org> | 2018-11-23 19:20:00 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-12-01 08:57:37 -0500 |
commit | b6108395cb969f79332d4bc31a3996607b9e0c16 (patch) | |
tree | a0703490f3907ede88189d65de8e14adc5945fb9 /.gitlab | |
parent | cbf57b7dbfdbfa72475d793b27858cacf2ed9816 (diff) | |
download | haskell-b6108395cb969f79332d4bc31a3996607b9e0c16.tar.gz |
Add GitLab CI
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/darwin-init.sh | 38 | ||||
-rw-r--r-- | .gitlab/fix-submodules.py | 8 | ||||
-rw-r--r-- | .gitlab/win32-init.sh | 34 |
3 files changed, 80 insertions, 0 deletions
diff --git a/.gitlab/darwin-init.sh b/.gitlab/darwin-init.sh new file mode 100644 index 0000000000..5561ca831b --- /dev/null +++ b/.gitlab/darwin-init.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +set -e + +toolchain=`pwd`/toolchain +PATH="$toolchain/bin:$PATH" + +if [ -d "`pwd`/cabal-cache" ]; then + cp -Rf cabal-cache $HOME/.cabal +fi + +if [ ! -e $toolchain/bin/ghc ]; then + mkdir -p tmp + cd tmp + curl https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-x86_64-apple-darwin.tar.xz | tar -xJ + cd ghc-$GHC_VERSION + ./configure --prefix=$toolchain + make install + cd ../.. + rm -Rf tmp +fi + +if [ ! -e $toolchain/bin/cabal ]; then + cabal_tarball="https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-x86_64-apple-darwin-sierra.tar.gz" + curl $cabal_tarball | tar -xz + mv cabal $toolchain/bin +fi + +if [ ! -e $toolchain/bin/happy ]; then + cabal update + cabal new-install happy --symlink-bindir=$toolchain/bin +fi + +if [ ! -e $toolchain/bin/alex ]; then + cabal update + cabal new-install alex --symlink-bindir=$toolchain/bin +fi + diff --git a/.gitlab/fix-submodules.py b/.gitlab/fix-submodules.py new file mode 100644 index 0000000000..51c9b06183 --- /dev/null +++ b/.gitlab/fix-submodules.py @@ -0,0 +1,8 @@ +#!/usr/bin/python + +import re + +x = open('.gitmodules').read() +x = re.sub(r"url *= *\.\.", "url = https://git.haskell.org", x) +open('.gitmodules', 'w').write(x) + diff --git a/.gitlab/win32-init.sh b/.gitlab/win32-init.sh new file mode 100644 index 0000000000..9141404dec --- /dev/null +++ b/.gitlab/win32-init.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +set -e + +toolchain=`pwd`/toolchain +PATH="$toolchain/bin:$PATH" + +if [ -d "`pwd`/cabal-cache" ]; then + cp -Rf cabal-cache $APPDATA/cabal +fi + +if [ ! -e $toolchain/bin/ghc ]; then + curl https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-x86_64-unknown-mingw32.tar.xz | tar -xJ + mv ghc-$GHC_VERSION toolchain +fi + +if [ ! -e $toolchain/bin/cabal ]; then + curl https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-i386-unknown-mingw32.zip > /tmp/cabal.zip + unzip /tmp/cabal.zip + mv cabal.exe $toolchain/bin +fi + +if [ ! -e $toolchain/bin/happy ]; then + cabal update + cabal install happy + cp $APPDATA/cabal/bin/happy $toolchain/bin +fi + +if [ ! -e $toolchain/bin/alex ]; then + cabal update + cabal install alex + cp $APPDATA/cabal/bin/alex $toolchain/bin +fi + |