2 # -*- mode: shell-script; indent-tabs-mode: nil; -*-
4 export MONO_REPO_ROOT
="$( cd "$
( dirname "${BASH_SOURCE[0]}" )/..
/..
/" && pwd )"
5 export TESTCMD
=${MONO_REPO_ROOT}/scripts
/ci
/run-step.sh
7 export CI_PR
=$
([[ ${CI_TAGS} == *'pull-request'* ]] && echo 1 || true
)
8 export CI_CPU_COUNT
=$
(getconf _NPROCESSORS_ONLN || getconf NPROCESSORS_ONLN ||
echo 4)
9 export TEST_HARNESS_VERBOSE
=1
11 # workaround for acceptance-tests submodules leaving files behind since Jenkins only does "git clean -xdf" (no second 'f')
12 # which won't clean untracked .git repos (remove once https://github.com/jenkinsci/git-plugin/pull/449 is available)
13 for dir
in acceptance-tests
/external
/*; do [ -d "$dir" ] && (cd "$dir" && echo "Cleaning $dir" && git clean
-xdff); done
15 source ${MONO_REPO_ROOT}/scripts
/ci
/util.sh
17 if [[ ${CI_TAGS} == *'pull-request'* ]]; then
18 # Skip lanes which are not affected by the PR
19 wget
-O pr-contents.
diff "${ghprbPullLink}.diff"
20 grep '^diff' pr-contents.
diff > pr-files.txt
21 echo "Files affected by the PR:"
27 if ! grep -q -v -e a
/netcore
-e a
/scripts
/ci
/pipeline-netcore-runtime.yml pr-files.txt
; then
31 if ! grep -q -v a
/mono
/mini
/mini-ppc pr-files.txt
; then
35 if ! grep -q -v a
/scripts
/ci
/provisioning pr-files.txt
; then
36 skip_step
="CI provisioning scripts"
39 if ! grep -q -v a
/sdks
/wasm pr-files.txt
; then
40 if [[ ${CI_TAGS} == *'webassembly'* ]] ||
[[ ${CI_TAGS} == *'wasm'* ]]; then
47 if [ $skip = true
]; then
48 ${TESTCMD} --label="Skipped on ${skip_step}." --timeout=60m
--fatal sh
-c 'exit 0'
49 if [[ $CI_TAGS == *'apidiff'* ]]; then report_github_status
"success" "API Diff" "Skipped." || true
; fi
50 if [[ $CI_TAGS == *'csprojdiff'* ]]; then report_github_status
"success" "Project Files Diff" "Skipped." || true
; fi
58 helix_send_build_start_event
"build/source/$MONO_HELIX_TYPE/"
61 gnumake
=$
(which gmake ||
which gnumake ||
which make)
63 if [[ ${CI_TAGS} == *'clang-sanitizer'* ]]; then
66 export CFLAGS
="$CFLAGS -g -O1 -fsanitize=thread -fsanitize-blacklist=${MONO_REPO_ROOT}/scripts/ci/clang-thread-sanitizer-blacklist -mllvm -tsan-instrument-atomics=false"
67 export LDFLAGS
="-fsanitize=thread"
68 # TSAN_OPTIONS are used by programs that were compiled with Clang's ThreadSanitizer
69 # see https://github.com/google/sanitizers/wiki/ThreadSanitizerFlags for more details
70 export TSAN_OPTIONS
="history_size=7:exitcode=0:force_seq_cst_atomics=1"
74 if [[ ${CI_TAGS} == *'win-'* ]]; then
75 # Passing -ggdb3 on Cygwin breaks linking against libmonosgen-x.y.dll
76 export CFLAGS
="$CFLAGS -g -O2"
78 export EXTRA_CFLAGS
="$EXTRA_CFLAGS -ggdb3 -O2"
81 if [[ $CI_TAGS == *'collect-coverage'* ]]; then
82 # Collect coverage for further use by lcov and similar tools.
83 # Coverage must be collected with -O0 and debug information.
84 export CFLAGS
="$CFLAGS -ggdb3 --coverage -O0"
87 if [[ $CI_TAGS == *'retry-flaky-tests'* ]]; then
88 export MONO_FLAKY_TEST_RETRIES
=5
91 # We don't want to have to maintain symbolification blobs for CI
92 export EXTRA_CONF_FLAGS
="${EXTRA_CONF_FLAGS} --with-crash-privacy=no "
94 if [[ ${CI_TAGS} == *'osx-i386'* ]]; then EXTRA_CFLAGS
="$EXTRA_CFLAGS -m32 -arch i386 -mmacosx-version-min=10.9"; EXTRA_LDFLAGS
="$EXTRA_LDFLAGS -m32 -arch i386"; EXTRA_CONF_FLAGS
="${EXTRA_CONF_FLAGS} --with-libgdiplus=/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib --host=i386-apple-darwin13.0.0 --build=i386-apple-darwin13.0.0"; fi
95 if [[ ${CI_TAGS} == *'osx-amd64'* ]]; then EXTRA_CFLAGS
="$EXTRA_CFLAGS -m64 -arch x86_64 -mmacosx-version-min=10.9"; EXTRA_LDFLAGS
="$EXTRA_LDFLAGS -m64 -arch x86_64" EXTRA_CONF_FLAGS
="${EXTRA_CONF_FLAGS} --with-libgdiplus=/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib"; fi
96 if [[ ${CI_TAGS} == *'win-i386'* ]]; then PLATFORM=Win32; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=i686-w64-mingw32 --enable-btls"; export MONO_EXECUTABLE="${MONO_REPO_ROOT}/msvc
/build
/sgen
/Win32
/bin
/Release
/mono-sgen.exe
"; fi
97 if [[ ${CI_TAGS} == *'win-amd64'* && ${CI_TAGS} != *'sdks-android'* ]]; then PLATFORM=x64; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=x86_64-w64-mingw32 --disable-boehm --enable-btls"; export MONO_EXECUTABLE="${MONO_REPO_ROOT}/msvc/build/sgen/x64/bin/Release/mono-sgen.exe"; fi
98 if [[ ${CI_TAGS} == *'freebsd-amd64'* ]]; then export CC
="clang"; export CXX
="clang++"; EXTRA_CONF_FLAGS
="${EXTRA_CONF_FLAGS} --disable-dtrace --disable-boehm ac_cv_header_sys_inotify_h=no ac_cv_func_inotify_init=no ac_cv_func_inotify_add_watch=no ac_cv_func_inotify_rm_watch=no"; fi
99 if [[ ${CI_TAGS} == *'make-install'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm --prefix=${MONO_REPO_ROOT}/tmp
/monoprefix
"; fi
101 if [[ ${CI_TAGS} == *'coop-suspend'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --disable-hybrid-suspend --enable-cooperative-suspend";
102 elif [[ ${CI_TAGS} == *'hybrid-suspend'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-hybrid-suspend";
103 elif [[ ${CI_TAGS} == *'preemptive-suspend'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --disable-hybrid-suspend";
106 if [[ ${CI_TAGS} == *'checked-coop'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-checked-build=gc
,thread
"; fi
107 if [[ ${CI_TAGS} == *'checked-all'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-checked-build=all
"; fi
109 if [[ ${CI_TAGS} == *'mcs-compiler'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-csc=mcs
"; fi
110 if [[ ${CI_TAGS} == *'disable-mcs-build'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --disable-mcs-build"; fi
112 if [[ ${CI_TAGS} == *'fullaot_llvm'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm=yes --with-runtime-preset=fullaot_llvm
";
113 elif [[ ${CI_TAGS} == *'hybridaot_llvm'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm=yes --with-runtime-preset=hybridaot_llvm
";
114 elif [[ ${CI_TAGS} == *'winaot_llvm'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm=yes --with-runtime-preset=winaot_llvm
";
115 elif [[ ${CI_TAGS} == *'aot_llvm'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm=yes --with-runtime-preset=aot_llvm
";
116 elif [[ ${CI_TAGS} == *'jit_llvm'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm=yes"; export MONO_ENV_OPTIONS="$MONO_ENV_OPTIONS --llvm";
117 elif [[ ${CI_TAGS} == *'fullaotinterp_llvm'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm=yes --with-runtime-preset=fullaotinterp_llvm
";
118 elif [[ ${CI_TAGS} == *'fullaotinterp'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=fullaotinterp
";
119 elif [[ ${CI_TAGS} == *'winaotinterp'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=winaotinterp
";
120 elif [[ ${CI_TAGS} == *'winaotinterp_llvm'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm=yes --with-runtime-preset=winaotinterp_llvm
";
121 elif [[ ${CI_TAGS} == *'fullaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=fullaot
";
122 elif [[ ${CI_TAGS} == *'hybridaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=hybridaot
";
123 elif [[ ${CI_TAGS} == *'winaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=winaot
";
124 elif [[ ${CI_TAGS} == *'aot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=aot
";
125 elif [[ ${CI_TAGS} == *'bitcodeinterp'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=bitcodeinterp"; export PATH="$PATH:${MONO_REPO_ROOT}/llvm/usr/bin";
126 elif [[ ${CI_TAGS} == *'bitcode'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=bitcode"; export PATH="$PATH:${MONO_REPO_ROOT}/llvm
/usr
/bin
";
127 elif [[ ${CI_TAGS} == *'acceptance-tests'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --prefix=${MONO_REPO_ROOT}/tmp/mono-acceptance-tests --with-sgen-default-concurrent=yes";
128 elif [[ ${CI_TAGS} == *'all-profiles'* ]]; then EXTRA_CONF_FLAGS
="${EXTRA_CONF_FLAGS} --with-runtime-preset=all";
129 elif [[ ${CI_TAGS} == *'compile-msbuild-source'* ]]; then EXTRA_CONF_FLAGS
="${EXTRA_CONF_FLAGS} --prefix=/tmp/mono-from-source";
132 if [ -x "/usr/bin/dpkg-architecture" ];
134 EXTRA_CONF_FLAGS
="$EXTRA_CONF_FLAGS --host=`/usr/bin/dpkg-architecture -qDEB_HOST_GNU_TYPE`"
135 #force build arch = dpkg arch, sometimes misdetected
136 mkdir
-p ~
/.config
/.mono
/
137 wget
-O- https
://download.mono-project.com
/test
/new-certs.tgz |
tar zx
-C ~
/.config
/.mono
/
140 if [[ ${CI_TAGS} == *'cxx'* ]]; then
141 EXTRA_CONF_FLAGS
="$EXTRA_CONF_FLAGS -enable-cxx"
142 MSBUILD_CXX
="/p:MONO_COMPILE_AS_CPP=true"
145 if [[ ${CI_TAGS} == *'microbench'* ]]; then
146 EXTRA_CONF_FLAGS
="$EXTRA_CONF_FLAGS --with-profile4_x=yes"
149 if [[ ${CI_TAGS} == *'win-'* ]];
151 mkdir
-p ~
/.config
/.mono
/
152 wget
-qO- https
://download.mono-project.com
/test
/new-certs.tgz|
tar zx
-C ~
/.config
/.mono
/
155 if [[ ${CI_TAGS} == *'ccache'* ]];
157 # CCACHE_DIR should be set to a directory outside the chroot which holds the cache
158 CCACHE
=$
(which ccache
)
159 if [ "$CCACHE" ]; then
160 if [[ ${CI_TAGS} == *'osx-'* ]]; then
161 export CC
="ccache clang"
162 export CXX
="ccache clang++"
164 export CC
="ccache gcc"
165 export CXX
="ccache g++"
170 if [[ ${CI_TAGS} == *'sdks-llvm'* ]]; then
171 ${TESTCMD} --label=archive --timeout=120m --fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse --trace -C sdks/builds archive-llvm-llvm{,win}64 NINJA
=
175 if [[ ${CI_TAGS} == *'sdks-ios'* ]];
177 # configuration on our bots
178 if [[ ${CI_TAGS} == *'xcode113'* ]]; then
179 export XCODE_DIR
=/Applications
/Xcode113.app
/Contents
/Developer
180 export MACOS_VERSION
=10.15
181 export IOS_VERSION
=13.2
182 export TVOS_VERSION
=13.2
183 export WATCHOS_VERSION
=6.1
184 export WATCHOS64_32_VERSION
=6.1
186 export XCODE_DIR
=/Applications
/Xcode101.app
/Contents
/Developer
187 export MACOS_VERSION
=10.14
188 export IOS_VERSION
=12.1
189 export TVOS_VERSION
=12.1
190 export WATCHOS_VERSION
=5.1
191 export WATCHOS64_32_VERSION
=5.1
194 # retrieve selected Xcode version
195 /usr
/libexec
/PlistBuddy
-c 'Print :ProductBuildVersion' ${XCODE_DIR}/..
/version.plist
> xcode_version.txt
197 # make sure we embed the correct path into the PDBs
198 export MONOTOUCH_MCS_FLAGS
=-pathmap:${MONO_REPO_ROOT}/=/Library
/Frameworks
/Xamarin.iOS.framework
/Versions
/Current
/src
/Xamarin.iOS
/
200 echo "ENABLE_IOS=1" > sdks
/Make.config
201 if [[ ${CI_TAGS} == *'cxx'* ]]; then
202 echo "ENABLE_CXX=1" >> sdks
/Make.config
204 if [[ ${CI_TAGS} == *'debug'* ]]; then
205 echo "CONFIGURATION=debug" >> sdks
/Make.config
208 ${TESTCMD} --label=configure
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds configure-ios NINJA
=
209 ${TESTCMD} --label=build
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds build-ios NINJA
=
210 ${TESTCMD} --label=archive
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds archive-ios NINJA
=
212 if [[ ${CI_TAGS} != *'no-tests'* ]]; then
214 export sim_test_suites
="Mono.Runtime.Tests corlib System System.Core System.Data System.Net.Http System.Numerics System.Runtime.Serialization System.Transactions System.IO.Compression System.IO.Compression.FileSystem System.Json System.ComponentModel.DataAnnotations System.Security System.Xml System.Xml.Linq System.ServiceModel.Web System.Web.Services Mono.CSharp Mono.Data.Sqlite Mono.Data.Tds Mono.Security"
216 ${TESTCMD} --label=build-ios-sim
--timeout=20m
$gnumake -C sdks
/ios build-ios-sim-all
217 for suite
in ${sim_test_suites}; do ${TESTCMD} --label=run-ios-sim-${suite} --timeout=10m $gnumake -C sdks/ios run-ios-sim-${suite}; done
220 if [[ ${CI_TAGS} == *'run-device-tests'* ]]; then
221 export device_test_suites
="Mono.Runtime.Tests System.Core"
223 ${TESTCMD} --label=build-ios-dev
--timeout=60m
$gnumake -C sdks
/ios build-ios-dev-all
224 for suite
in ${device_test_suites}; do ${TESTCMD} --label=run-ios-dev-${suite} --timeout=10m $gnumake -C sdks/ios run-ios-dev-${suite}; done
226 ${TESTCMD} --label=build-ios-dev-llvm
--timeout=60m
$gnumake -C sdks
/ios build-ios-dev-llvm-all
227 for suite
in ${device_test_suites}; do ${TESTCMD} --label=run-ios-dev-llvm-${suite} --timeout=10m $gnumake -C sdks/ios run-ios-dev-${suite}; done
229 ${TESTCMD} --label=build-ios-dev-interp-only
--timeout=60m
$gnumake -C sdks
/ios build-ios-dev-interp-only-all
230 for suite
in ${device_test_suites}; do ${TESTCMD} --label=run-ios-dev-interp-only-${suite} --timeout=10m $gnumake -C sdks/ios run-ios-dev-${suite}; done
232 ${TESTCMD} --label=build-ios-dev-interp-mixed
--timeout=60m
$gnumake -C sdks
/ios build-ios-dev-interp-mixed-all
233 for suite
in ${device_test_suites}; do ${TESTCMD} --label=run-ios-dev-interp-mixed-${suite} --timeout=10m $gnumake -C sdks/ios run-ios-dev-${suite}; done
239 if [[ ${CI_TAGS} == *'sdks-mac'* ]];
241 # configuration on our bots
242 if [[ ${CI_TAGS} == *'xcode113'* ]]; then
243 export XCODE_DIR
=/Applications
/Xcode113.app
/Contents
/Developer
244 export MACOS_VERSION
=10.15
246 export XCODE_DIR
=/Applications
/Xcode101.app
/Contents
/Developer
247 export MACOS_VERSION
=10.14
250 # retrieve selected Xcode version
251 /usr
/libexec
/PlistBuddy
-c 'Print :ProductBuildVersion' ${XCODE_DIR}/..
/version.plist
> xcode_version.txt
253 # make sure we embed the correct path into the PDBs
254 export XAMMAC_MCS_FLAGS
=-pathmap:${MONO_REPO_ROOT}/=/Library
/Frameworks
/Xamarin.Mac.framework
/Versions
/Current
/src
/Xamarin.Mac
/
256 echo "ENABLE_MAC=1" > sdks
/Make.config
257 if [[ ${CI_TAGS} == *'cxx'* ]]; then
258 echo "ENABLE_CXX=1" >> sdks
/Make.config
260 if [[ ${CI_TAGS} == *'debug'* ]]; then
261 echo "CONFIGURATION=debug" >> sdks
/Make.config
264 ${TESTCMD} --label=configure
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds configure-mac NINJA
=
265 ${TESTCMD} --label=build
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds build-mac NINJA
=
266 ${TESTCMD} --label=archive
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds archive-mac NINJA
=
271 if [[ ${CI_TAGS} == *'sdks-android'* ]];
273 echo "ENABLE_ANDROID=1" > sdks
/Make.config
274 echo "DISABLE_CCACHE=1" >> sdks
/Make.config
275 if [[ ${CI_TAGS} == *'cxx'* ]]; then
276 echo "ENABLE_CXX=1" >> sdks
/Make.config
278 if [[ ${CI_TAGS} == *'debug'* ]]; then
279 echo "CONFIGURATION=debug" >> sdks
/Make.config
282 # TODO: provision-android on Windows.
283 if [[ ${CI_TAGS} != *'win-'* ]]; then
284 # For some very strange reasons, `make -C sdks/android accept-android-license` get stuck when invoked through ${TESTCMD}
285 # but doesn't get stuck when called via the shell, so let's just call it here now.
286 ${TESTCMD} --label=provision-android
--timeout=120m
--fatal $gnumake -j ${CI_CPU_COUNT} -C sdks
/builds provision-android
&& $gnumake -C sdks
/android accept-android-license
288 ${TESTCMD} --label=provision-mxe
--timeout=240m
--fatal $gnumake -j ${CI_CPU_COUNT} -C sdks
/builds provision-mxe
290 ${TESTCMD} --label=configure
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds configure-android NINJA
= IGNORE_PROVISION_ANDROID
=1 IGNORE_PROVISION_MXE
=1
291 ${TESTCMD} --label=build
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds build-android NINJA
= IGNORE_PROVISION_ANDROID
=1 IGNORE_PROVISION_MXE
=1
292 ${TESTCMD} --label=archive
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds archive-android NINJA
= IGNORE_PROVISION_ANDROID
=1 IGNORE_PROVISION_MXE
=1
294 if [[ ${CI_TAGS} != *'no-tests'* ]]; then
295 ${TESTCMD} --label=mini
--timeout=20m
$gnumake -C sdks
/android check-Mono.Runtime.Tests
296 ${TESTCMD} --label=corlib
--timeout=20m
$gnumake -C sdks
/android check-corlib
297 ${TESTCMD} --label=System
--timeout=20m
$gnumake -C sdks
/android check-System
298 ${TESTCMD} --label=System.Core
--timeout=20m
$gnumake -C sdks
/android check-System.Core
299 ${TESTCMD} --label=System.Data
--timeout=20m
$gnumake -C sdks
/android check-System.Data
300 ${TESTCMD} --label=System.IO.Compression.FileSystem
--timeout=20m
$gnumake -C sdks
/android check-System.IO.Compression.FileSystem
301 ${TESTCMD} --label=System.IO.Compression
--timeout=20m
$gnumake -C sdks
/android check-System.IO.Compression
302 ${TESTCMD} --label=System.Json
--timeout=20m
$gnumake -C sdks
/android check-System.Json
303 ${TESTCMD} --label=System.Net.Http
--timeout=20m
$gnumake -C sdks
/android check-System.Net.Http
304 ${TESTCMD} --label=System.Numerics
--timeout=20m
$gnumake -C sdks
/android check-System.Numerics
305 ${TESTCMD} --label=System.Runtime.Serialization
--timeout=20m
$gnumake -C sdks
/android check-System.Runtime.Serialization
306 ${TESTCMD} --label=System.ServiceModel.Web
--timeout=20m
$gnumake -C sdks
/android check-System.ServiceModel.Web
307 ${TESTCMD} --label=System.Transactions
--timeout=20m
$gnumake -C sdks
/android check-System.Transactions
308 ${TESTCMD} --label=System.Xml
--timeout=20m
$gnumake -C sdks
/android check-System.Xml
309 ${TESTCMD} --label=System.Xml.Linq
--timeout=20m
$gnumake -C sdks
/android check-System.Xml.Linq
310 ${TESTCMD} --label=Mono.CSharp
--timeout=20m
$gnumake -C sdks
/android check-Mono.CSharp
311 # ${TESTCMD} --label=Mono.Data.Sqlite --timeout=20m $gnumake -C sdks/android check-Mono.Data.Sqlite
312 ${TESTCMD} --label=Mono.Data.Tds
--timeout=20m
$gnumake -C sdks
/android check-Mono.Data.Tds
313 ${TESTCMD} --label=Mono.Security
--timeout=20m
$gnumake -C sdks
/android check-Mono.Security
314 ${TESTCMD} --label=Mono.Debugger.Soft
--timeout=20m
$gnumake -C sdks
/android check-Mono.Debugger.Soft
319 if [[ ${CI_TAGS} == *'webassembly'* ]] ||
[[ ${CI_TAGS} == *'wasm'* ]];
321 echo "ENABLE_WASM=1" > sdks
/Make.config
323 if [[ ${CI_TAGS} != *'osx-amd64'* ]]; then
324 echo "ENABLE_WINDOWS=1" >> sdks
/Make.config
325 #echo "ENABLE_WASM_DYNAMIC_RUNTIME=1" >> sdks/Make.config
328 if [[ ${CI_TAGS} == *'cxx'* ]]; then
329 echo "ENABLE_CXX=1" >> sdks
/Make.config
331 if [[ ${CI_TAGS} == *'debug'* ]]; then
332 echo "CONFIGURATION=debug" >> sdks
/Make.config
335 echo "ENABLE_WASM_THREADS=1" >> sdks
/Make.config
336 #echo "ENABLE_WASM_NETCORE=1" >> sdks/Make.config
338 export aot_test_suites
="System.Core"
339 export mixed_test_suites
="System.Core"
340 export xunit_test_suites
="System.Core corlib System Microsoft.CSharp System.Data System.IO.Compression System.Net.Http.UnitTests System.Numerics System.Runtime.Serialization System.Security System.Xml System.Xml.Linq"
342 ${TESTCMD} --label=provision
--timeout=20m
--fatal $gnumake --output-sync=recurse
--trace -C sdks
/builds provision-wasm
344 ${TESTCMD} --label=configure
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds configure-wasm NINJA
=
345 ${TESTCMD} --label=build
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds build-wasm NINJA
=
346 ${TESTCMD} --label=archive
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds archive-wasm NINJA
=
348 ${TESTCMD} --label=wasm-build
--timeout=20m
--fatal $gnumake -j ${CI_CPU_COUNT} -C sdks
/wasm build
349 ${TESTCMD} --label=package
--timeout=20m
$gnumake -C sdks
/wasm package
351 if [[ ${CI_TAGS} != *'no-tests'* ]]; then
352 ${TESTCMD} --label=mini
--timeout=20m
$gnumake -C sdks
/wasm run-all-mini
353 ${TESTCMD} --label=v8-corlib
--timeout=20m
$gnu$gnumake -C sdks
/wasm run-v8-corlib
354 ${TESTCMD} --label=debugger
--timeout=40m
$gnumake -C sdks
/wasm run-debugger-tests
355 ${TESTCMD} --label=mini-system
--timeout=60m
$gnu$gnumake -C sdks
/wasm run-all-System
356 ${TESTCMD} --label=system-core
--timeout=60m
$gnumake -C sdks
/wasm run-all-System.Core
357 for suite
in ${xunit_test_suites}; do ${TESTCMD} --label=xunit-${suite} --timeout=30m $gnumake -C sdks/wasm run-${suite}-xunit; done
358 # disable for now until https://github.com/mono/mono/pull/13622 goes in
359 ${TESTCMD} --label=browser
--timeout=20m
$gnumake -C sdks
/wasm run-browser-tests
360 ${TESTCMD} --label=browser-threads
--timeout=20m
$gnumake -C sdks
/wasm run-browser-threads-tests
361 #${TESTCMD} --label=browser-dynamic --timeout=20m $gnumake -C sdks/wasm run-browser-dynamic-tests
362 if [[ ${CI_TAGS} == *'osx-amd64'* ]]; then
363 ${TESTCMD} --label=browser-safari
--timeout=20m
$gnumake -C sdks
/wasm run-browser-safari-tests
365 ${TESTCMD} --label=aot-mini
--timeout=20m
$gnumake -j ${CI_CPU_COUNT} -C sdks
/wasm run-aot-mini
366 ${TESTCMD} --label=build-aot-all
--timeout=20m
$gnumake -j ${CI_CPU_COUNT} -C sdks
/wasm build-aot-all
367 for suite
in ${aot_test_suites}; do ${TESTCMD} --label=run-aot-${suite} --timeout=10m $gnumake -C sdks/wasm run-aot-${suite}; done
368 for suite
in ${mixed_test_suites}; do ${TESTCMD} --label=run-aot-mixed-${suite} --timeout=10m $gnumake -C sdks/wasm run-aot-mixed-${suite}; done
369 # Requires a net 3.0 sdk
370 #${TESTCMD} --label=netcore --timeout=20m $gnumake -j ${CI_CPU_COUNT} -C sdks/wasm run-hello-netcore
371 #${TESTCMD} --label=check-aot --timeout=20m $gnumake -C sdks/wasm check-aot
377 if [[ ${CI_TAGS} != *'mac-sdk'* ]]; # Mac SDK builds Mono itself
379 echo .
/autogen.sh CFLAGS
="$CFLAGS $EXTRA_CFLAGS" CXXFLAGS
="$CXXFLAGS $EXTRA_CXXFLAGS" LDFLAGS
="$LDFLAGS $EXTRA_LDFLAGS" $EXTRA_CONF_FLAGS
380 ${TESTCMD} --label=configure
--timeout=60m
--fatal .
/autogen.sh CFLAGS
="$CFLAGS $EXTRA_CFLAGS" CXXFLAGS
="$CXXFLAGS $EXTRA_CXXFLAGS" LDFLAGS
="$LDFLAGS $EXTRA_LDFLAGS" $EXTRA_CONF_FLAGS
382 if [[ ${CI_TAGS} == *'win-i386'* ]];
384 # only build boehm on w32 (only windows platform supporting boehm).
385 ${TESTCMD} --label=make-msvc --timeout=60m --fatal ./msvc/run-msbuild.sh "build" "${PLATFORM}" "release" "boehm" "/p:PlatformToolset=v140 ${MSBUILD_CXX}"
387 if [[ ${CI_TAGS} == *'win-'* ]];
389 ${TESTCMD} --label=make-msvc-sgen --timeout=60m --fatal ./msvc/run-msbuild.sh "build" "${PLATFORM}" "release" "sgen" "/p:PlatformToolset=v140 ${MSBUILD_CXX}"
392 if [[ ${CI_TAGS} == *'win-amd64'* ]];
394 # The AOT compiler on Windows requires Visual Studio's clang.exe and link.exe.
395 # Depending on codegen (JIT/LLVM) it might also need platform specific libraries.
396 # Use a wrapper script that will make sure to setup full VS MSVC environment if
397 # needed when running mono-sgen.exe as AOT compiler.
398 export MONO_EXECUTABLE_WRAPPER
="${MONO_REPO_ROOT}/msvc/build/sgen/x64/bin/Release/mono-sgen-msvc.sh"
401 if [[ ${CI_TAGS} == *'monolite'* ]]; then make get-monolite-latest
; fi
403 make_parallelism
="-j ${CI_CPU_COUNT}"
404 if [[ ${CI_TAGS} == *'linux-ppc64el'* ]]; then make_parallelism
=-j1; fi
407 if [[ ${CI_TAGS} == *'checked-all'* ]]; then make_continue
=-k; fi
409 if [[ ${CI_TAGS} != *'mac-sdk'* ]]; # Mac SDK builds Mono itself
412 ${TESTCMD} --label=make --timeout=${make_timeout} --fatal make ${make_parallelism} ${make_continue} -w V
=1 || build_error
=1
413 helix_send_build_done_event
"build/source/$MONO_HELIX_TYPE/" $build_error
415 if [[ ${build_error} != 0 ]]; then
416 echo "ERROR: The Mono build failed."
417 ${MONO_REPO_ROOT}/scripts
/ci
/run-upload-sentry.sh
422 if [[ ${CI_TAGS} == *'checked-coop'* ]]; then export MONO_CHECK_MODE
=gc
,thread
; fi
423 if [[ ${CI_TAGS} == *'checked-all'* ]]; then export MONO_CHECK_MODE
=all
; fi
425 if [[ ${CI_TAGS} == *'hardened-runtime'* ]]; then codesign -s - -fv -o runtime --entitlements ${MONO_REPO_ROOT}/mono/mini/mac-entitlements.plist ${MONO_REPO_ROOT}/mono
/mini
/mono-sgen
; fi
427 export MONO_ENV_OPTIONS
="$MONO_ENV_OPTIONS $MONO_TEST_ENV_OPTIONS"
429 if [[ ${CI_TAGS} == *'acceptance-tests'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-acceptance-tests.sh
;
430 elif [[ ${CI_TAGS} == *'microbench'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-microbench.sh
;
431 elif [[ ${CI_TAGS} == *'profiler-stress-tests'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-profiler-stress-tests.sh
;
432 elif [[ ${CI_TAGS} == *'stress-tests'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-stress-tests.sh
;
433 elif [[ ${CI_TAGS} == *'interpreter'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-interpreter.sh
;
434 elif [[ ${CI_TAGS} == *'mcs-compiler'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-mcs.sh
;
435 elif [[ ${CI_TAGS} == *'mac-sdk'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-mac-sdk.sh
;
436 elif [[ ${CI_TAGS} == *'helix-tests'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-helix.sh
;
437 elif [[ ${CI_TAGS} == *'compile-msbuild-source'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-msbuild.sh
;
438 elif [[ ${CI_TAGS} == *'make-install'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-make-install.sh
;
439 elif [[ ${CI_TAGS} == *'compiler-server-tests'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-compiler-server.sh
;
440 elif [[ ${CI_TAGS} == *'no-tests'* ]]; then echo "Skipping tests.";
444 if [[ $CI_TAGS == *'apidiff'* ]]; then
445 if ${TESTCMD} --label=apidiff
--timeout=15m
--fatal make -w -C mcs
-j ${CI_CPU_COUNT} mono-api-diff
446 then report_github_status
"success" "API Diff" "No public API changes found." || true
447 else report_github_status
"error" "API Diff" "The public API changed." "$BUILD_URL/Public_20API_20Diff/" || true
450 if [[ $CI_TAGS == *'csprojdiff'* ]]; then
451 make update-solution-files
452 if ${TESTCMD} --label=csprojdiff
--timeout=5m
--fatal make -w -C mcs mono-csproj-diff
453 then report_github_status
"success" "Project Files Diff" "No csproj file changes found." || true
454 else report_github_status
"error" "Project Files Diff" "The csproj files changed." "$BUILD_URL/Project_20Files_20Diff/" || true