[commit: ghc] master: appveyor: Refactor (5f922fb)
git at git.haskell.org
git at git.haskell.org
Thu Feb 1 04:30:01 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/5f922fbbef56dd4f0133ffe07ab8f0ebcb58fbaf/ghc
>---------------------------------------------------------------
commit 5f922fbbef56dd4f0133ffe07ab8f0ebcb58fbaf
Author: Ben Gamari <ben at smart-cactus.org>
Date: Wed Jan 31 19:14:47 2018 -0500
appveyor: Refactor
Move build logic into a dedicated bash script, avoiding repetitive
bash invocations. Furthermore, disable pacman update step as it breaks
things in non-predictable ways.
>---------------------------------------------------------------
5f922fbbef56dd4f0133ffe07ab8f0ebcb58fbaf
.appveyor.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
appveyor.yml | 19 +++----------------
2 files changed, 53 insertions(+), 16 deletions(-)
diff --git a/.appveyor.sh b/.appveyor.sh
new file mode 100644
index 0000000..436e54b
--- /dev/null
+++ b/.appveyor.sh
@@ -0,0 +1,50 @@
+# Configure the environment
+MSYSTEM=MINGW64
+source /etc/profile || true # a terrible, terrible workaround for msys2 brokenness
+
+# Don't set -e until after /etc/profile is sourced
+set -ex
+cd $APPVEYOR_BUILD_FOLDER
+
+case "$1" in
+ "prepare")
+ # Bring msys up-to-date
+ # However, we current don't do this: generally one must restart all
+ # msys2 processes when updating the msys2 runtime, which this may do. We can't
+ # easily do this and therefore do simply don't update.
+ #pacman --noconfirm -Syuu
+
+ # Install basic build dependencies
+ pacman --noconfirm -S --needed git tar bsdtar binutils autoconf make xz curl libtool automake python python2 p7zip patch mingw-w64-$(uname -m)-python3-sphinx mingw-w64-$(uname -m)-tools-git
+
+ # Prepare the tree
+ git config remote.origin.url git://github.com/ghc/ghc.git
+ git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/
+ git submodule init
+ git submodule --quiet update --recursive
+
+ # Install build dependencies
+ wget -q -O - https://downloads.haskell.org/~ghc/8.2.1/ghc-8.2.1-x86_64-unknown-mingw32.tar.xz | tar -xJ -C /mingw64 --strip-components=1
+ mkdir -p /usr/local/bin
+ wget -q -O - https://www.haskell.org/cabal/release/cabal-install-1.24.0.0/cabal-install-1.24.0.0-x86_64-unknown-mingw32.zip | bsdtar -xzf- -C /usr/local/bin
+ cabal update
+ cabal install -j --prefix=/usr/local alex happy
+ ;;
+
+ "build")
+ # Build the compiler
+ ./boot
+ ./configure --enable-tarballs-autodownload
+ make -j2
+ ;;
+
+ "test")
+ make binary_dist
+ 7z a ghc-windows.zip *.tar.xz
+ ;;
+
+ *)
+ echo "$0: unknown mode $1"
+ exit 1
+ ;;
+esac
diff --git a/appveyor.yml b/appveyor.yml
index 0af5304..7ccf2e0 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -18,24 +18,11 @@ deploy: off
install:
- cmd: |
SET "PATH=C:\%MSYS2_DIR%\%MSYSTEM%\bin;C:\%MSYS2_DIR%\usr\bin;%PATH%"
- bash -lc "pacman --noconfirm -Syuu"
- bash -lc "pacman --noconfirm -S --needed git tar bsdtar binutils autoconf make xz curl libtool automake python python2 p7zip patch mingw-w64-$(uname -m)-python3-sphinx mingw-w64-$(uname -m)-tools-git"
- bash -lc "cd $APPVEYOR_BUILD_FOLDER; git config remote.origin.url git://github.com/ghc/ghc.git"
- bash -lc "cd $APPVEYOR_BUILD_FOLDER; git config --global url.\"git://github.com/ghc/packages-\".insteadOf git://github.com/ghc/packages/"
- bash -lc "cd $APPVEYOR_BUILD_FOLDER; git submodule init"
- bash -lc "cd $APPVEYOR_BUILD_FOLDER; git submodule --quiet update --recursive"
- bash -lc "curl -L https://downloads.haskell.org/~ghc/8.2.1/ghc-8.2.1-x86_64-unknown-mingw32.tar.xz | tar -xJ -C /mingw64 --strip-components=1"
- bash -lc "mkdir -p /usr/local/bin"
- bash -lc "curl -L https://www.haskell.org/cabal/release/cabal-install-1.24.0.0/cabal-install-1.24.0.0-x86_64-unknown-mingw32.zip | bsdtar -xzf- -C /usr/local/bin"
- bash -lc "cabal update"
- bash -lc "cabal install -j --prefix=/usr/local alex happy"
+ bash .appveyor.sh prepare
build_script:
- - bash -lc "cd $APPVEYOR_BUILD_FOLDER; ./boot"
- - bash -lc "cd $APPVEYOR_BUILD_FOLDER; ./configure --enable-tarballs-autodownload"
- - bash -lc "cd $APPVEYOR_BUILD_FOLDER; make -j2"
- - bash -lc "cd $APPVEYOR_BUILD_FOLDER; make binary_dist"
- bash -lc "cd $APPVEYOR_BUILD_FOLDER; 7z a ghc-windows.zip *.tar.xz"
+ - bash .appveyor.sh build
+ - bash .appveyor.sh test
artifacts:
- path: C:\projects\ghc\ghc-windows.zip
More information about the ghc-commits
mailing list