break
// editor brace matching: }
case 'x86': // editor brace matching: {
- assert (os == 'Windows_NT')
+ assert ((os == 'Windows_NT') || ((os == 'Ubuntu') && (scenario == 'default')))
+ if (os == 'Ubuntu') {
+ // on-demand only for ubuntu x86
+ Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build",
+ "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}.*")
+ break
+ }
switch (scenario) {
case 'default':
if (configuration == 'Checked') {
arch = 'x86'
}
+ if (architecture == 'x86' && os == 'Ubuntu') {
+ // build only, not test yet
+ buildCommands += "./tests/scripts/x86_ci_script.sh --buildConfig=${lowerConfiguration}"
+ break;
+ }
+
if (scenario == 'formatting') {
buildCommands += "python tests/scripts/format.py -c \${WORKSPACE} -o Linux -a ${arch}"
Utilities.addArchival(newJob, "format.patch", "", true, false)
}
break
case 'x86':
+ if ((os != 'Ubuntu') && (os != 'Windows_NT')) {
+ return
+ }
+ break
case 'x86compatjit':
// Skip non-windows
if (os != 'Windows_NT') {
break
case 'x64':
case 'x86':
- // Everything implemented
+ // x86 ubuntu: default only
+ if ((os == 'Ubuntu') && (architecture == 'x86')) {
+ return
+ }
+ // Windows: Everything implemented
break
case 'x86compatjit':
// No stress modes for compatjit.dll.
--- /dev/null
+#!/bin/bash
+
+#Parse command line arguments
+__buildConfig=
+for arg in "$@"
+do
+ case $arg in
+ --buildConfig=*)
+ __buildConfig="$(echo ${arg#*=} | awk '{print tolower($0)}')"
+ if [[ "$__buildConfig" != "debug" && "$__buildConfig" != "release" && "$__buildConfig" != "checked" ]]; then
+ exit_with_error "--buildConfig can be only Debug or Release" true
+ fi
+ ;;
+ *)
+ ;;
+ esac
+done
+
+#Check if there are any uncommited changes in the source directory as git adds and removes patches
+if [[ $(git status -s) != "" ]]; then
+ echo 'ERROR: There are some uncommited changes. To avoid losing these changes commit them and try again.'
+ echo ''
+ git status
+ exit 1
+fi
+
+#Change build configuration to the capitalized form to create build product paths correctly
+if [[ "$__buildConfig" == "release" ]]; then
+ __buildConfig="Release"
+elif [[ "$__buildConfig" == "checked" ]]; then
+ __buildConfig="Checked"
+else
+ __buildConfig="Debug"
+fi
+__buildDirName="$__buildOS.$__buildArch.$__buildConfig"
+
+set -x
+set -e
+
+__currentWorkingDir=`pwd`
+__dockerImage=" microsoft/dotnet-buildtools-prereqs:ubuntu1604_cross_prereqs_v3"
+__dockerCmd="sudo docker run --privileged -i --rm -v $__currentWorkingDir:/opt/code -w /opt/code $__dockerImage"
+
+# make rootfs for x86
+__buildRootfsCmd="./cross/build-rootfs.sh x86 xenial --skipunmount"
+(set +x; echo "Build RootFS for x86 xenial")
+$__dockerCmd $__buildRootfsCmd
+sudo chown -R $(id -u -n) cross/rootfs/
+
+# Begin cross build
+# We cannot build nuget package yet
+__buildCmd="./build.sh x86 cross skiptests skipnuget $__buildConfig"
+$__dockerCmd $__buildCmd
+sudo chown -R $(id -u -n) bin/
+
+
+(set +x; echo 'Build complete')