[mobile_static] Split jenkins tests out, enable running from top level
[mono.git] / scripts / ci / run-jenkins.sh
1 #!/bin/bash -e
2
3 TESTCMD=`dirname "${BASH_SOURCE[0]}"`/run-step.sh
4
5 export TEST_HARNESS_VERBOSE=1
6 export CFLAGS=-ggdb3
7
8 if [[ ${CI_TAGS} == *'coop-gc'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-cooperative-gc=yes"; export MONO_CHECK_MODE=gc,thread; fi
9
10 if [[ ${label} == 'osx-i386' ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-libgdiplus=/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib --build=i386-apple-darwin11.2.0"; fi
11 if [[ ${label} == 'osx-amd64' ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-libgdiplus=/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib "; fi
12 if [[ ${label} == 'w32' ]]; then PLATFORM=Win32; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=i686-w64-mingw32"; export MONO_EXECUTABLE="`cygpath -u ${WORKSPACE}\\\msvc\\\Win32\\\bin\\\Release_SGen\\\mono-sgen.exe`";fi
13 if [[ ${label} == 'w64' ]]; then PLATFORM=x64; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=x86_64-w64-mingw32 --disable-boehm"; export MONO_EXECUTABLE="`cygpath -u ${WORKSPACE}\\\msvc\\\x64\\\bin\\\Release_SGen\\\mono-sgen.exe`"; fi
14
15 if [[ ${CI_TAGS} != 'mobile_static' ]] && [[ ${label} != w* ]] && [[ ${label} != 'debian-ppc64el' ]] && [[ ${label} != 'centos-s390x' ]];
16     then
17     EXTRA_CONF_FLAGS="$EXTRA_CONF_FLAGS --with-monodroid --with-monotouch --with-monotouch_watch --with-monotouch_tv --with-xammac"
18     # only enable the mobile profiles and mobile_static on the main architectures
19
20         # only enable the concurrent collector by default on main unix archs
21         EXTRA_CONF_FLAGS="$EXTRA_CONF_FLAGS --with-sgen-default-concurrent=yes"
22 fi
23
24 if [[ ${CI_TAGS} == 'mobile_static' ]]; 
25         then 
26         EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_profile=mobile_static";
27         export PROFILE=mobile_static;
28 fi
29
30 if [ -x "/usr/bin/dpkg-architecture" ];
31         then
32         EXTRA_CONF_FLAGS="$EXTRA_CONF_FLAGS --host=`/usr/bin/dpkg-architecture -qDEB_HOST_GNU_TYPE`"
33         #force build arch = dpkg arch, sometimes misdetected
34 fi
35
36
37 ${TESTCMD} --label=configure --timeout=60m --fatal ./autogen.sh $EXTRA_CONF_FLAGS
38 if [[ ${label} == w* ]];
39     then
40     ${TESTCMD} --label=make-msvc --timeout=60m --fatal /cygdrive/c/Program\ Files\ \(x86\)/MSBuild/14.0/Bin/MSBuild.exe /p:PlatformToolset=v140 /p:Platform=${PLATFORM} /p:Configuration=Release msvc/mono.sln
41     ${TESTCMD} --label=make-msvc-sgen --timeout=60m --fatal /cygdrive/c/Program\ Files\ \(x86\)/MSBuild/14.0/Bin/MSBuild.exe /p:PlatformToolset=v140 /p:Platform=${PLATFORM} /p:Configuration=Release_SGen msvc/mono.sln
42 fi
43 ${TESTCMD} --label=make --timeout=300m --fatal make -w V=1
44 if [[ -n "${ghprbPullId}" ]] && [[ ${label} == w* ]];
45     then
46     exit 0
47     # we don't run the test suite on Windows PRs, we just ensure the build succeeds, so end here
48 fi
49
50 make check-ci