2 # Appveyor configuration file for CI build of Mono on Windows (under Cygwin)
4 # For further details see http://www.appveyor.com
7 # Use 'unstable' Appveyor build worker image as Appveyor have added Cygwin to this for us
11 # Custom environment variables
16 CYG_MIRROR: http://cygwin.mirror.constant.com
17 CYG_CACHE: C:/cygwin/var/cache/setup
21 # Initialisation prior to pulling the Mono repository
24 - 'echo Building Mono for Windows'
25 - 'echo System architecture: %PLATFORM%'
26 - 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%'
27 - 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%'
28 # Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail
29 - 'git config --global core.autocrlf input'
32 # Install needed build dependencies
35 # NOTE: Already installed on current Appveyor unstable image
36 # - 'echo Retrieving Cygwin'
37 # - 'appveyor DownloadFile http://cygwin.com/setup-x86.exe -FileName %CYGROOT%/setup-x86.exe'
38 - 'echo Setting up Cygwin dependencies'
39 - '%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'
40 - 'echo Check Cygwin setup'
41 - '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
42 - 'echo Done setting up Cygwin'
43 - 'echo Retrieving NSIS'
44 - 'appveyor DownloadFile "http://sunet.dl.sourceforge.net/project/nsis/NSIS 2/2.46/nsis-2.46-setup.exe" -FileName nsissetup.exe'
45 - 'echo Setting up NSIS'
46 - 'nsissetup.exe /S /D=%NSIS_ROOT%'
47 - 'echo Done setting up NSIS'
50 # NOTE: msbuild doesn't work at present so use Cygwin to build
53 # project: C:\projects\mono\msvc\mono.sln
60 # The stdin/stdout file descriptor appears not to be valid for the Appveyor
61 # build which causes failures as certain functions attempt to redirect
62 # default file handles. Ensure a dummy file descriptor is opened with exec.
65 - cmd: 'echo Cygwin root is: %CYG_ROOT%'
66 - cmd: 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%'
67 - cmd: 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%'
68 - cmd: 'echo Repo build commit is: %APPVEYOR_REPO_COMMIT%'
69 - cmd: 'echo Autogen running...'
70 - cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; NOCONFIGURE=1 ./autogen.sh --prefix=/usr/local --with-preview=yes"'
71 - cmd: 'echo Configure running...'
72 - cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; ./configure --host=i686-pc-mingw32"'
73 - cmd: 'echo Pulling monolite latest...'
74 - cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make get-monolite-latest"'
75 - cmd: 'echo Make running...'
76 - cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make"'
77 - cmd: 'echo Installing...'
78 - cmd: 'mkdir %APPVEYOR_BUILD_FOLDER%\install'
79 - cmd: '%CYG_ROOT%/bin/bash --login -lc "export CYGWIN=winsymlinks:native; mount \"$APPVEYOR_BUILD_FOLDER\install\" /usr/local; cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make install; umount /usr/local"'
80 # - cmd: 'echo Building package...'
81 # - cmd: 'cd %APPVEYOR_BUILD_FOLDER%'
82 # - cmd: '%NSIS_ROOT%\makensis /DMILESTONE=%APPVEYOR_REPO_BRANCH% /DSOURCE_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER\install\*.* /DBUILDNUM=%APPVEYOR_BUILD_VERSION% monowiz.win32.nsi'
83 # - cmd: 'Building distribution...'
84 # - cmd: '%CYG_ROOT%/bin/bash -lc "export CYGWIN=winsymlinks:native; cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make dist"'
87 # Disable tests for now
92 # NOTE: Currently this is the Mono installation tree. In future we will create an installation package artifact.
93 # It has to be relative to the project path. Thus we have installed to within the build tree.