From ff1817f017385a6d4e04ab13e2e27cc2708b4c9a Mon Sep 17 00:00:00 2001 From: Alex J Lennon Date: Sun, 26 Oct 2014 14:06:08 +0100 Subject: [PATCH] [CI] Add appveyor.yml configuration file to support Windows build Adds a configuration file to facilitate build of Mono with Cygwin on Appveyor Windows-based build workers. Dependencies are installed on a clean Appveyor build image for each build and the result of the 'make install' step is stored as a build output 'artifact' for further testing or deployment. Signed-off-by: Alex J Lennon --- appveyor.yml | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000000..58c9a3a60b5 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,98 @@ +# +# Appveyor configuration file for CI build of Mono on Windows (under Cygwin) +# +# For further details see http://www.appveyor.com +# + +# Use 'unstable' Appveyor build worker image as Appveyor have added Cygwin to this for us +os: Unstable + +# +# Custom environment variables +# +environment: + global: + CYG_ROOT: C:/cygwin + CYG_MIRROR: http://cygwin.mirror.constant.com + CYG_CACHE: C:/cygwin/var/cache/setup + NSIS_ROOT: C:\nsis + +# +# Initialisation prior to pulling the Mono repository +# +init: + - 'echo Building Mono for Windows' + - 'echo System architecture: %PLATFORM%' + - 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%' + - 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%' +# Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail + - 'git config --global core.autocrlf input' + +# +# Install needed build dependencies +# +install: +# NOTE: Already installed on current Appveyor unstable image +# - 'echo Retrieving Cygwin' +# - 'appveyor DownloadFile http://cygwin.com/setup-x86.exe -FileName %CYGROOT%/setup-x86.exe' + - 'echo Setting up Cygwin dependencies' + - '%CYG_ROOT%\setup-x86.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P autoconf -P automake -P bison -P gcc-core -P gcc-g++ -P mingw-runtime -P mingw-binutils -P mingw-gcc-core -P mingw-gcc-g++ -P mingw-pthreads -P mingw-w32api -P libtool -P make -P python -P gettext-devel -P gettext -P intltool -P libiconv -P pkg-config -P git -P wget -P curl > NUL' + - 'echo Check Cygwin setup' + - '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"' + - 'echo Done setting up Cygwin' + - 'echo Retrieving NSIS' + - 'appveyor DownloadFile "http://sunet.dl.sourceforge.net/project/nsis/NSIS 2/2.46/nsis-2.46-setup.exe" -FileName nsissetup.exe' + - 'echo Setting up NSIS' + - 'nsissetup.exe /S /D=%NSIS_ROOT%' + - 'echo Done setting up NSIS' + +# +# NOTE: msbuild doesn't work at present so use Cygwin to build +# +#build: +# project: C:\projects\mono\msvc\mono.sln +# verbosity: detailed + +# Cygwin build script +# +# NOTES: +# +# The stdin/stdout file descriptor appears not to be valid for the Appveyor +# build which causes failures as certain functions attempt to redirect +# default file handles. Ensure a dummy file descriptor is opened with exec. +# +build_script: + - cmd: 'echo Cygwin root is: %CYG_ROOT%' + - cmd: 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%' + - cmd: 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%' + - cmd: 'echo Repo build commit is: %APPVEYOR_REPO_COMMIT%' + - cmd: 'echo Autogen running...' + - cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0