[runtime] Prioritize loading a profiler library from the installation dir over standa...
[mono.git] / appveyor.yml
1 #
2 # Appveyor configuration file for CI build of Mono on Windows (under Cygwin)
3 #
4 # For further details see http://www.appveyor.com
5 #
6
7 # Use 'unstable' Appveyor build worker image as Appveyor have added Cygwin to this for us
8 os: Unstable
9
10 #
11 # Custom environment variables
12 #
13 environment:
14     global:
15         CYG_ROOT: C:/cygwin
16         CYG_MIRROR: http://cygwin.mirror.constant.com
17         CYG_CACHE: C:/cygwin/var/cache/setup
18         NSIS_ROOT: C:\nsis
19    
20 #
21 # Initialisation prior to pulling the Mono repository
22 #
23 init:
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'
30
31 #
32 # Install needed build dependencies
33
34 install:
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'
48
49 #
50 # NOTE: msbuild doesn't work at present so use Cygwin to build
51 #
52 #build:
53 #    project: C:\projects\mono\msvc\mono.sln 
54 #    verbosity: detailed
55
56 # Cygwin build script
57 #
58 # NOTES:
59 #
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.
63 #
64 build_script:
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"'
85
86 #
87 # Disable tests for now
88
89 test: off
90
91 #
92 # Only build the master branch
93 #
94 branches:
95   only:
96     - master
97
98 #
99 # NOTE: Currently this is the Mono installation tree. In future we will create an installation package artifact.
100 #       It has to be relative to the project path. Thus we have installed to within the build tree.
101 #
102 artifacts:
103     - path: install
104       name: mono-binaries
105       type: zip