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 a
/netcore 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-loadedllvm --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} == *'xcode112b2'* ]]; then
179 export XCODE_DIR
=/Applications
/Xcode112b2.app
/Contents
/Developer
180 export MACOS_VERSION
=10.15
181 export IOS_VERSION
=13.0
182 export TVOS_VERSION
=13.0
183 export WATCHOS_VERSION
=6.0
184 export WATCHOS64_32_VERSION
=6.0
185 if [[ ${CI_TAGS} == *'xcode111'* ]]; then
186 export XCODE_DIR
=/Applications
/Xcode111.app
/Contents
/Developer
187 export MACOS_VERSION
=10.15
188 export IOS_VERSION
=13.0
189 export TVOS_VERSION
=13.0
190 export WATCHOS_VERSION
=6.0
191 export WATCHOS64_32_VERSION
=6.0
193 echo "Error: no Xcode selected in CI_TAGS env var."
197 # retrieve selected Xcode version
198 /usr
/libexec
/PlistBuddy
-c 'Print :ProductBuildVersion' ${XCODE_DIR}/..
/version.plist
> xcode_version.txt
200 # make sure we embed the correct path into the PDBs
201 export MONOTOUCH_MCS_FLAGS
=-pathmap:${MONO_REPO_ROOT}/=/Library
/Frameworks
/Xamarin.iOS.framework
/Versions
/Current
/src
/Xamarin.iOS
/
203 echo "ENABLE_IOS=1" > sdks
/Make.config
204 echo "ENABLE_MAC=1" >> sdks
/Make.config
205 if [[ ${CI_TAGS} == *'cxx'* ]]; then
206 echo "ENABLE_CXX=1" >> sdks
/Make.config
208 if [[ ${CI_TAGS} == *'debug'* ]]; then
209 echo "CONFIGURATION=debug" >> sdks
/Make.config
212 export device_test_suites
="Mono.Runtime.Tests System.Core"
214 ${TESTCMD} --label=configure
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds configure-ios NINJA
=
215 ${TESTCMD} --label=build
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds build-ios NINJA
=
216 ${TESTCMD} --label=archive
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds archive-ios NINJA
=
218 if [[ ${CI_TAGS} != *'no-tests'* ]]; then
219 ${TESTCMD} --label=run-sim
--timeout=20m
$gnumake -C sdks
/ios run-ios-sim-all
220 ${TESTCMD} --label=build-ios-dev
--timeout=60m
$gnumake -C sdks
/ios build-ios-dev-all
221 if [[ ${CI_TAGS} == *'run-device-tests'* ]]; then
222 for suite
in ${device_test_suites}; do ${TESTCMD} --label=run-ios-dev-${suite} --timeout=10m $gnumake -C sdks/ios run-ios-dev-${suite}; done
224 ${TESTCMD} --label=build-ios-dev-llvm
--timeout=60m
$gnumake -C sdks
/ios build-ios-dev-llvm-all
225 if [[ ${CI_TAGS} == *'run-device-tests'* ]]; then
226 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
228 ${TESTCMD} --label=build-ios-dev-interp-only
--timeout=60m
$gnumake -C sdks
/ios build-ios-dev-interp-only-all
229 if [[ ${CI_TAGS} == *'run-device-tests'* ]]; then
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 if [[ ${CI_TAGS} == *'run-device-tests'* ]]; then
234 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
240 if [[ ${CI_TAGS} == *'sdks-mac'* ]];
242 # configuration on our bots
243 if [[ ${CI_TAGS} == *'xcode112b2'* ]]; then
244 export XCODE_DIR
=/Applications
/Xcode112b2.app
/Contents
/Developer
245 export MACOS_VERSION
=10.15
246 if [[ ${CI_TAGS} == *'xcode111'* ]]; then
247 export XCODE_DIR
=/Applications
/Xcode111.app
/Contents
/Developer
248 export MACOS_VERSION
=10.15
250 echo "Error: no Xcode selected in CI_TAGS env var."
254 # retrieve selected Xcode version
255 /usr
/libexec
/PlistBuddy
-c 'Print :ProductBuildVersion' ${XCODE_DIR}/..
/version.plist
> xcode_version.txt
257 # make sure we embed the correct path into the PDBs
258 export XAMMAC_MCS_FLAGS
=-pathmap:${MONO_REPO_ROOT}/=/Library
/Frameworks
/Xamarin.Mac.framework
/Versions
/Current
/src
/Xamarin.Mac
/
260 echo "ENABLE_MAC=1" > sdks
/Make.config
261 if [[ ${CI_TAGS} == *'cxx'* ]]; then
262 echo "ENABLE_CXX=1" >> sdks
/Make.config
264 if [[ ${CI_TAGS} == *'debug'* ]]; then
265 echo "CONFIGURATION=debug" >> sdks
/Make.config
268 ${TESTCMD} --label=configure
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds configure-mac NINJA
=
269 ${TESTCMD} --label=build
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds build-mac NINJA
=
270 ${TESTCMD} --label=archive
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds archive-mac NINJA
=
275 if [[ ${CI_TAGS} == *'sdks-android'* ]];
277 echo "ENABLE_ANDROID=1" > sdks
/Make.config
278 echo "DISABLE_CCACHE=1" >> sdks
/Make.config
279 if [[ ${CI_TAGS} == *'cxx'* ]]; then
280 echo "ENABLE_CXX=1" >> sdks
/Make.config
282 if [[ ${CI_TAGS} == *'debug'* ]]; then
283 echo "CONFIGURATION=debug" >> sdks
/Make.config
286 # TODO: provision-android on Windows.
287 if [[ ${CI_TAGS} != *'win-'* ]]; then
288 # For some very strange reasons, `make -C sdks/android accept-android-license` get stuck when invoked through ${TESTCMD}
289 # but doesn't get stuck when called via the shell, so let's just call it here now.
290 ${TESTCMD} --label=provision-android
--timeout=120m
--fatal $gnumake -j ${CI_CPU_COUNT} -C sdks
/builds provision-android
&& $gnumake -C sdks
/android accept-android-license
292 ${TESTCMD} --label=provision-mxe
--timeout=240m
--fatal $gnumake -j ${CI_CPU_COUNT} -C sdks
/builds provision-mxe
294 ${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
295 ${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
296 ${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
298 if [[ ${CI_TAGS} != *'no-tests'* ]]; then
299 ${TESTCMD} --label=mini
--timeout=20m
$gnumake -C sdks
/android check-Mono.Runtime.Tests
300 ${TESTCMD} --label=corlib
--timeout=20m
$gnumake -C sdks
/android check-corlib
301 ${TESTCMD} --label=System
--timeout=20m
$gnumake -C sdks
/android check-System
302 ${TESTCMD} --label=System.Core
--timeout=20m
$gnumake -C sdks
/android check-System.Core
303 ${TESTCMD} --label=System.Data
--timeout=20m
$gnumake -C sdks
/android check-System.Data
304 ${TESTCMD} --label=System.IO.Compression.FileSystem
--timeout=20m
$gnumake -C sdks
/android check-System.IO.Compression.FileSystem
305 ${TESTCMD} --label=System.IO.Compression
--timeout=20m
$gnumake -C sdks
/android check-System.IO.Compression
306 ${TESTCMD} --label=System.Json
--timeout=20m
$gnumake -C sdks
/android check-System.Json
307 ${TESTCMD} --label=System.Net.Http
--timeout=20m
$gnumake -C sdks
/android check-System.Net.Http
308 ${TESTCMD} --label=System.Numerics
--timeout=20m
$gnumake -C sdks
/android check-System.Numerics
309 ${TESTCMD} --label=System.Runtime.Serialization
--timeout=20m
$gnumake -C sdks
/android check-System.Runtime.Serialization
310 ${TESTCMD} --label=System.ServiceModel.Web
--timeout=20m
$gnumake -C sdks
/android check-System.ServiceModel.Web
311 ${TESTCMD} --label=System.Transactions
--timeout=20m
$gnumake -C sdks
/android check-System.Transactions
312 ${TESTCMD} --label=System.Xml
--timeout=20m
$gnumake -C sdks
/android check-System.Xml
313 ${TESTCMD} --label=System.Xml.Linq
--timeout=20m
$gnumake -C sdks
/android check-System.Xml.Linq
314 ${TESTCMD} --label=Mono.CSharp
--timeout=20m
$gnumake -C sdks
/android check-Mono.CSharp
315 # ${TESTCMD} --label=Mono.Data.Sqlite --timeout=20m $gnumake -C sdks/android check-Mono.Data.Sqlite
316 ${TESTCMD} --label=Mono.Data.Tds
--timeout=20m
$gnumake -C sdks
/android check-Mono.Data.Tds
317 ${TESTCMD} --label=Mono.Security
--timeout=20m
$gnumake -C sdks
/android check-Mono.Security
318 ${TESTCMD} --label=Mono.Debugger.Soft
--timeout=20m
$gnumake -C sdks
/android check-Mono.Debugger.Soft
323 if [[ ${CI_TAGS} == *'webassembly'* ]] ||
[[ ${CI_TAGS} == *'wasm'* ]];
325 echo "ENABLE_WASM=1" > sdks
/Make.config
326 echo "ENABLE_WINDOWS=1" >> sdks
/Make.config
327 if [[ ${CI_TAGS} == *'cxx'* ]]; then
328 echo "ENABLE_CXX=1" >> sdks
/Make.config
330 if [[ ${CI_TAGS} == *'debug'* ]]; then
331 echo "CONFIGURATION=debug" >> sdks
/Make.config
333 echo "ENABLE_WASM_DYNAMIC_RUNTIME=1" >> sdks
/Make.config
334 #echo "ENABLE_WASM_THREADS=1" >> sdks/Make.config
336 export aot_test_suites
="System.Core"
337 export mixed_test_suites
="System.Core"
338 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"
340 ${TESTCMD} --label=provision
--timeout=20m
--fatal $gnumake --output-sync=recurse
--trace -C sdks
/builds provision-wasm
342 ${TESTCMD} --label=configure
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds configure-wasm NINJA
=
343 ${TESTCMD} --label=build
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds build-wasm NINJA
=
344 ${TESTCMD} --label=archive
--timeout=180m
--fatal $gnumake -j ${CI_CPU_COUNT} --output-sync=recurse
--trace -C sdks
/builds archive-wasm NINJA
=
346 if [[ ${CI_TAGS} != *'no-tests'* ]]; then
347 ${TESTCMD} --label=wasm-build
--timeout=20m
--fatal $gnumake -j ${CI_CPU_COUNT} -C sdks
/wasm build
348 ${TESTCMD} --label=mini
--timeout=20m
$gnumake -C sdks
/wasm run-all-mini
349 ${TESTCMD} --label=v8-corlib
--timeout=20m
$gnu$gnumake -C sdks
/wasm run-v8-corlib
350 #The following tests are not passing yet, so enabling them would make us perma-red
351 #${TESTCMD} --label=mini-system --timeout=20m $gnu$gnumake -C sdks/wasm run-all-system
352 ${TESTCMD} --label=system-core
--timeout=20m
$gnumake -C sdks
/wasm run-all-System.Core
353 for suite
in ${xunit_test_suites}; do ${TESTCMD} --label=xunit-${suite} --timeout=30m $gnumake -C sdks/wasm run-${suite}-xunit; done
354 # disable for now until https://github.com/mono/mono/pull/13622 goes in
355 #${TESTCMD} --label=debugger --timeout=20m $gnumake -C sdks/wasm test-debugger
356 ${TESTCMD} --label=browser
--timeout=20m
$gnumake -C sdks
/wasm run-browser-tests
357 #${TESTCMD} --label=browser-threads --timeout=20m $gnumake -C sdks/wasm run-browser-threads-tests
358 ${TESTCMD} --label=aot-mini
--timeout=20m
$gnumake -j ${CI_CPU_COUNT} -C sdks
/wasm run-aot-mini
359 ${TESTCMD} --label=build-aot-all
--timeout=20m
$gnumake -j ${CI_CPU_COUNT} -C sdks
/wasm build-aot-all
360 for suite
in ${aot_test_suites}; do ${TESTCMD} --label=run-aot-${suite} --timeout=10m $gnumake -C sdks/wasm run-aot-${suite}; done
361 for suite
in ${mixed_test_suites}; do ${TESTCMD} --label=run-aot-mixed-${suite} --timeout=10m $gnumake -C sdks/wasm run-aot-mixed-${suite}; done
362 #${TESTCMD} --label=check-aot --timeout=20m $gnumake -C sdks/wasm check-aot
363 ${TESTCMD} --label=package
--timeout=20m
$gnumake -C sdks
/wasm package
369 if [[ ${CI_TAGS} != *'mac-sdk'* ]]; # Mac SDK builds Mono itself
371 echo .
/autogen.sh CFLAGS
="$CFLAGS $EXTRA_CFLAGS" CXXFLAGS
="$CXXFLAGS $EXTRA_CXXFLAGS" LDFLAGS
="$LDFLAGS $EXTRA_LDFLAGS" $EXTRA_CONF_FLAGS
372 ${TESTCMD} --label=configure
--timeout=60m
--fatal .
/autogen.sh CFLAGS
="$CFLAGS $EXTRA_CFLAGS" CXXFLAGS
="$CXXFLAGS $EXTRA_CXXFLAGS" LDFLAGS
="$LDFLAGS $EXTRA_LDFLAGS" $EXTRA_CONF_FLAGS
374 if [[ ${CI_TAGS} == *'win-i386'* ]];
376 # only build boehm on w32 (only windows platform supporting boehm).
377 ${TESTCMD} --label=make-msvc --timeout=60m --fatal ./msvc/run-msbuild.sh "build" "${PLATFORM}" "release" "/p:PlatformToolset=v140 /p:MONO_TARGET_GC=boehm ${MSBUILD_CXX}"
379 if [[ ${CI_TAGS} == *'win-'* ]];
381 ${TESTCMD} --label=make-msvc-sgen --timeout=60m --fatal ./msvc/run-msbuild.sh "build" "${PLATFORM}" "release" "/p:PlatformToolset=v140 /p:MONO_TARGET_GC=sgen ${MSBUILD_CXX}"
384 if [[ ${CI_TAGS} == *'win-amd64'* ]];
386 # The AOT compiler on Windows requires Visual Studio's clang.exe and link.exe.
387 # Depending on codegen (JIT/LLVM) it might also need platform specific libraries.
388 # Use a wrapper script that will make sure to setup full VS MSVC environment if
389 # needed when running mono-sgen.exe as AOT compiler.
390 export MONO_EXECUTABLE_WRAPPER
="${MONO_REPO_ROOT}/msvc/build/sgen/x64/bin/Release/mono-sgen-msvc.sh"
393 if [[ ${CI_TAGS} == *'monolite'* ]]; then make get-monolite-latest
; fi
395 make_parallelism
="-j ${CI_CPU_COUNT}"
396 if [[ ${CI_TAGS} == *'linux-ppc64el'* ]]; then make_parallelism
=-j1; fi
399 if [[ ${CI_TAGS} == *'checked-all'* ]]; then make_continue
=-k; fi
401 if [[ ${CI_TAGS} != *'mac-sdk'* ]]; # Mac SDK builds Mono itself
404 ${TESTCMD} --label=make --timeout=${make_timeout} --fatal make ${make_parallelism} ${make_continue} -w V
=1 || build_error
=1
405 helix_send_build_done_event
"build/source/$MONO_HELIX_TYPE/" $build_error
407 if [[ ${build_error} != 0 ]]; then
408 echo "ERROR: The Mono build failed."
409 ${MONO_REPO_ROOT}/scripts
/ci
/run-upload-sentry.sh
414 if [[ ${CI_TAGS} == *'checked-coop'* ]]; then export MONO_CHECK_MODE
=gc
,thread
; fi
415 if [[ ${CI_TAGS} == *'checked-all'* ]]; then export MONO_CHECK_MODE
=all
; fi
417 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
419 export MONO_ENV_OPTIONS
="$MONO_ENV_OPTIONS $MONO_TEST_ENV_OPTIONS"
421 if [[ ${CI_TAGS} == *'acceptance-tests'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-acceptance-tests.sh
;
422 elif [[ ${CI_TAGS} == *'microbench'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-microbench.sh
;
423 elif [[ ${CI_TAGS} == *'profiler-stress-tests'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-profiler-stress-tests.sh
;
424 elif [[ ${CI_TAGS} == *'stress-tests'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-stress-tests.sh
;
425 elif [[ ${CI_TAGS} == *'interpreter'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-interpreter.sh
;
426 elif [[ ${CI_TAGS} == *'mcs-compiler'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-mcs.sh
;
427 elif [[ ${CI_TAGS} == *'mac-sdk'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-mac-sdk.sh
;
428 elif [[ ${CI_TAGS} == *'helix-tests'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-helix.sh
;
429 elif [[ ${CI_TAGS} == *'compile-msbuild-source'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-msbuild.sh
;
430 elif [[ ${CI_TAGS} == *'make-install'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-make-install.sh
;
431 elif [[ ${CI_TAGS} == *'compiler-server-tests'* ]]; then ${MONO_REPO_ROOT}/scripts
/ci
/run-test-compiler-server.sh
;
432 elif [[ ${CI_TAGS} == *'no-tests'* ]]; then echo "Skipping tests.";
436 if [[ $CI_TAGS == *'apidiff'* ]]; then
437 if ${TESTCMD} --label=apidiff
--timeout=15m
--fatal make -w -C mcs
-j ${CI_CPU_COUNT} mono-api-diff
438 then report_github_status
"success" "API Diff" "No public API changes found." || true
439 else report_github_status
"error" "API Diff" "The public API changed." "$BUILD_URL/Public_20API_20Diff/" || true
442 if [[ $CI_TAGS == *'csprojdiff'* ]]; then
443 make update-solution-files
444 if ${TESTCMD} --label=csprojdiff
--timeout=5m
--fatal make -w -C mcs mono-csproj-diff
445 then report_github_status
"success" "Project Files Diff" "No csproj file changes found." || true
446 else report_github_status
"error" "Project Files Diff" "The csproj files changed." "$BUILD_URL/Project_20Files_20Diff/" || true