summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/darwin-init.sh38
-rw-r--r--.gitlab/fix-submodules.py8
-rw-r--r--.gitlab/win32-init.sh34
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
+