зеркало из https://github.com/mono/corefx.git
Changing dev workflow scripts to use the Run Command Tool (#10231)
Changes to dev workflow scripts to use run command tool.
This commit is contained in:
Родитель
a6e95d3db3
Коммит
7e2bd07936
|
@ -53,7 +53,7 @@ function UpdateValidDependencyVersionsFile
|
|||
# Updates all the project.json files with out of date version numbers
|
||||
function RunUpdatePackageDependencyVersions
|
||||
{
|
||||
cmd /c $PSScriptRoot\build.cmd managed /t:UpdateInvalidPackageVersions | Out-Host
|
||||
cmd /c $PSScriptRoot\build-managed.cmd -UpdateInvalidPackageVersions | Out-Host
|
||||
|
||||
return $LASTEXITCODE -eq 0
|
||||
}
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
@call %~dp0run.cmd build-managed -nodoReuse -binclashWindows %*
|
||||
@exit /b %ERRORLEVEL%
|
|
@ -0,0 +1,61 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Usage: $0 [platform] [useservergc]"
|
||||
echo
|
||||
echo "platform can be: FreeBSD, Linux, NetBSD, OSX, Windows."
|
||||
echo "useservergc - Switch used by configure the hosted coreclr instance when executing tests."
|
||||
echo
|
||||
}
|
||||
|
||||
|
||||
__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
|
||||
|
||||
__UnprocessedBuildArgs=
|
||||
__TestNugetRuntimeId=-distroRid
|
||||
__BuildOS=-os
|
||||
__TargetOS=-target-os
|
||||
__ServerGC=0
|
||||
|
||||
while :; do
|
||||
if [ $# -le 0 ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
freebsd)
|
||||
__TestNugetRuntimeId="$__TestNugetRuntimeId=osx.10.10-x64"
|
||||
__BuildOS="$__BuildOS=freebsd"
|
||||
__TargetOS="$__TargetOS=freebsd"
|
||||
;;
|
||||
netbsd)
|
||||
__TestNugetRuntimeId="$__TestNugetRuntimeId=osx.10.10-x64"
|
||||
__BuildOS="$__BuildOS=netbsd"
|
||||
__TargetOS="$__TargetOS=netbsd"
|
||||
;;
|
||||
osx)
|
||||
__TestNugetRuntimeId="$__TestNugetRuntimeId=osx.10.10-x64"
|
||||
__BuildOS="$__BuildOS=osx"
|
||||
__TargetOS="$__TargetOS=osx"
|
||||
;;
|
||||
windows)
|
||||
__TestNugetRuntimeId="$__TestNugetRuntimeId=win7-x64"
|
||||
__BuildOS="$__BuildOS=windows_nt"
|
||||
__TargetOS="$__TargetOS=Windows_NT"
|
||||
;;
|
||||
useservergc)
|
||||
__ServerGC=1
|
||||
;;
|
||||
*)
|
||||
__UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
export CORECLR_SERVER_GC="$__ServerGC"
|
||||
|
||||
$__scriptpath/run.sh build-managed -binclashUnix $__BuildOS $__TargetOS $__TestNugetRuntimeId $__UnprocessedBuildArgs
|
||||
exit $?
|
|
@ -0,0 +1,2 @@
|
|||
@call %~dp0run.cmd build-native %*
|
||||
@exit /b %ERRORLEVEL%
|
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
#The Run Command Tool is calling src/Native/build-native.sh
|
||||
$working_tree_root/run.sh build-native $*
|
||||
exit $?
|
|
@ -1,33 +1,2 @@
|
|||
@if "%_echo%" neq "on" echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
set packagesLog=build-packages.log
|
||||
set binclashLoggerDll=%~dp0Tools\net45\Microsoft.DotNet.Build.Tasks.dll
|
||||
set binclashlog=%~dp0binclash.log
|
||||
echo Running build-packages.cmd %* > %packagesLog%
|
||||
|
||||
set options=/nologo /maxcpucount /v:minimal /clp:Summary /nodeReuse:false /flp:v=detailed;Append;LogFile=%packagesLog% /l:BinClashLogger,%binclashLoggerDll%;LogFile=%binclashlog% /p:FilterToOSGroup=Windows_NT
|
||||
set allargs=%*
|
||||
|
||||
if /I [%1] == [/?] goto Usage
|
||||
if /I [%1] == [/help] goto Usage
|
||||
|
||||
REM ensure that msbuild is available
|
||||
echo Running init-tools.cmd
|
||||
call %~dp0init-tools.cmd
|
||||
|
||||
echo msbuild.exe %~dp0src\packages.builds !options! !allargs! >> %packagesLog%
|
||||
call msbuild.exe %~dp0src\packages.builds !options! !allargs!
|
||||
if NOT [%ERRORLEVEL%]==[0] (
|
||||
echo ERROR: An error occurred while building packages, see %packagesLog% for more details.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Done Building Packages.
|
||||
exit /b
|
||||
|
||||
:Usage
|
||||
echo.
|
||||
echo Builds the NuGet packages from the binaries that were built in the Build product binaries step.
|
||||
echo No option parameters.
|
||||
exit /b
|
||||
@call %~dp0run.cmd build-managed -packages -nodoReuse -binclashWindows %*
|
||||
@exit /b %ERRORLEVEL%
|
|
@ -1,75 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Builds the NuGet packages from the binaries that were built in the Build product binaries step."
|
||||
echo "No option parameters."
|
||||
exit 1
|
||||
}
|
||||
|
||||
working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
build_packages_log=$working_tree_root/build-packages.log
|
||||
binclashlog=$working_tree_root/binclash.log
|
||||
binclashloggerdll=$working_tree_root/Tools/Microsoft.DotNet.Build.Tasks.dll
|
||||
RuntimeOS=ubuntu.14.04
|
||||
|
||||
# Use uname to determine what the OS is.
|
||||
OSName=$(uname -s)
|
||||
case $OSName in
|
||||
Darwin)
|
||||
# Darwin version can be three sets of digits (e.g. 10.10.3), we want just the first one
|
||||
DarwinVersion=$(sw_vers -productVersion | awk 'match($0, /[0-9]+/) { print substr($0, RSTART, RLENGTH) }')
|
||||
RuntimeOS=osx.$DarwinVersion
|
||||
;;
|
||||
|
||||
FreeBSD|NetBSD)
|
||||
# TODO this doesn't seem correct
|
||||
RuntimeOS=osx.10
|
||||
;;
|
||||
|
||||
Linux)
|
||||
if [ ! -e /etc/os-release ]; then
|
||||
echo "Cannot determine Linux distribution, assuming Ubuntu 14.04"
|
||||
else
|
||||
source /etc/os-release
|
||||
# for some distros we only need the version major number
|
||||
VersionMajor=$(echo $VERSION_ID | awk 'match($0, /[0-9]+/) { print substr($0, RSTART, RLENGTH) }')
|
||||
if [ "$ID" == "rhel" ]; then
|
||||
RuntimeOS=$ID.$VersionMajor
|
||||
else
|
||||
RuntimeOS=$ID.$VERSION_ID
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unsupported OS '$OSName' detected. Configuring as if for Ubuntu."
|
||||
;;
|
||||
esac
|
||||
|
||||
options="/m /nologo /v:minimal /clp:Summary /flp:v=diagnostic;Append;LogFile=$build_packages_log /l:BinClashLogger,$binclashloggerdll;LogFile=$binclashlog /p:FilterToOSGroup=$RuntimeOS"
|
||||
allargs="$@"
|
||||
|
||||
echo -e "Running build-packages.sh $allargs" > $build_packages_log
|
||||
|
||||
if [ "$allargs" == "-h" ] || [ "$allargs" == "--help" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# Ensure that MSBuild is available
|
||||
echo "Running init-tools.sh"
|
||||
$working_tree_root/init-tools.sh
|
||||
|
||||
echo -e "\n$working_tree_root/Tools/dotnetcli/dotnet $working_tree_root/Tools/MSBuild.exe $working_tree_root/src/packages.builds $options $allargs" >> $build_packages_log
|
||||
$working_tree_root/Tools/dotnetcli/dotnet $working_tree_root/Tools/MSBuild.exe $working_tree_root/src/packages.builds $options $allargs
|
||||
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\nAn error occurred. Aborting build-packages.sh ." >> $build_packages_log
|
||||
echo "ERROR: An error occurred while building packages, see $build_packages_log for more details."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Done building packages."
|
||||
echo -e "\nDone building packages." >> $build_packages_log
|
||||
exit 0
|
||||
$working_tree_root/run.sh build-managed -packages -binclashUnix $*
|
||||
exit $?
|
||||
|
|
|
@ -1,33 +1,2 @@
|
|||
@if "%_echo%" neq "on" echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
set buildTests=build-tests.log
|
||||
set binclashLoggerDll=%~dp0Tools\net45\Microsoft.DotNet.Build.Tasks.dll
|
||||
set binclashlog=%~dp0binclash.log
|
||||
echo Running build-tests.cmd %* > %buildTests%
|
||||
|
||||
set options=/nologo /maxcpucount /v:minimal /clp:Summary /nodeReuse:false /flp:v=detailed;Append;LogFile=%buildTests% /l:BinClashLogger,%binclashLoggerDll%;LogFile=%binclashlog%
|
||||
set allargs=%*
|
||||
|
||||
if /I [%1] == [/?] goto Usage
|
||||
if /I [%1] == [/help] goto Usage
|
||||
|
||||
REM ensure that msbuild is available
|
||||
echo Running init-tools.cmd
|
||||
call %~dp0init-tools.cmd
|
||||
|
||||
echo msbuild.exe %~dp0src\tests.builds !options! !allargs! >> %buildTests%
|
||||
call msbuild.exe %~dp0src\tests.builds !options! !allargs!
|
||||
if NOT [%ERRORLEVEL%]==[0] (
|
||||
echo ERROR: An error occurred while building the tests, see %buildTests% for more details.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Done Building tests.
|
||||
exit /b
|
||||
|
||||
:Usage
|
||||
echo.
|
||||
echo Builds the tests that are in the repository.
|
||||
echo No option parameters.
|
||||
exit /b
|
||||
@call %~dp0run.cmd build-managed -tests -nodoReuse -binclashWindows %*
|
||||
@exit /b %ERRORLEVEL%
|
|
@ -1,40 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Builds the tests that are in the repository."
|
||||
echo "No option parameters."
|
||||
exit 1
|
||||
}
|
||||
|
||||
working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
build_tests_log=$working_tree_root/build-tests.log
|
||||
binclashlog=$working_tree_root/binclash.log
|
||||
binclashloggerdll=$working_tree_root/Tools/Microsoft.DotNet.Build.Tasks.dll
|
||||
|
||||
options="/m /nologo /v:minimal /clp:Summary /flp:v=detailed;Append;LogFile=$build_tests_log /l:BinClashLogger,$binclashloggerdll;LogFile=$binclashlog"
|
||||
allargs="$@"
|
||||
|
||||
echo -e "Running build-tests.sh $allargs" > $build_tests_log
|
||||
|
||||
if [ "$allargs" == "-h" ] || [ "$allargs" == "--help" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# Ensure that MSBuild is available
|
||||
echo "Running init-tools.sh"
|
||||
$working_tree_root/init-tools.sh
|
||||
|
||||
echo -e "\n$working_tree_root/Tools/dotnetcli/dotnet $working_tree_root/Tools/MSBuild.exe $working_tree_root/src/tests.builds $options $allargs" >> $build_tests_log
|
||||
$working_tree_root/Tools/dotnetcli/dotnet $working_tree_root/Tools/MSBuild.exe $working_tree_root/src/tests.builds $options $allargs
|
||||
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\nAn error occurred. Aborting build-tests.sh ." >> $build_tests_log
|
||||
echo "ERROR: An error occurred while building tests, see $build_tests_log for more details."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Done building tests."
|
||||
echo -e "\nDone building tests." >> $build_tests_log
|
||||
exit 0
|
||||
$working_tree_root/run.sh build-managed -tests -binclashUnix $*
|
||||
exit $?
|
||||
|
|
125
build.cmd
125
build.cmd
|
@ -1,111 +1,26 @@
|
|||
@if "%_echo%" neq "on" echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
setlocal
|
||||
|
||||
:: Note: We've disabled node reuse because it causes file locking issues.
|
||||
:: The issue is that we extend the build with our own targets which
|
||||
:: means that that rebuilding cannot successfully delete the task
|
||||
:: assembly.
|
||||
|
||||
:ReadArguments
|
||||
:: Read in the args to determine whether to run the native build, managed build, or both (default)
|
||||
set "__args= %*"
|
||||
set processedArgs=
|
||||
set unprocessedBuildArgs=
|
||||
|
||||
:Loop
|
||||
if [%1]==[] goto Tools
|
||||
|
||||
if /I [%1]==[native] (
|
||||
set __buildSpec=native
|
||||
set processedArgs=!processedArgs! %1
|
||||
goto Next
|
||||
)
|
||||
|
||||
if /I [%1] == [managed] (
|
||||
set __buildSpec=managed
|
||||
set processedArgs=!processedArgs! %1
|
||||
goto Next
|
||||
)
|
||||
|
||||
if [!processedArgs!]==[] (
|
||||
call set unprocessedBuildArgs=!__args!
|
||||
) else (
|
||||
call set unprocessedBuildArgs=%%__args:*!processedArgs!=%%
|
||||
)
|
||||
|
||||
:Next
|
||||
shift /1
|
||||
goto Loop
|
||||
|
||||
:Tools
|
||||
:: Setup VS
|
||||
if not defined VisualStudioVersion (
|
||||
if defined VS140COMNTOOLS (
|
||||
call "%VS140COMNTOOLS%\VsDevCmd.bat"
|
||||
goto :Build
|
||||
)
|
||||
|
||||
echo Error: build.cmd requires Visual Studio 2015.
|
||||
echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
|
||||
exit /b 1
|
||||
)
|
||||
if /I [%1] == [-?] goto Usage
|
||||
|
||||
:Build
|
||||
:: Restore the Tools directory
|
||||
call %~dp0init-tools.cmd
|
||||
|
||||
:: Call the builds
|
||||
if "%__buildSpec%"=="managed" goto :BuildManaged
|
||||
|
||||
:BuildNative
|
||||
:: Run the Native Windows build
|
||||
echo [%time%] Building Native Libraries...
|
||||
IF EXIST "%~dp0src\native\Windows\build-native.cmd" (
|
||||
call %~dp0src\native\Windows\build-native.cmd %__args% >nativebuild.log
|
||||
IF ERRORLEVEL 1 (
|
||||
echo Native component build failed see nativebuild.log for more details.
|
||||
) else (
|
||||
echo [%time%] Successfully built Native Libraries.
|
||||
)
|
||||
)
|
||||
|
||||
:: If we only wanted to build the native components, exit
|
||||
if "%__buildSpec%"=="native" goto :eof
|
||||
|
||||
:BuildManaged
|
||||
:: Clear the 'Platform' env variable for this session,
|
||||
:: as it's a per-project setting within the build, and
|
||||
:: misleading value (such as 'MCD' in HP PCs) may lead
|
||||
:: to build breakage (issue: #69).
|
||||
set Platform=
|
||||
|
||||
:: Log build command line
|
||||
set _buildproj=%~dp0build.proj
|
||||
set _buildlog=%~dp0msbuild.log
|
||||
set _binclashLoggerDll=%~dp0Tools\net45\Microsoft.DotNet.Build.Tasks.dll
|
||||
set _binclashlog=%~dp0binclash.log
|
||||
set _buildprefix=echo
|
||||
set _buildpostfix=^> "%_buildlog%"
|
||||
call :build %__args%
|
||||
|
||||
:: Build
|
||||
set _buildprefix=
|
||||
set _buildpostfix=
|
||||
echo [%time%] Building Managed Libraries...
|
||||
call :build %__args%
|
||||
|
||||
goto :AfterBuild
|
||||
|
||||
:build
|
||||
%_buildprefix% msbuild "%_buildproj%" /nologo /maxcpucount /v:minimal /clp:Summary /nodeReuse:false /flp:v=normal;LogFile="%_buildlog%";Append /flp2:warningsonly;logfile=%~dp0msbuild.wrn /flp3:errorsonly;logfile=%~dp0msbuild.err "/l:BinClashLogger,%_binclashLoggerDll%;LogFile=%_binclashlog%" !unprocessedBuildArgs! %_buildpostfix%
|
||||
set BUILDERRORLEVEL=%ERRORLEVEL%
|
||||
goto :eof
|
||||
|
||||
:AfterBuild
|
||||
call %~dp0build-native.cmd %*
|
||||
if NOT [%ERRORLEVEL%]==[0] exit /b 1
|
||||
call %~dp0build-managed.cmd %*
|
||||
exit /b %ERRORLEVEL%
|
||||
|
||||
:Usage
|
||||
echo.
|
||||
:: Pull the build summary from the log file
|
||||
findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%_buildlog%"
|
||||
echo [%time%] Build Exit Code = %BUILDERRORLEVEL%
|
||||
|
||||
exit /b %BUILDERRORLEVEL%
|
||||
echo There are new changes on how we build. Use this script only for generic
|
||||
echo build instructions that apply for both build native and build managed.
|
||||
echo Otherwise:
|
||||
echo.
|
||||
echo Before Now
|
||||
echo build.cmd native build-native.cmd
|
||||
echo build.cmd managed build-managed.cmd
|
||||
echo.
|
||||
echo For more information: "https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md"
|
||||
echo ----------------------------------------------------------------------------
|
||||
echo.
|
||||
echo.
|
||||
goto :Build
|
459
build.sh
459
build.sh
|
@ -2,451 +2,32 @@
|
|||
|
||||
usage()
|
||||
{
|
||||
echo "Usage: $0 [managed] [native] [BuildArch] [BuildType] [clean] [verbose] [clangx.y] [platform] [cross] [skiptests] [staticLibLink] [cmakeargs] [makeargs]"
|
||||
echo "managed - optional argument to build the managed code"
|
||||
echo "native - optional argument to build the native code"
|
||||
echo "The following arguments affect native builds only:"
|
||||
echo "BuildArch can be: x64, x86, arm, arm-softfp, arm64"
|
||||
echo "BuildType can be: debug, release"
|
||||
echo "clean - optional argument to force a clean build."
|
||||
echo "verbose - optional argument to enable verbose build output."
|
||||
echo "clangx.y - optional argument to build using clang version x.y."
|
||||
echo "platform can be: FreeBSD, Linux, NetBSD, OSX, Windows"
|
||||
echo "cross - optional argument to signify cross compilation,"
|
||||
echo " - will use ROOTFS_DIR environment variable if set."
|
||||
echo "skiptests - skip the tests in the './bin/*/*Tests/' subdirectory."
|
||||
echo "staticLibLink - Optional argument to statically link any native library."
|
||||
echo "generateversion - if building native only, pass this in to get a version on the build output."
|
||||
echo "cmakeargs - user-settable additional arguments passed to CMake."
|
||||
exit 1
|
||||
}
|
||||
|
||||
setup_dirs()
|
||||
{
|
||||
echo Setting up directories for build
|
||||
|
||||
mkdir -p "$__BinDir"
|
||||
mkdir -p "$__IntermediatesDir"
|
||||
}
|
||||
|
||||
# Performs "clean build" type actions (deleting and remaking directories)
|
||||
|
||||
clean()
|
||||
{
|
||||
echo "Cleaning previous output for the selected configuration"
|
||||
rm -rf "$__BinDir"
|
||||
rm -rf "$__IntermediatesDir"
|
||||
setup_dirs
|
||||
}
|
||||
|
||||
# Check the system to ensure the right pre-reqs are in place
|
||||
|
||||
check_native_prereqs()
|
||||
{
|
||||
echo "Checking pre-requisites..."
|
||||
|
||||
# Check presence of CMake on the path
|
||||
hash cmake 2>/dev/null || { echo >&2 "Please install cmake before running this script"; exit 1; }
|
||||
|
||||
# Check for clang
|
||||
hash clang-$__ClangMajorVersion.$__ClangMinorVersion 2>/dev/null || hash clang$__ClangMajorVersion$__ClangMinorVersion 2>/dev/null || hash clang 2>/dev/null || { echo >&2 "Please install clang before running this script"; exit 1; }
|
||||
}
|
||||
|
||||
# Prepare the system for building
|
||||
|
||||
prepare_managed_build()
|
||||
{
|
||||
# Run Init-Tools to restore BuildTools and ToolRuntime
|
||||
$__scriptpath/init-tools.sh
|
||||
}
|
||||
|
||||
prepare_native_build()
|
||||
{
|
||||
# Specify path to be set for CMAKE_INSTALL_PREFIX.
|
||||
# This is where all built CoreClr libraries will copied to.
|
||||
export __CMakeBinDir="$__BinDir"
|
||||
|
||||
# Configure environment if we are doing a clean build.
|
||||
if [ $__CleanBuild == 1 ]; then
|
||||
clean
|
||||
fi
|
||||
|
||||
# Configure environment if we are doing a verbose build
|
||||
if [ $__VerboseBuild == 1 ]; then
|
||||
export VERBOSE=1
|
||||
fi
|
||||
|
||||
# If managed build is supported, then generate version
|
||||
if [ $__buildmanaged == true ]; then
|
||||
__generateversionsource=true
|
||||
fi
|
||||
|
||||
# Ensure tools are present if we will generate version.c
|
||||
if [ $__generateversionsource == true ]; then
|
||||
$__scriptpath/init-tools.sh
|
||||
fi
|
||||
|
||||
# Generate version.c if specified, else have an empty one.
|
||||
__versionSourceFile=$__scriptpath/bin/obj/version.c
|
||||
if [ ! -e "${__versionSourceFile}" ]; then
|
||||
if [ $__generateversionsource == true ]; then
|
||||
$__scriptpath/Tools/dotnetcli/dotnet $__scriptpath/Tools/MSBuild.exe "$__scriptpath/build.proj" /t:GenerateVersionSourceFile /p:GenerateVersionSourceFile=true /v:minimal
|
||||
else
|
||||
__versionSourceLine="static char sccsid[] __attribute__((used)) = \"@(#)No version information produced\";"
|
||||
echo $__versionSourceLine > $__versionSourceFile
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
build_managed()
|
||||
{
|
||||
__buildproj=$__scriptpath/build.proj
|
||||
__buildlog=$__scriptpath/msbuild.log
|
||||
__binclashlog=$__scriptpath/binclash.log
|
||||
__binclashloggerdll=$__scriptpath/Tools/Microsoft.DotNet.Build.Tasks.dll
|
||||
|
||||
$__scriptpath/Tools/dotnetcli/dotnet $__scriptpath/Tools/MSBuild.exe "$__buildproj" /m /nologo /verbosity:minimal "/flp:Verbosity=normal;LogFile=$__buildlog" "/flp2:warningsonly;logfile=$__scriptpath/msbuild.wrn" "/flp3:errorsonly;logfile=$__scriptpath/msbuild.err" "/l:BinClashLogger,$__binclashloggerdll;LogFile=$__binclashlog" /p:ConfigurationGroup=$__BuildType /p:TargetOS=$__BuildOS /p:OSGroup=$__BuildOS /p:SkipTests=$__SkipTests /p:COMPUTERNAME=$(hostname) /p:USERNAME=$(id -un) /p:TestNugetRuntimeId=$__TestNugetRuntimeId $__UnprocessedBuildArgs
|
||||
BUILDERRORLEVEL=$?
|
||||
|
||||
echo
|
||||
|
||||
# Pull the build summary from the log file
|
||||
tail -n 4 "$__buildlog"
|
||||
echo Build Exit Code = $BUILDERRORLEVEL
|
||||
echo "There are new changes on how we build. Use this script only for generic"
|
||||
echo "build instructions that apply for both build native and build managed."
|
||||
echo "Otherwise:"
|
||||
echo
|
||||
echo "Before Now"
|
||||
echo "build.sh native build-native.sh"
|
||||
echo "build.sh managed build-managed.sh"
|
||||
echo
|
||||
echo "For more information: https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md"
|
||||
echo "----------------------------------------------------------------------------"
|
||||
echo
|
||||
echo
|
||||
}
|
||||
|
||||
build_native()
|
||||
{
|
||||
# All set to commence the build
|
||||
|
||||
echo "Commencing build of corefx native components for $__BuildOS.$__BuildArch.$__BuildType"
|
||||
cd "$__IntermediatesDir"
|
||||
|
||||
# Regenerate the CMake solution
|
||||
echo "Invoking cmake with arguments: \"$__nativeroot\" $__CMakeArgs $__CMakeExtraArgs"
|
||||
"$__nativeroot/gen-buildsys-clang.sh" "$__nativeroot" $__ClangMajorVersion $__ClangMinorVersion $__BuildArch $__CMakeArgs "$__CMakeExtraArgs"
|
||||
|
||||
# Check that the makefiles were created.
|
||||
|
||||
if [ ! -f "$__IntermediatesDir/Makefile" ]; then
|
||||
echo "Failed to generate native component build project!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the number of processors available to the scheduler
|
||||
# Other techniques such as `nproc` only get the number of
|
||||
# processors available to a single process.
|
||||
if [ `uname` = "FreeBSD" ]; then
|
||||
NumProc=`sysctl hw.ncpu | awk '{ print $2+1 }'`
|
||||
elif [ `uname` = "NetBSD" ]; then
|
||||
NumProc=$(($(getconf NPROCESSORS_ONLN)+1))
|
||||
else
|
||||
NumProc=$(($(getconf _NPROCESSORS_ONLN)+1))
|
||||
fi
|
||||
|
||||
# Build
|
||||
|
||||
echo "Executing make install -j $NumProc $__MakeExtraArgs"
|
||||
|
||||
make install -j $NumProc $__MakeExtraArgs
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to build corefx native components."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "CoreFX native components successfully built."
|
||||
echo "Product binaries are available at $__BinDir"
|
||||
}
|
||||
if [ $1 == "-?" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
|
||||
__nativeroot=$__scriptpath/src/Native
|
||||
__packageroot=$__scriptpath/packages
|
||||
__sourceroot=$__scriptpath/src
|
||||
__rootbinpath="$__scriptpath/bin"
|
||||
__generateversionsource=false
|
||||
__buildmanaged=false
|
||||
__buildnative=false
|
||||
__TestNugetRuntimeId=win7-x64
|
||||
|
||||
# Use uname to determine what the CPU is.
|
||||
CPUName=$(uname -p)
|
||||
# Some Linux platforms report unknown for platform, but the arch for machine.
|
||||
if [ $CPUName == "unknown" ]; then
|
||||
CPUName=$(uname -m)
|
||||
"$__scriptpath/build-native.sh" $*
|
||||
if [ $? -ne 0 ];then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $CPUName in
|
||||
i686)
|
||||
__BuildArch=x86
|
||||
;;
|
||||
"$__scriptpath/build-managed.sh" $*
|
||||
exit $?
|
||||
|
||||
x86_64)
|
||||
__BuildArch=x64
|
||||
;;
|
||||
|
||||
armv7l)
|
||||
__BuildArch=arm
|
||||
;;
|
||||
|
||||
aarch64)
|
||||
__BuildArch=arm64
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown CPU $CPUName detected, configuring as if for x64"
|
||||
__BuildArch=x64
|
||||
;;
|
||||
esac
|
||||
|
||||
# Use uname to determine what the OS is.
|
||||
OSName=$(uname -s)
|
||||
case $OSName in
|
||||
Darwin)
|
||||
__HostOS=OSX
|
||||
__TestNugetRuntimeId=osx.10.10-x64
|
||||
;;
|
||||
|
||||
FreeBSD)
|
||||
__HostOS=FreeBSD
|
||||
# TODO: Add native version
|
||||
__TestNugetRuntimeId=osx.10.10-x64
|
||||
;;
|
||||
|
||||
Linux)
|
||||
__HostOS=Linux
|
||||
if [ ! -e /etc/os-release ]; then
|
||||
echo "Cannot determine Linux distribution, assuming Ubuntu 14.04"
|
||||
__TestNugetRuntimeId=ubuntu.14.04-x64
|
||||
else
|
||||
source /etc/os-release
|
||||
__TestNugetRuntimeId=$ID.$VERSION_ID-$__BuildArch
|
||||
fi
|
||||
;;
|
||||
|
||||
NetBSD)
|
||||
__HostOS=NetBSD
|
||||
# TODO: Add native version
|
||||
__TestNugetRuntimeId=osx.10.10-x64
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unsupported OS '$OSName' detected. Configuring as if for Ubuntu."
|
||||
__HostOS=Linux
|
||||
__TestNugetRuntimeId=ubuntu.14.04-x64
|
||||
;;
|
||||
esac
|
||||
__BuildOS=$__HostOS
|
||||
__BuildType=Debug
|
||||
__CMakeArgs=DEBUG
|
||||
__CMakeExtraArgs=""
|
||||
__MakeExtraArgs=""
|
||||
|
||||
BUILDERRORLEVEL=0
|
||||
|
||||
# Set the various build properties here so that CMake and MSBuild can pick them up
|
||||
__UnprocessedBuildArgs=
|
||||
__CleanBuild=false
|
||||
__CrossBuild=0
|
||||
__SkipTests=false
|
||||
__ServerGC=0
|
||||
__VerboseBuild=false
|
||||
__ClangMajorVersion=3
|
||||
__ClangMinorVersion=5
|
||||
|
||||
while :; do
|
||||
if [ $# -le 0 ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
-\?|-h|--help)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
managed)
|
||||
__buildmanaged=true
|
||||
;;
|
||||
native)
|
||||
__buildnative=true
|
||||
;;
|
||||
x86)
|
||||
__BuildArch=x86
|
||||
;;
|
||||
x64)
|
||||
__BuildArch=x64
|
||||
;;
|
||||
arm)
|
||||
__BuildArch=arm
|
||||
;;
|
||||
arm-softfp)
|
||||
__BuildArch=arm-softfp
|
||||
;;
|
||||
arm64)
|
||||
__BuildArch=arm64
|
||||
;;
|
||||
debug)
|
||||
__BuildType=Debug
|
||||
;;
|
||||
release)
|
||||
__BuildType=Release
|
||||
__CMakeArgs=RELEASE
|
||||
;;
|
||||
clean)
|
||||
__CleanBuild=1
|
||||
;;
|
||||
verbose)
|
||||
__VerboseBuild=1
|
||||
;;
|
||||
staticliblink)
|
||||
__CMakeExtraArgs="$__CMakeExtraArgs -DCMAKE_STATIC_LIB_LINK=1"
|
||||
;;
|
||||
generateversion)
|
||||
__generateversionsource=true
|
||||
;;
|
||||
clang3.5)
|
||||
__ClangMajorVersion=3
|
||||
__ClangMinorVersion=5
|
||||
;;
|
||||
clang3.6)
|
||||
__ClangMajorVersion=3
|
||||
__ClangMinorVersion=6
|
||||
;;
|
||||
clang3.7)
|
||||
__ClangMajorVersion=3
|
||||
__ClangMinorVersion=7
|
||||
;;
|
||||
clang3.8)
|
||||
__ClangMajorVersion=3
|
||||
__ClangMinorVersion=8
|
||||
;;
|
||||
freebsd)
|
||||
__BuildOS=FreeBSD
|
||||
__TestNugetRuntimeId=osx.10.10-x64
|
||||
;;
|
||||
linux)
|
||||
__BuildOS=Linux
|
||||
# If the Host OS is also Linux, then use the RID of the host.
|
||||
# Otherwise, override it to Ubuntu by default.
|
||||
if [ "$__HostOS" != "Linux" ]; then
|
||||
__TestNugetRuntimeId=ubuntu.14.04-x64
|
||||
fi
|
||||
;;
|
||||
netbsd)
|
||||
__BuildOS=NetBSD
|
||||
__TestNugetRuntimeId=osx.10.10-x64
|
||||
;;
|
||||
osx)
|
||||
__BuildOS=OSX
|
||||
__TestNugetRuntimeId=osx.10.10-x64
|
||||
;;
|
||||
windows)
|
||||
__BuildOS=Windows_NT
|
||||
__TestNugetRuntimeId=win7-x64
|
||||
;;
|
||||
cross)
|
||||
__CrossBuild=1
|
||||
;;
|
||||
skiptests)
|
||||
__SkipTests=true
|
||||
;;
|
||||
cmakeargs)
|
||||
if [ -n "$2" ]; then
|
||||
__CMakeExtraArgs="$__CMakeExtraArgs $2"
|
||||
shift
|
||||
else
|
||||
echo "ERROR: 'cmakeargs' requires a non-empty option argument"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
makeargs)
|
||||
if [ -n "$2" ]; then
|
||||
__MakeExtraArgs="$__MakeExtraArgs $2"
|
||||
shift
|
||||
else
|
||||
echo "ERROR: 'makeargs' requires a non-empty option argument"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
useservergc)
|
||||
__ServerGC=1
|
||||
;;
|
||||
*)
|
||||
__UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
# If neither managed nor native are passed as arguments, default to building both
|
||||
|
||||
if [ "$__buildmanaged" = false -a "$__buildnative" = false ]; then
|
||||
__buildmanaged=true
|
||||
__buildnative=true
|
||||
fi
|
||||
|
||||
# Disable the native build when targeting Windows.
|
||||
|
||||
if [ "$__BuildOS" != "$__HostOS" ]; then
|
||||
echo "Warning: cross compiling native components is not yet supported"
|
||||
__buildnative=false
|
||||
fi
|
||||
|
||||
if [ ! -e "$__nativeroot" ]; then
|
||||
__buildnative=false
|
||||
fi
|
||||
|
||||
# Set the remaining variables based upon the determined build configuration
|
||||
__IntermediatesDir="$__rootbinpath/obj/$__BuildOS.$__BuildArch.$__BuildType/Native"
|
||||
__BinDir="$__rootbinpath/$__BuildOS.$__BuildArch.$__BuildType/Native"
|
||||
|
||||
# Make the directories necessary for build if they don't exist
|
||||
|
||||
setup_dirs
|
||||
|
||||
# Configure environment if we are doing a cross compile.
|
||||
if [ "$__CrossBuild" == 1 ]; then
|
||||
export CROSSCOMPILE=1
|
||||
if ! [[ -n "$ROOTFS_DIR" ]]; then
|
||||
export ROOTFS_DIR="$__scriptpath/cross/rootfs/$__BuildArch"
|
||||
fi
|
||||
fi
|
||||
|
||||
export CORECLR_SERVER_GC="$__ServerGC"
|
||||
|
||||
if $__buildnative; then
|
||||
|
||||
# Check prereqs.
|
||||
|
||||
check_native_prereqs
|
||||
|
||||
# Prepare the system
|
||||
|
||||
prepare_native_build
|
||||
|
||||
# Build the corefx native components.
|
||||
|
||||
build_native
|
||||
|
||||
# Build complete
|
||||
fi
|
||||
|
||||
if $__buildmanaged; then
|
||||
|
||||
# Prepare the system
|
||||
|
||||
prepare_managed_build
|
||||
|
||||
# Build the corefx native components.
|
||||
|
||||
build_managed
|
||||
|
||||
# Build complete
|
||||
fi
|
||||
|
||||
# If managed build failed, exit with the status code of the managed build
|
||||
if [ $BUILDERRORLEVEL != 0 ]; then
|
||||
exit $BUILDERRORLEVEL
|
||||
fi
|
||||
|
||||
exit $BUILDERRORLEVEL
|
||||
|
|
160
clean.cmd
160
clean.cmd
|
@ -1,163 +1,29 @@
|
|||
@if "%_echo%" neq "on" echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
set cleanlog=%~dp0clean.log
|
||||
echo Running Clean.cmd %* > %cleanlog%
|
||||
echo Stop VBCSCompiler.exe execution.
|
||||
for /f "tokens=2 delims=," %%F in ('tasklist /nh /fi "imagename eq VBCSCompiler.exe" /fo csv') do taskkill /f /PID %%~F
|
||||
|
||||
set options=/nologo /v:minimal /clp:Summary /flp:v=detailed;Append;LogFile=%cleanlog%
|
||||
set unprocessedBuildArgs=
|
||||
set allargs=%*
|
||||
set thisArgs=
|
||||
set clean_successful=true
|
||||
|
||||
if [%1] == [] (
|
||||
set clean_targets=Clean;
|
||||
goto Begin
|
||||
)
|
||||
|
||||
set clean_targets=
|
||||
set clean_src=
|
||||
set clean_tools=
|
||||
set clean_environment=
|
||||
set clean_all=
|
||||
|
||||
:Loop
|
||||
if [%1] == [] goto Begin
|
||||
|
||||
if /I [%1] == [/?] goto Usage
|
||||
|
||||
if /I [%1] == [/b] (
|
||||
set clean_targets=Clean;%clean_targets%
|
||||
set thisArgs=!thisArgs!%1
|
||||
goto Next
|
||||
)
|
||||
|
||||
if /I [%1] == [/p] (
|
||||
set clean_targets=CleanPackages;%clean_targets%
|
||||
set thisArgs=!thisArgs!%1
|
||||
goto Next
|
||||
)
|
||||
|
||||
if /I [%1] == [/c] (
|
||||
set clean_targets=CleanPackagesCache;%clean_targets%
|
||||
set thisArgs=!thisArgs!%1
|
||||
goto Next
|
||||
)
|
||||
|
||||
if /I [%1] == [/s] (
|
||||
set clean_src=true
|
||||
set thisArgs=!thisArgs!%1
|
||||
goto Next
|
||||
)
|
||||
|
||||
if /I [%1] == [/t] (
|
||||
set clean_tools=true
|
||||
set thisArgs=!thisArgs!%1
|
||||
goto Next
|
||||
)
|
||||
|
||||
if /I [%1] == [/e] (
|
||||
set clean_environment=true
|
||||
set thisArgs=!thisArgs!%1
|
||||
goto Next
|
||||
)
|
||||
|
||||
if /I [%1] == [/all] (
|
||||
set clean_src=
|
||||
set clean_tools=
|
||||
set clean_environment=
|
||||
set clean_targets=Clean;CleanPackages;CleanPackagesCache;
|
||||
set clean_all=true
|
||||
set thisArgs=!thisArgs!%1
|
||||
goto Next
|
||||
)
|
||||
|
||||
if [!thisArgs!]==[] (
|
||||
set unprocessedBuildArgs=!allargs!
|
||||
) else (
|
||||
call set unprocessedBuildArgs=%%allargs:*!thisArgs!=%%
|
||||
)
|
||||
|
||||
:Next
|
||||
shift /1
|
||||
goto Loop
|
||||
|
||||
:Begin
|
||||
if /I [%clean_environment%] == [true] (
|
||||
call :CleanEnvironment
|
||||
)
|
||||
|
||||
if /I [%clean_src%] == [true] (
|
||||
echo Cleaning src directory ...
|
||||
echo. >> %cleanlog% && echo git clean -xdf %~dp0src >> %cleanlog%
|
||||
call git clean -xdf %~dp0src >> %cleanlog%
|
||||
call :CheckErrorLevel
|
||||
)
|
||||
|
||||
if NOT "%clean_targets%" == "" (
|
||||
echo Running init-tools.cmd
|
||||
call %~dp0init-tools.cmd
|
||||
|
||||
echo Running msbuild clean targets "%clean_targets:~0,-1%" ...
|
||||
echo. >> %cleanlog% && echo msbuild.exe %~dp0build.proj /t:%clean_targets:~0,-1% !options! !unprocessedBuildArgs! >> %cleanlog%
|
||||
call msbuild.exe %~dp0build.proj /t:%clean_targets:~0,-1% !options! !unprocessedBuildArgs!
|
||||
call :CheckErrorLevel
|
||||
)
|
||||
|
||||
if /I [%clean_tools%] == [true] (
|
||||
call :CleanEnvironment
|
||||
echo Cleaning tools directory ...
|
||||
echo. >> %cleanlog% && echo rmdir /s /q %~dp0tools >> %cleanlog%
|
||||
rmdir /s /q %~dp0tools >> %cleanlog%
|
||||
REM Don't call CheckErrorLevel because if the Tools directory didn't exist when this script was
|
||||
REM invoked, then it sometimes exits with error level 3 despite successfully deleting the directory.
|
||||
)
|
||||
|
||||
if /I [%clean_all%] == [true] (
|
||||
call :CleanEnvironment
|
||||
if [%1] == [-all] (
|
||||
echo Cleaning entire working directory ...
|
||||
echo. >> %cleanlog% && echo git clean -xdf -e clean.log %~dp0 >> %cleanlog%
|
||||
call git clean -xdf -e clean.log %~dp0 >> %cleanlog%
|
||||
call :CheckErrorLevel
|
||||
call git clean -xdf
|
||||
exit /b !ERRORLEVEL!
|
||||
)
|
||||
|
||||
if /I [%clean_successful%] == [true] (
|
||||
echo Clean completed successfully.
|
||||
echo. >> %cleanlog% && echo Clean completed successfully. >> %cleanlog%
|
||||
exit /b 0
|
||||
) else (
|
||||
echo An error occured while cleaning; see %cleanlog% for more details.
|
||||
echo. >> %cleanlog% && echo Clean completed with errors. >> %cleanlog%
|
||||
exit /b 1
|
||||
)
|
||||
if [%1]==[] set __args=-b
|
||||
call %~dp0run.cmd clean %__args% %*
|
||||
exit /b %ERRORLEVEL%
|
||||
|
||||
:Usage
|
||||
echo.
|
||||
echo Repository cleaning script.
|
||||
echo.
|
||||
echo Options:
|
||||
echo /b - Deletes the binary output directory.
|
||||
echo /p - Deletes the repo-local nuget package directory.
|
||||
echo /c - Deletes the user-local nuget package cache.
|
||||
echo /t - Deletes the tools directory.
|
||||
echo /s - Deletes the untracked files under src directory (git clean src -xdf).
|
||||
echo /e - Kills and/or stops the processes that are still running, for example VBCSCompiler.exe
|
||||
echo /all - Combines all of the above.
|
||||
echo -b - Deletes the binary output directory.
|
||||
echo -p - Deletes the repo-local nuget package directory.
|
||||
echo -c - Deletes the user-local nuget package cache.
|
||||
echo -all - Combines all of the above.
|
||||
echo.
|
||||
echo If no option is specified then clean.cmd /b is implied.
|
||||
echo If no option is specified then clean.cmd -b is implied.
|
||||
|
||||
exit /b 1
|
||||
|
||||
:CheckErrorLevel
|
||||
if NOT [%ERRORLEVEL%]==[0] (
|
||||
echo Command exited with ERRORLEVEL %ERRORLEVEL% >> %cleanlog%
|
||||
set clean_successful=false
|
||||
)
|
||||
exit /b
|
||||
|
||||
:CleanEnvironment
|
||||
REM If VBCSCompiler.exe is running we need to kill it
|
||||
echo Stop VBCSCompiler.exe execution.
|
||||
echo. >> %cleanlog% && echo Stop VBCSCompiler.exe execution. >> %cleanlog%
|
||||
for /f "tokens=2 delims=," %%F in ('tasklist /nh /fi "imagename eq VBCSCompiler.exe" /fo csv') do taskkill /f /PID %%~F >> %cleanlog%
|
||||
exit /b
|
121
clean.sh
121
clean.sh
|
@ -5,122 +5,27 @@ usage()
|
|||
echo "Usage: clean [options]"
|
||||
echo "Cleans the local dev environment."
|
||||
echo
|
||||
echo " -b Delete the binary output directory"
|
||||
echo " -p Delete the repo-local NuGet package directory"
|
||||
echo " -c Delete the user-local NuGet package caches"
|
||||
echo " -t Delete the tools directory"
|
||||
echo " -s Remove all untracked files under the src directory"
|
||||
echo " -a, --all Clean all of the above"
|
||||
echo " -b Delete the binary output directory."
|
||||
echo " -p Delete the repo-local NuGet package directory."
|
||||
echo " -c Delete the user-local NuGet package caches."
|
||||
echo " --all Cleans the root directory."
|
||||
echo
|
||||
echo "If no option is specified, then \"clean.sh -b\" is implied."
|
||||
exit 1
|
||||
}
|
||||
|
||||
check_exit_status()
|
||||
{
|
||||
ExitStatus=$?
|
||||
if [ $ExitStatus -ne 0 ]
|
||||
then
|
||||
echo "Command exited with exit status $ExitStatus" >> $CleanLog
|
||||
CleanSuccessful=false
|
||||
fi
|
||||
}
|
||||
__working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
WorkingTreeRoot="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
CleanLog=$WorkingTreeRoot/clean.log
|
||||
|
||||
options="/nologo /v:minimal /clp:Summary /flp:v=detailed;Append;LogFile=$CleanLog"
|
||||
unprocessedBuildArgs=
|
||||
CleanSuccessful=true
|
||||
CleanTargets=
|
||||
|
||||
echo "Running clean.sh $*" > $CleanLog
|
||||
|
||||
# Parse arguments
|
||||
if [ $# == 0 ]
|
||||
if [ $* == -all ]
|
||||
then
|
||||
CleanTargets="Clean;"
|
||||
echo "Removing all untracked files in the working tree"
|
||||
git clean -xdf $__working_tree_root
|
||||
exit $?
|
||||
fi
|
||||
|
||||
while [[ $# > 0 ]]
|
||||
do
|
||||
opt="$1"
|
||||
case $opt in
|
||||
-h|--help)
|
||||
usage
|
||||
;;
|
||||
-b)
|
||||
CleanTargets="Clean;$CleanTargets"
|
||||
;;
|
||||
-p)
|
||||
CleanTargets="CleanPackages;$CleanTargets"
|
||||
;;
|
||||
-c)
|
||||
CleanTargets="CleanPackagesCache;$CleanTargets"
|
||||
;;
|
||||
-t)
|
||||
CleanToolsDir=true
|
||||
;;
|
||||
-s)
|
||||
CleanSrc=true
|
||||
;;
|
||||
-a|--all)
|
||||
CleanWorkingTree=true
|
||||
CleanTargets="Clean;CleanPackages;CleanPackagesCache;"
|
||||
;;
|
||||
*)
|
||||
unprocessedBuildArgs="$unprocessedBuildArgs $1"
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ -n "$CleanTargets" ]
|
||||
then
|
||||
# Ensure that MSBuild is available
|
||||
echo "Running init-tools.sh"
|
||||
$WorkingTreeRoot/init-tools.sh
|
||||
|
||||
# Trim the trailing semicolon from the targets string
|
||||
CleanTargetsTrimmed=${CleanTargets:0:${#CleanTargets}-1}
|
||||
|
||||
echo "Running MSBuild target(s): $CleanTargetsTrimmed"
|
||||
echo -e "\n$WorkingTreeRoot/Tools/dotnetcli/dotnet $WorkingTreeRoot/Tools/MSBuild.exe $WorkingTreeRoot/build.proj /t:$CleanTargetsTrimmed $options $unprocessedBuildArgs" >> $CleanLog
|
||||
$WorkingTreeRoot/Tools/dotnetcli/dotnet $WorkingTreeRoot/Tools/MSBuild.exe $WorkingTreeRoot/build.proj /t:$CleanTargetsTrimmed $options $unprocessedBuildArgs
|
||||
check_exit_status
|
||||
if [ $# == 0 ]; then
|
||||
__args=-b
|
||||
fi
|
||||
|
||||
if [ "$CleanToolsDir" == true ] && [ "$CleanWorkingTree" != true ]
|
||||
then
|
||||
echo "Removing Tools directory"
|
||||
# This directory cannot be removed in a build target because MSBuild is in the Tools directory
|
||||
echo -e "\nrm -rf $WorkingTreeRoot/Tools" >> $CleanLog
|
||||
rm -rf $WorkingTreeRoot/Tools >> $CleanLog
|
||||
check_exit_status
|
||||
fi
|
||||
|
||||
if [ "$CleanSrc" == true ] && [ "$CleanWorkingTree" != true ]
|
||||
then
|
||||
echo "Removing all untracked files in the src directory"
|
||||
echo -e "\ngit clean -xdf $WorkingTreeRoot/src" >> $CleanLog
|
||||
git clean -xdf $WorkingTreeRoot/src >> $CleanLog
|
||||
check_exit_status
|
||||
fi
|
||||
|
||||
if [ "$CleanWorkingTree" == true ]
|
||||
then
|
||||
echo "Removing all untracked files in the working tree"
|
||||
echo -e "\ngit clean -xdf -e clean.log $WorkingTreeRoot" >> $CleanLog
|
||||
git clean -xdf -e clean.log $WorkingTreeRoot >> $CleanLog
|
||||
check_exit_status
|
||||
fi
|
||||
|
||||
if [ "$CleanSuccessful" == true ]
|
||||
then
|
||||
echo "Clean completed successfully."
|
||||
echo -e "\nClean completed successfully." >> $CleanLog
|
||||
exit 0
|
||||
else
|
||||
echo "An error occured while cleaning; see $CleanLog for more details."
|
||||
echo -e "\nClean completed with errors." >> $CleanLog
|
||||
exit 1
|
||||
fi
|
||||
$__working_tree_root/run.sh clean $__args $*
|
||||
exit $?
|
||||
|
|
|
@ -0,0 +1,586 @@
|
|||
{
|
||||
"settings": {
|
||||
"SkipTests":{
|
||||
"description": "Enables/Disables running tests.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": false
|
||||
},
|
||||
"OSGroup": {
|
||||
"description": "OS Group for result binaries.",
|
||||
"valueType": "property",
|
||||
"values": ["AnyOS", "Windows_NT", "Linux", "OSX", "FreeBSD", "NetBSD"],
|
||||
"defaultValue": "${OSName}"
|
||||
},
|
||||
"TargetOS": {
|
||||
"description": "Target OS for result binaries.",
|
||||
"valueType": "property",
|
||||
"values": ["AnyOS", "Windows_NT", "Linux", "OSX", "FreeBSD", "NetBSD"],
|
||||
"defaultValue": "${OSName}"
|
||||
},
|
||||
"FilterToOSGroup": {
|
||||
"description": "FilterToOSGroup for result binaries.",
|
||||
"valueType": "property",
|
||||
"values": ["Windows_NT", "Linux", "OSX", "FreeBSD", "NetBSD"],
|
||||
"defaultValue": "${OSRid}"
|
||||
},
|
||||
"TestNugetRuntimeId": {
|
||||
"description": "Target OS for result binaries.",
|
||||
"valueType": "property",
|
||||
"values": ["win7-x64", "osx.10.10-x64", "ubuntu.14.04-x64", "ubuntu.16.04-x64", "etc-other-rids"],
|
||||
"defaultValue": "${OSRid}-x64"
|
||||
},
|
||||
"TestWithLocalLibraries": {
|
||||
"description": "Enables/Disables run test with local libraries.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": true
|
||||
},
|
||||
"RestoreDuringBuild": {
|
||||
"description": "Enables/Disables the restoration of packages.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": true
|
||||
},
|
||||
"Platform": {
|
||||
"description": "Sets the value of the platform.",
|
||||
"valueType": "property",
|
||||
"values": ["AnyCPU", "x86", "arm", "x64", "arm64"],
|
||||
"defaultValue": "x64"
|
||||
},
|
||||
"ConfigurationGroup": {
|
||||
"description": "Sets the configuration group as Release or Debug",
|
||||
"valueType": "property",
|
||||
"values": ["Release", "Debug"],
|
||||
"defaultValue": "Debug"
|
||||
},
|
||||
"BuildPackages": {
|
||||
"description": "Enables/Disables building packages.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": true
|
||||
},
|
||||
"BuildPackageLibraryReferences": {
|
||||
"description": "Enables/Disables building libraries referenced by packages.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": true
|
||||
},
|
||||
"SkipManagedPackageBuild": {
|
||||
"description": "Enables/Disables building packages for manage builds.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": false
|
||||
},
|
||||
"BuildTests": {
|
||||
"description": "Enables/Disables building tests.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": true
|
||||
},
|
||||
"BuildTestsAgainstPackages": {
|
||||
"description": "Allows to build tests against product packages.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": false
|
||||
},
|
||||
"Coverage":{
|
||||
"description": "Enables code coverage runs.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": true
|
||||
},
|
||||
"Outerloop":{
|
||||
"description": "Enables outerloops tests scenarios.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": true
|
||||
},
|
||||
"BuildAllOSGroups":{
|
||||
"description": "Enables building the libraries for all OSes.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": true
|
||||
},
|
||||
"OfficialBuildId":{
|
||||
"description": "Specifies the SeedDate and the revision of the build to generate the version of the libraries.",
|
||||
"valueType": "property",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"CloudDropAccountName": {
|
||||
"description": "Azure account name.",
|
||||
"valueType": "property",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"CloudDropAccessToken": {
|
||||
"description": "Azure access token",
|
||||
"valueType": "property",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"ContainerName": {
|
||||
"description": "Azure container name",
|
||||
"valueType": "property",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"BuildNumberMajor": {
|
||||
"description": "Product build major number.",
|
||||
"valueType": "property",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"BuildNumberMinor": {
|
||||
"description": "Product build minor number.",
|
||||
"valueType": "property",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"GenerateNativeVersionInfo": {
|
||||
"description": "Allows to generate the native version header.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": true
|
||||
},
|
||||
"SkipManagedPackageBuild": {
|
||||
"description": "Allows to skip building packages from managed binaries.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": false
|
||||
},
|
||||
"BuildPackageLibraryReferences": {
|
||||
"description": "Allows to build libraries referenced by packages",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": true
|
||||
},
|
||||
"MsBuildNodoReuse": {
|
||||
"description": "Disables node reuse.",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": "/nodeReuse:false"
|
||||
},
|
||||
"MsBuildLogging": {
|
||||
"description": "MsBuild logging options.",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": "/flp:v=normal"
|
||||
},
|
||||
"MsBuildWarning": {
|
||||
"description": "MsBuild warning logging.",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": "/flp2:warningsonly;logfile=msbuild.wrn"
|
||||
},
|
||||
"MsBuildError": {
|
||||
"description": "MsBuild error logging.",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": "/flp3:errorsonly;logfile=msbuild.err"
|
||||
},
|
||||
"MsBuildParameters": {
|
||||
"description": "MsBuild building options.",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": "/nologo /maxcpucount /verbosity:minimal /clp:Summary"
|
||||
},
|
||||
"MsBuildBinClashLogger-Windows": {
|
||||
"description": "MsBuild Bin clash logger options for Windows.",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": "/l:BinClashLogger,Tools\\net45\\Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log"
|
||||
},
|
||||
"MsBuildBinClashLogger-Unix": {
|
||||
"description": "MsBuild Bin clash logger options for Unix.",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": "/l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log"
|
||||
},
|
||||
"BuildArchitecture": {
|
||||
"description": "Sets the value of the build architecture.",
|
||||
"valueType": "passThrough",
|
||||
"values": ["x86", "arm", "arm-softfp", "x64", "arm64"],
|
||||
"defaultValue": "${CPUArch}"
|
||||
},
|
||||
"CmakeBuildType": {
|
||||
"description": "Sets the value of the build configuration.",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": "DEBUG"
|
||||
},
|
||||
"HostOs": {
|
||||
"description": "OS for result binaries.",
|
||||
"valueType": "passThrough",
|
||||
"values": ["AnyOS", "Windows_NT", "Linux", "OSX", "FreeBSD", "NetBSD"],
|
||||
"defaultValue": "${OSName}"
|
||||
},
|
||||
"ProcessorCount": {
|
||||
"description": "Sets the value of the number of processors available.",
|
||||
"valueType": "passThrough",
|
||||
"values": ["NUmeric values"],
|
||||
"defaultValue": "${ProcessorCount}"
|
||||
},
|
||||
"Project": {
|
||||
"description": "Project where the commands are going to be applied.",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"ExtraParameters": {
|
||||
"description": "Extra parameters will be passed to the selected command.",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"BatchGenerateTestProjectJsons": {
|
||||
"description": "MsBuild target that generates the project Jsons files to build tests against packages.",
|
||||
"valueType": "target",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"BatchRestorePackages": {
|
||||
"description": "MsBuild target that restores the packages.",
|
||||
"valueType": "target",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"GenerateVersionHeader": {
|
||||
"description": "MsBuild target that generates the version header.",
|
||||
"valueType": "target",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"UpdateInvalidPackageVersions": {
|
||||
"description": "MsBuild target that looks through all dependencies and using the validation rules, it updates any invalid versions.",
|
||||
"valueType": "target",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"CleanAllProjects": {
|
||||
"description": "MsBuild target that deletes the binary output directory.",
|
||||
"valueType": "target",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"CleanPackages": {
|
||||
"description": "MsBuild target that deletes the repo-local nuget package directory.",
|
||||
"valueType": "target",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"CleanPackagesCache": {
|
||||
"description": "MsBuild target that deletes the user-local nuget package cache.",
|
||||
"valueType": "target",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
}
|
||||
},
|
||||
"commands": {
|
||||
"sync":{
|
||||
"alias":{
|
||||
"p":{
|
||||
"description": "Restores all NuGet packages for repository.",
|
||||
"settings":{
|
||||
"RestoreDuringBuild": true,
|
||||
"BatchRestorePackages": "default"
|
||||
}
|
||||
},
|
||||
"ab":{
|
||||
"description": "Downloads the latests product packages from Azure. The values for '-AzureAccount' and '-AzureToken' are required",
|
||||
"settings":{
|
||||
"Project": "src/syncAzure.proj",
|
||||
}
|
||||
},
|
||||
"t":{
|
||||
"description": "Generates project.jsons for test projects, restores packages, builds product and then builds tests against the generated project.json files.",
|
||||
"settings":{
|
||||
"RestoreDuringBuild": true,
|
||||
"BuildTestsAgainstPackages": true,
|
||||
"BatchGenerateTestProjectJsons": "default",
|
||||
"BatchRestorePackages": "default"
|
||||
}
|
||||
},
|
||||
"AzureAccount":{
|
||||
"description": "Account name to connect to Azure Blob storage. Required for -ab to work.",
|
||||
"settings":{
|
||||
"CloudDropAccountName": "default"
|
||||
}
|
||||
},
|
||||
"AzureToken":{
|
||||
"description": "Account token to connect to Azure Blob storage. Required for -ab to work.",
|
||||
"settings":{
|
||||
"CloudDropAccessToken": "default"
|
||||
}
|
||||
},
|
||||
"Container":{
|
||||
"description": "Container name of the Azure Blob where the packages are going to be stored.",
|
||||
"settings":{
|
||||
"ContainerName": "default"
|
||||
}
|
||||
},
|
||||
"BuildMajor": {
|
||||
"description": "To download a specific group of product packages, specify build number. The value for -BuildMinor required.",
|
||||
"settings": {
|
||||
"BuildNumberMajor": "default"
|
||||
}
|
||||
},
|
||||
"BuildMinor": {
|
||||
"description": "To download a specific group of product packages, specify build number. The value for -BuildMajor required.",
|
||||
"settings": {
|
||||
"BuildNumberMinor": "default"
|
||||
}
|
||||
},
|
||||
"verbose":{
|
||||
"description": "Passes /flp:v=diag to the msbuild command or the value passed by the user.",
|
||||
"settings":{
|
||||
"MsBuildLogging": "/flp:v=diag;LogFile=sync.log"
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultValues":{
|
||||
"toolName": "msbuild",
|
||||
"settings": {
|
||||
"MsBuildParameters":"default",
|
||||
"MsBuildLogging":"/flp:v=normal;LogFile=sync.log"
|
||||
}
|
||||
}
|
||||
},
|
||||
"build-managed":{
|
||||
"alias":{
|
||||
"binaries":{
|
||||
"description": "Only builds binaries. It doesn't restore packages.",
|
||||
"settings":{
|
||||
"RestoreDuringBuild": false,
|
||||
"BuildTests": false,
|
||||
"BuildPackages": false
|
||||
}
|
||||
},
|
||||
"packages":{
|
||||
"description": "Builds the NuGet packages.",
|
||||
"settings":{
|
||||
"Project": "src/packages.builds",
|
||||
"FilterToOSGroup":"default",
|
||||
"MsBuildLogging":"/flp:v=normal;LogFile=build-packages.log"
|
||||
}
|
||||
},
|
||||
"tests":{
|
||||
"description": "Builds the tests that are in the repository.",
|
||||
"settings":{
|
||||
"Project": "src/tests.builds",
|
||||
"MsBuildLogging":"/flp:v=normal;LogFile=build-tests.log"
|
||||
}
|
||||
},
|
||||
"debug":{
|
||||
"description": "Sets ConfigurationGroup=Debug or the value passed by the user.",
|
||||
"settings":{
|
||||
"ConfigurationGroup": "Debug"
|
||||
}
|
||||
},
|
||||
"release":{
|
||||
"description": "Sets ConfigurationGroup=Release or the value passed by the user.",
|
||||
"settings":{
|
||||
"ConfigurationGroup": "Release"
|
||||
}
|
||||
},
|
||||
"os":{
|
||||
"description": "Sets OSGroup to the OS name where the build is going to run or it is set to the value passed by the user.",
|
||||
"settings":{
|
||||
"OSGroup": "default"
|
||||
}
|
||||
},
|
||||
"target-os":{
|
||||
"description": "Sets TargetOS to the OS name where the build is going to run or it is set to the value passed by the user.",
|
||||
"settings":{
|
||||
"TargetOS": "default"
|
||||
}
|
||||
},
|
||||
"distroRid":{
|
||||
"description": "Sets the OS version to the TestNugetRuntimeId property.",
|
||||
"settings":{
|
||||
"TestNugetRuntimeId": "default"
|
||||
}
|
||||
},
|
||||
"GenerateVersion":{
|
||||
"description": "Generates the version header for native binaries.",
|
||||
"settings":{
|
||||
"GenerateNativeVersionInfo": true,
|
||||
"GenerateVersionHeader": "default"
|
||||
}
|
||||
},
|
||||
"DisableManagedPackage":{
|
||||
"description": "Generates the version header for native binaries.",
|
||||
"settings":{
|
||||
"SkipManagedPackageBuild": true
|
||||
}
|
||||
},
|
||||
"buildArch":{
|
||||
"description": "Passes the value of the build architecture to the respective build-native script.",
|
||||
"settings":{
|
||||
"Platform": "default"
|
||||
}
|
||||
},
|
||||
"verbose":{
|
||||
"description": "Passes /flp:v=diag to the msbuild command or the value passed by the user.",
|
||||
"settings":{
|
||||
"MsBuildLogging": "/flp:v=diag;LogFile=build-managed.log"
|
||||
}
|
||||
},
|
||||
"nodoReuse":{
|
||||
"description": "Disables node reuse because it causes file locking issues. Only available in the Desktop MsBuild.",
|
||||
"settings":{
|
||||
"MsBuildNodoReuse": "default"
|
||||
}
|
||||
},
|
||||
"binclashWindows":{
|
||||
"description": "Bin clash logger for Windows.",
|
||||
"settings":{
|
||||
"MsBuildBinClashLogger-Windows":"default"
|
||||
}
|
||||
},
|
||||
"binclashUnix":{
|
||||
"description": "Bin clash logger for Unix.",
|
||||
"settings":{
|
||||
"MsBuildBinClashLogger-Unix":"default"
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultValues":{
|
||||
"toolName": "msbuild",
|
||||
"settings": {
|
||||
"OSGroup": "default",
|
||||
"TargetOS": "default",
|
||||
"ConfigurationGroup": "default",
|
||||
"MsBuildParameters":"default",
|
||||
"MsBuildLogging":"default",
|
||||
"MsBuildWarning":"default",
|
||||
"MsBuildError":"default"
|
||||
}
|
||||
}
|
||||
},
|
||||
"build-native":{
|
||||
"alias":{
|
||||
"debug":{
|
||||
"description": "Passes DEBUG to respective build-native script.",
|
||||
"settings":{
|
||||
"CmakeBuildType": "DEBUG"
|
||||
}
|
||||
},
|
||||
"release":{
|
||||
"description": "Passes RELEASE to respective build-native script.",
|
||||
"settings":{
|
||||
"CmakeBuildType": "RELEASE"
|
||||
}
|
||||
},
|
||||
"buildArch":{
|
||||
"description": "Passes the value of the build architecture to the respective build-native script.",
|
||||
"settings":{
|
||||
"BuildArchitecture": "default"
|
||||
}
|
||||
},
|
||||
"os":{
|
||||
"description": "Passes the value of the OS to the respective build-native script.",
|
||||
"settings":{
|
||||
"HostOs": "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultValues":{
|
||||
"toolName": "terminal",
|
||||
"Project": "src/Native/build-native",
|
||||
"settings": {
|
||||
"BuildArchitecture": "default",
|
||||
"CmakeBuildType": "default",
|
||||
"HostOs": "default",
|
||||
"ProcessorCount": "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
"publish-packages":{
|
||||
"alias":{
|
||||
"AzureAccount":{
|
||||
"description": "Account name to connect to Azure Blob storage. Required for the command to work.",
|
||||
"settings":{
|
||||
"CloudDropAccountName": "default"
|
||||
}
|
||||
},
|
||||
"AzureToken":{
|
||||
"description": "Account token to connect to Azure Blob storage. Required for the command to work.",
|
||||
"settings":{
|
||||
"CloudDropAccessToken": "default"
|
||||
}
|
||||
},
|
||||
"Container":{
|
||||
"description": "Container name of the Azure Blob where the packages are going to be stored. Required for the command to work.",
|
||||
"settings":{
|
||||
"ContainerName": "default"
|
||||
}
|
||||
},
|
||||
"verbose":{
|
||||
"description": "Passes /flp:v=diag to the msbuild command or the value passed by the user.",
|
||||
"settings":{
|
||||
"MsBuildLogging": "/flp:v=diag;LogFile=publish-packages.log"
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultValues":{
|
||||
"toolName": "msbuild",
|
||||
"settings": {
|
||||
"Project": "src/publish.proj",
|
||||
"MsBuildParameters":"default",
|
||||
"MsBuildLogging":"/flp:v=normal;LogFile=publish-packages.log"
|
||||
}
|
||||
}
|
||||
},
|
||||
"clean":{
|
||||
"alias":{
|
||||
"b":{
|
||||
"description": "Deletes the binary output directory.",
|
||||
"settings":{
|
||||
"CleanAllProjects": "default"
|
||||
}
|
||||
},
|
||||
"p":{
|
||||
"description": "Deletes the repo-local nuget package directory.",
|
||||
"settings":{
|
||||
"CleanPackages": "default"
|
||||
}
|
||||
},
|
||||
"c":{
|
||||
"description": "Deletes the user-local nuget package cache.",
|
||||
"settings":{
|
||||
"CleanPackagesCache": "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultValues":{
|
||||
"toolName": "msbuild",
|
||||
"settings": {
|
||||
"MsBuildParameters":"default",
|
||||
"MsBuildLogging":"/flp:v=normal;LogFile=clean.log"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tools": {
|
||||
"msbuild": {
|
||||
"run": {
|
||||
"windows": "Tools/msbuild.cmd",
|
||||
"unix": "Tools/msbuild.sh"
|
||||
},
|
||||
"valueTypes": {
|
||||
"property": "/p:{name}={value}",
|
||||
"target": "/t:{name}",
|
||||
"internal": "/{name}"
|
||||
}
|
||||
},
|
||||
"terminal": {
|
||||
"run": {
|
||||
"windows": "cmd",
|
||||
"unix": "sh"
|
||||
},
|
||||
"valueTypes": {}
|
||||
}
|
||||
}
|
||||
}
|
92
netci.groovy
92
netci.groovy
|
@ -12,7 +12,7 @@ def projectFolder = Utilities.getFolderName(project) + '/' + Utilities.getFolder
|
|||
|
||||
// Globals
|
||||
|
||||
// Map of os -> osGroup.
|
||||
// Map of osName -> osGroup.
|
||||
def osGroupMap = ['Ubuntu14.04':'Linux',
|
||||
'Ubuntu16.04':'Linux',
|
||||
'Debian8.4':'Linux',
|
||||
|
@ -24,7 +24,7 @@ def osGroupMap = ['Ubuntu14.04':'Linux',
|
|||
'RHEL7.2': 'Linux',
|
||||
'LinuxARMEmulator': 'Linux']
|
||||
|
||||
// Map of os -> nuget runtime
|
||||
// Map of osName -> nuget runtime
|
||||
def targetNugetRuntimeMap = ['OSX' : 'osx.10.10-x64',
|
||||
'Ubuntu14.04' : 'ubuntu.14.04-x64',
|
||||
'Ubuntu16.04' : 'ubuntu.16.04-x64',
|
||||
|
@ -56,7 +56,7 @@ def osShortName = ['Windows 10': 'win10',
|
|||
def isLocal = (localType == 'local')
|
||||
|
||||
def newJobName = 'code_coverage_windows'
|
||||
def batchCommand = 'call "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\VsDevCmd.bat" && build.cmd /p:Coverage=true /p:Outerloop=true /p:WithoutCategories=IgnoreForCI'
|
||||
def batchCommand = 'call build.cmd -coverage -outerloop -- /p:WithoutCategories=IgnoreForCI'
|
||||
if (isLocal) {
|
||||
newJobName = "${newJobName}_local"
|
||||
batchCommand = "${batchCommand} /p:TestWithLocalLibraries=true"
|
||||
|
@ -98,7 +98,7 @@ def osShortName = ['Windows 10': 'win10',
|
|||
[true, false].each { isPR ->
|
||||
def newJob = job(Utilities.getFullJobName(project, 'native_code_format_check', isPR)) {
|
||||
steps {
|
||||
shell('python src/Native/format-code.py checkonly')
|
||||
shell('python src/Native/Unix/format-code.py checkonly')
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,16 +120,16 @@ def osShortName = ['Windows 10': 'win10',
|
|||
// Define outerloop windows Nano testing. Run locally on each machine.
|
||||
// **************************
|
||||
[true, false].each { isPR ->
|
||||
['Windows Nano 2016'].each { os ->
|
||||
['Windows Nano 2016'].each { osName ->
|
||||
['Debug', 'Release'].each { configurationGroup ->
|
||||
|
||||
def newJobName = "outerloop_${osShortName[os]}_${configurationGroup.toLowerCase()}"
|
||||
def newJobName = "outerloop_${osShortName[osName]}_${configurationGroup.toLowerCase()}"
|
||||
|
||||
def newBuildJobName = "outerloop_${osShortName[os]}_${configurationGroup.toLowerCase()}_bld"
|
||||
def newBuildJobName = "outerloop_${osShortName[osName]}_${configurationGroup.toLowerCase()}_bld"
|
||||
|
||||
def newBuildJob = job(Utilities.getFullJobName(project, newBuildJobName, isPR)) {
|
||||
steps {
|
||||
batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build.cmd /p:OSGroup=Windows_NT /p:ConfigurationGroup=${configurationGroup} /p:SkipTests=true /p:Outerloop=true /p:WithoutCategories=IgnoreForCI")
|
||||
batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build.cmd -os=Windows_NT -${configurationGroup} -skipTests -outerloop -- /p:WithoutCategories=IgnoreForCI")
|
||||
// Package up the results.
|
||||
batchFile("C:\\Packer\\Packer.exe .\\bin\\build.pack . bin packages")
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ def osShortName = ['Windows 10': 'win10',
|
|||
Utilities.addArchival(newBuildJob, "bin/build.pack,run-test.cmd,msbuild.log")
|
||||
|
||||
def fullCoreFXBuildJobName = projectFolder + '/' + newBuildJob.name
|
||||
def newTestJobName = "outerloop_${osShortName[os]}_${configurationGroup.toLowerCase()}_tst"
|
||||
def newTestJobName = "outerloop_${osShortName[osName]}_${configurationGroup.toLowerCase()}_tst"
|
||||
def newTestJob = job(Utilities.getFullJobName(project, newTestJobName, isPR)) {
|
||||
steps {
|
||||
// The tests/corefx components
|
||||
|
@ -169,7 +169,7 @@ def osShortName = ['Windows 10': 'win10',
|
|||
}
|
||||
|
||||
// Set the affinity. All of these run on Windows Nano currently.
|
||||
Utilities.setMachineAffinity(newTestJob, os)
|
||||
Utilities.setMachineAffinity(newTestJob, osName)
|
||||
// Set up standard options.
|
||||
Utilities.addStandardOptions(newTestJob, isPR)
|
||||
// Add the unit test results
|
||||
|
@ -193,7 +193,7 @@ def osShortName = ['Windows 10': 'win10',
|
|||
if (isPR) {
|
||||
// Set PR trigger.
|
||||
// TODO: More elaborate regex trigger?
|
||||
Utilities.addGithubPRTriggerForBranch(newJob, branch, "OuterLoop ${os} ${configurationGroup}", "(?i).*test\\W+outerloop\\W+${os}\\W+${configurationGroup}.*")
|
||||
Utilities.addGithubPRTriggerForBranch(newJob, branch, "OuterLoop ${osName} ${configurationGroup}", "(?i).*test\\W+outerloop\\W+${osName}\\W+${configurationGroup}.*")
|
||||
}
|
||||
else {
|
||||
// Set a periodic trigger
|
||||
|
@ -207,33 +207,33 @@ def osShortName = ['Windows 10': 'win10',
|
|||
// Define outerloop testing for OSes that can build and run. Run locally on each machine.
|
||||
// **************************
|
||||
[true, false].each { isPR ->
|
||||
['Windows 7', 'Windows_NT', 'Ubuntu14.04', 'Ubuntu16.04', 'CentOS7.1', 'OpenSUSE13.2', 'RHEL7.2', 'Fedora23', 'Debian8.4', 'OSX'].each { os ->
|
||||
['Windows 7', 'Windows_NT', 'Ubuntu14.04', 'Ubuntu16.04', 'CentOS7.1', 'OpenSUSE13.2', 'RHEL7.2', 'Fedora23', 'Debian8.4', 'OSX'].each { osName ->
|
||||
['Debug', 'Release'].each { configurationGroup ->
|
||||
|
||||
def newJobName = "outerloop_${osShortName[os]}_${configurationGroup.toLowerCase()}"
|
||||
def newJobName = "outerloop_${osShortName[osName]}_${configurationGroup.toLowerCase()}"
|
||||
|
||||
def newJob = job(Utilities.getFullJobName(project, newJobName, isPR)) {
|
||||
steps {
|
||||
if (os == 'Windows 10' || os == 'Windows 7' || os == 'Windows_NT') {
|
||||
batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build.cmd /p:ConfigurationGroup=${configurationGroup} /p:Outerloop=true /p:WithoutCategories=IgnoreForCI")
|
||||
if (osName == 'Windows 10' || osName == 'Windows 7' || osName == 'Windows_NT') {
|
||||
batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build.cmd -${configurationGroup} -outerloop -- /p:WithoutCategories=IgnoreForCI")
|
||||
}
|
||||
else if (os == 'OSX') {
|
||||
shell("HOME=\$WORKSPACE/tempHome ./build.sh ${configurationGroup.toLowerCase()} /p:ConfigurationGroup=${configurationGroup} /p:Outerloop=true /p:TestWithLocalLibraries=true /p:WithoutCategories=IgnoreForCI")
|
||||
else if (osName == 'OSX') {
|
||||
shell("HOME=\$WORKSPACE/tempHome ./build.sh -${configurationGroup.toLowerCase()} -outerloop -testWithLocalLibraries -- /p:WithoutCategories=IgnoreForCI")
|
||||
}
|
||||
else {
|
||||
shell("sudo HOME=\$WORKSPACE/tempHome ./build.sh ${configurationGroup.toLowerCase()} /p:TestNugetRuntimeId=${targetNugetRuntimeMap[os]} /p:ConfigurationGroup=${configurationGroup} /p:Outerloop=true /p:TestWithLocalLibraries=true /p:WithoutCategories=IgnoreForCI")
|
||||
shell("sudo HOME=\$WORKSPACE/tempHome ./build.sh -${configurationGroup.toLowerCase()} -outerloop -testWithLocalLibraries -- /p:TestNugetRuntimeId=${targetNugetRuntimeMap[osName]} /p:WithoutCategories=IgnoreForCI")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set the affinity. OS name matches the machine affinity.
|
||||
if (os == 'Windows_NT' || os == 'OSX') {
|
||||
Utilities.setMachineAffinity(newJob, os, "latest-or-auto-elevated")
|
||||
if (osName == 'Windows_NT' || osName == 'OSX') {
|
||||
Utilities.setMachineAffinity(newJob, osName, "latest-or-auto-elevated")
|
||||
}
|
||||
else if (osGroupMap[os] == 'Linux') {
|
||||
Utilities.setMachineAffinity(newJob, os, 'outer-latest-or-auto')
|
||||
else if (osGroupMap[osName] == 'Linux') {
|
||||
Utilities.setMachineAffinity(newJob, osName, 'outer-latest-or-auto')
|
||||
} else {
|
||||
Utilities.setMachineAffinity(newJob, os, 'latest-or-auto');
|
||||
Utilities.setMachineAffinity(newJob, osName, 'latest-or-auto');
|
||||
}
|
||||
|
||||
// Set up standard options.
|
||||
|
@ -245,7 +245,7 @@ def osShortName = ['Windows 10': 'win10',
|
|||
if (isPR) {
|
||||
// Set PR trigger.
|
||||
// TODO: More elaborate regex trigger?
|
||||
Utilities.addGithubPRTriggerForBranch(newJob, branch, "OuterLoop ${os} ${configurationGroup}", "(?i).*test\\W+outerloop\\W+${os}\\W+${configurationGroup}.*")
|
||||
Utilities.addGithubPRTriggerForBranch(newJob, branch, "OuterLoop ${osName} ${configurationGroup}", "(?i).*test\\W+outerloop\\W+${osName}\\W+${configurationGroup}.*")
|
||||
}
|
||||
else {
|
||||
// Set a periodic trigger
|
||||
|
@ -261,14 +261,14 @@ def osShortName = ['Windows 10': 'win10',
|
|||
|
||||
// builds with secrets should never be available for pull requests.
|
||||
// right now perf tests are only run on Win10 (but can be built on any Windows)
|
||||
['Windows 10'].each { os ->
|
||||
['Windows 10'].each { osName ->
|
||||
['Debug', 'Release'].each { configurationGroup ->
|
||||
|
||||
def newJobName = "perf_${osShortName[os]}_${configurationGroup.toLowerCase()}"
|
||||
def newJobName = "perf_${osShortName[osName]}_${configurationGroup.toLowerCase()}"
|
||||
|
||||
def newJob = job(Utilities.getFullJobName(project, newJobName, /* isPR */ false)) {
|
||||
steps {
|
||||
helix("Build.cmd /p:Creator=dotnet-bot /p:ArchiveTests=true /p:ConfigurationGroup=${configurationGroup} /p:Configuration=Windows_${configurationGroup} /p:TestDisabled=true /p:EnableCloudTest=true /p:BuildMoniker={uniqueId} /p:TargetQueue=Windows.10.Amd64 /p:TestProduct=CoreFx /p:Branch=master /p:OSGroup=Windows_NT /p:CloudDropAccountName=dotnetbuilddrops /p:CloudResultsAccountName=dotnetjobresults /p:CloudDropAccessToken={CloudDropAccessToken} /p:CloudResultsAccessToken={CloudResultsAccessToken} /p:BuildCompleteConnection={BuildCompleteConnection} /p:BuildIsOfficialConnection={BuildIsOfficialConnection} /p:DocumentDbKey={DocumentDbKey} /p:DocumentDbUri=https://hms.documents.azure.com:443/ /p:FuncTestsDisabled=true /p:Performance=true")
|
||||
helix("Build.cmd -- /p:Creator=dotnet-bot /p:ArchiveTests=true /p:ConfigurationGroup=${configurationGroup} /p:Configuration=Windows_${configurationGroup} /p:TestDisabled=true /p:EnableCloudTest=true /p:BuildMoniker={uniqueId} /p:TargetQueue=Windows.10.Amd64 /p:TestProduct=CoreFx /p:Branch=master /p:OSGroup=Windows_NT /p:CloudDropAccountName=dotnetbuilddrops /p:CloudResultsAccountName=dotnetjobresults /p:CloudDropAccessToken={CloudDropAccessToken} /p:CloudResultsAccessToken={CloudResultsAccessToken} /p:BuildCompleteConnection={BuildCompleteConnection} /p:BuildIsOfficialConnection={BuildIsOfficialConnection} /p:DocumentDbKey={DocumentDbKey} /p:DocumentDbUri=https://hms.documents.azure.com:443/ /p:FuncTestsDisabled=true /p:Performance=true")
|
||||
}
|
||||
// perf tests can be built on any Windows
|
||||
label("windows10 || windows7 || windows")
|
||||
|
@ -290,23 +290,23 @@ def osShortName = ['Windows 10': 'win10',
|
|||
// **************************
|
||||
[true, false].each { isPR ->
|
||||
['Debug', 'Release'].each { configurationGroup ->
|
||||
['Windows_NT', 'Ubuntu14.04', 'Ubuntu16.04', 'Debian8.4', 'CentOS7.1', 'OpenSUSE13.2', 'Fedora23', 'RHEL7.2', 'OSX'].each { os ->
|
||||
def osGroup = osGroupMap[os]
|
||||
def newJobName = "${os.toLowerCase()}_${configurationGroup.toLowerCase()}"
|
||||
['Windows_NT', 'Ubuntu14.04', 'Ubuntu16.04', 'Debian8.4', 'CentOS7.1', 'OpenSUSE13.2', 'Fedora23', 'RHEL7.2', 'OSX'].each { osName ->
|
||||
def osGroup = osGroupMap[osName]
|
||||
def newJobName = "${osName.toLowerCase()}_${configurationGroup.toLowerCase()}"
|
||||
|
||||
def newJob = job(Utilities.getFullJobName(project, newJobName, isPR)) {
|
||||
// On Windows we use the packer to put together everything. On *nix we use tar
|
||||
steps {
|
||||
if (os == 'Windows 10' || os == 'Windows 7' || os == 'Windows_NT') {
|
||||
batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build.cmd /p:ConfigurationGroup=${configurationGroup} /p:OSGroup=${osGroup} /p:WithoutCategories=IgnoreForCI")
|
||||
if (osName == 'Windows 10' || osName == 'Windows 7' || osName == 'Windows_NT') {
|
||||
batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build.cmd -${configurationGroup} -os=${osGroup} -- /p:WithoutCategories=IgnoreForCI")
|
||||
batchFile("C:\\Packer\\Packer.exe .\\bin\\build.pack .\\bin")
|
||||
}
|
||||
else {
|
||||
// Use Server GC for Ubuntu/OSX Debug PR build & test
|
||||
def useServerGC = (configurationGroup == 'Release' && isPR) ? 'useServerGC' : ''
|
||||
shell("HOME=\$WORKSPACE/tempHome ./build.sh ${useServerGC} ${configurationGroup.toLowerCase()} /p:TestNugetRuntimeId=${targetNugetRuntimeMap[os]} /p:ConfigurationGroup=${configurationGroup} /p:TestWithLocalLibraries=true /p:WithoutCategories=IgnoreForCI")
|
||||
shell("HOME=\$WORKSPACE/tempHome ./build.sh -${configurationGroup.toLowerCase()} -testWithLocalLibraries -- ${useServerGC} /p:TestNugetRuntimeId=${targetNugetRuntimeMap[osName]} /p:WithoutCategories=IgnoreForCI")
|
||||
// Tar up the appropriate bits. On OSX the tarring is a different syntax for exclusion.
|
||||
if (os == 'OSX') {
|
||||
if (osName == 'OSX') {
|
||||
shell("tar -czf bin/build.tar.gz --exclude *.Tests bin/*.${configurationGroup} bin/ref bin/packages")
|
||||
}
|
||||
else {
|
||||
|
@ -317,13 +317,13 @@ def osShortName = ['Windows 10': 'win10',
|
|||
}
|
||||
|
||||
// Set the affinity.
|
||||
Utilities.setMachineAffinity(newJob, os, 'latest-or-auto')
|
||||
Utilities.setMachineAffinity(newJob, osName, 'latest-or-auto')
|
||||
// Set up standard options.
|
||||
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
|
||||
// Add the unit test results
|
||||
Utilities.addXUnitDotNETResults(newJob, 'bin/tests/**/testResults.xml')
|
||||
def archiveContents = "msbuild.log"
|
||||
if (os.contains('Windows')) {
|
||||
if (osName.contains('Windows')) {
|
||||
// Packer.exe is a .NET Framework application. When we can use it from the tool-runtime, we can archive the ".pack" file here.
|
||||
archiveContents += ",bin/build.pack"
|
||||
}
|
||||
|
@ -335,11 +335,11 @@ def osShortName = ['Windows 10': 'win10',
|
|||
// Set up triggers
|
||||
if (isPR) {
|
||||
// Set PR trigger, we run Windows_NT, Ubuntu 14.04, CentOS 7.1 and OSX on every PR.
|
||||
if ( os == 'Windows_NT' || os == 'Ubuntu14.04' || os == 'CentOS7.1' || os == 'OSX' ) {
|
||||
Utilities.addGithubPRTriggerForBranch(newJob, branch, "Innerloop ${os} ${configurationGroup} Build and Test")
|
||||
if ( osName == 'Windows_NT' || osName == 'Ubuntu14.04' || osName == 'CentOS7.1' || osName == 'OSX' ) {
|
||||
Utilities.addGithubPRTriggerForBranch(newJob, branch, "Innerloop ${osName} ${configurationGroup} Build and Test")
|
||||
}
|
||||
else {
|
||||
Utilities.addGithubPRTriggerForBranch(newJob, branch, "Innerloop ${os} ${configurationGroup} Build and Test", "(?i).*test\\W+innerloop\\W+${os}\\W+${configurationGroup}.*")
|
||||
Utilities.addGithubPRTriggerForBranch(newJob, branch, "Innerloop ${osName} ${configurationGroup} Build and Test", "(?i).*test\\W+innerloop\\W+${osName}\\W+${configurationGroup}.*")
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -360,14 +360,14 @@ def osShortName = ['Windows 10': 'win10',
|
|||
// **************************
|
||||
[true, false].each { isPR ->
|
||||
['Debug', 'Release'].each { configurationGroup ->
|
||||
['LinuxARMEmulator'].each { os ->
|
||||
def osGroup = osGroupMap[os]
|
||||
def newJobName = "${os.toLowerCase()}_cross_${configurationGroup.toLowerCase()}"
|
||||
['LinuxARMEmulator'].each { osName ->
|
||||
def osGroup = osGroupMap[osName]
|
||||
def newJobName = "${osName.toLowerCase()}_cross_${configurationGroup.toLowerCase()}"
|
||||
def arch = "arm-softfp"
|
||||
|
||||
// Setup variables to hold emulator folder path and the rootfs mount path
|
||||
def armemul_path = '/opt/linux-arm-emulator'
|
||||
def armrootfs_mountpath = '/opt/linux-arm-emulator-root'
|
||||
// Setup variables to hold emulator folder path and the rootfs mount path
|
||||
def armemul_path = '/opt/linux-arm-emulator'
|
||||
def armrootfs_mountpath = '/opt/linux-arm-emulator-root'
|
||||
|
||||
def newJob = job(Utilities.getFullJobName(project, newJobName, isPR)) {
|
||||
steps {
|
||||
|
@ -392,7 +392,7 @@ def osShortName = ['Windows 10': 'win10',
|
|||
|
||||
// Set up triggers
|
||||
if (isPR) {
|
||||
if (os == 'LinuxARMEmulator') {
|
||||
if (osName == 'LinuxARMEmulator') {
|
||||
Utilities.addGithubPRTriggerForBranch(newJob, branch, "Innerloop Linux ARM Emulator ${configurationGroup} Cross Build", "(?i).*test\\W+Innerloop\\W+Linux\\W+ARM\\W+Emulator\\W+${configurationGroup}\\W+Cross\\W+Build.*")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,33 +1,2 @@
|
|||
@if "%_echo%" neq "on" echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
set packagesLog=publish-packages.log
|
||||
echo Running publish-packages.cmd %* > %packagesLog%
|
||||
|
||||
set options=/nologo /v:minimal /flp:v=detailed;Append;LogFile=%packagesLog%
|
||||
set allargs=%*
|
||||
|
||||
if /I [%1] == [/?] goto Usage
|
||||
if /I [%1] == [/help] goto Usage
|
||||
|
||||
REM ensure that msbuild is available
|
||||
echo Running init-tools.cmd
|
||||
call %~dp0init-tools.cmd
|
||||
|
||||
echo msbuild.exe %~dp0src\publish.proj !options! !allargs! >> %packagesLog%
|
||||
call msbuild.exe %~dp0src\publish.proj !options! !allargs!
|
||||
if NOT [%ERRORLEVEL%]==[0] (
|
||||
echo ERROR: An error occurred while publishing packages, see %packagesLog% for more details.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Done publishing packages.
|
||||
exit /b
|
||||
|
||||
:Usage
|
||||
echo.
|
||||
echo Publishes the NuGet packages to the specified location.
|
||||
echo For publishing to Azure the following properties are required.
|
||||
echo /p:CloudDropAccountName="account name"
|
||||
echo /p:CloudDropAccessToken="access token"
|
||||
exit /b
|
||||
@call %~dp0run.cmd publish-packages %*
|
||||
@exit /b %ERRORLEVEL%
|
|
@ -1,39 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Publishes the NuGet packages to the specified location."
|
||||
echo "For publishing to Azure the following properties are required."
|
||||
echo " /p:CloudDropAccountName='account name'"
|
||||
echo " /p:CloudDropAccessToken='access token'"
|
||||
exit 1
|
||||
}
|
||||
|
||||
working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
publish_packages_log=$working_tree_root/publish-packages.log
|
||||
options="/nologo /flp:v=detailed;Append;LogFile=$publish_packages_log"
|
||||
allargs="$@"
|
||||
|
||||
echo -e "Running publish-packages.sh $allargs" > $publish_packages_log
|
||||
|
||||
# Parse arguments
|
||||
if [ "$allargs" == "-h" ] || [ "$allargs" == "--help" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# Ensure that MSBuild is available
|
||||
echo "Running init-tools.sh"
|
||||
$working_tree_root/init-tools.sh
|
||||
|
||||
echo -e "\n$working_tree_root/Tools/dotnetcli/dotnet $working_tree_root/Tools/MSBuild.exe $working_tree_root/src/publish.proj $options $allargs" >> $publish_packages_log
|
||||
$working_tree_root/Tools/dotnetcli/dotnet $working_tree_root/Tools/MSBuild.exe $working_tree_root/src/publish.proj $options $allargs
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\nAn error occurred. Aborting publish-packages.sh ." >> $publish_packages_log
|
||||
echo "ERROR: An error occurred while publishing packages, see $publish_packages_log for more details."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Done publishing packages."
|
||||
echo -e "\nDone publishing packages." >> $publish_packages_log
|
||||
exit 0
|
||||
$working_tree_root/run.sh publish-packages $*
|
||||
exit $?
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
@if "%_echo%" neq "on" echo off
|
||||
setlocal
|
||||
|
||||
if not defined VisualStudioVersion (
|
||||
if defined VS140COMNTOOLS (
|
||||
call "%VS140COMNTOOLS%\VsDevCmd.bat"
|
||||
goto :Run
|
||||
)
|
||||
echo Error: Visual Studio 2015 required.
|
||||
echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:Run
|
||||
:: Clear the 'Platform' env variable for this session, as it's a per-project setting within the build, and
|
||||
:: misleading value (such as 'MCD' in HP PCs) may lead to build breakage (issue: #69).
|
||||
set Platform=
|
||||
|
||||
:: Restore the Tools directory
|
||||
call %~dp0init-tools.cmd
|
||||
if NOT [%ERRORLEVEL%]==[0] exit /b 1
|
||||
|
||||
set _toolRuntime=%~dp0Tools
|
||||
set _dotnet=%_toolRuntime%\dotnetcli\dotnet.exe
|
||||
|
||||
echo Running: %_dotnet% %_toolRuntime%\run.exe %*
|
||||
call %_dotnet% %_toolRuntime%\run.exe %*
|
||||
exit /b %ERRORLEVEL%
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
|
||||
$__scriptpath/init-tools.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
__toolRuntime=$__scriptpath/Tools
|
||||
__dotnet=$__toolRuntime/dotnetcli/dotnet
|
||||
|
||||
echo Running: $__dotnet $__toolRuntime/run.exe $*
|
||||
$__dotnet $__toolRuntime/run.exe $*
|
||||
exit $?
|
|
@ -146,7 +146,9 @@ function cross_build_corefx {
|
|||
git am < "$__ARMRootfsMountPath"/dotnet/setenv/corefx_cross.patch
|
||||
|
||||
#Cross building for emulator rootfs
|
||||
ROOTFS_DIR="$__ARMRootfsMountPath" CPLUS_INCLUDE_PATH=$LINUX_ARM_INCPATH CXXFLAGS=$LINUX_ARM_CXXFLAGS ./build.sh $__buildArch clean cross $__verboseFlag $__buildConfig skiptests
|
||||
ROOTFS_DIR="$__ARMRootfsMountPath" CPLUS_INCLUDE_PATH=$LINUX_ARM_INCPATH CXXFLAGS=$LINUX_ARM_CXXFLAGS
|
||||
BUILD_NATIVE="$ROOTFS_DIR" ./build-native.sh -buildArch=$__buildArch -$__buildConfig -- cross $__verboseFlag
|
||||
BUILD_MANAGED="$ROOTFS_DIR" ./build-managed.sh -buildArch=$__buildArch -$__buildConfig -skipTests
|
||||
|
||||
#Reset the code to the upstream version
|
||||
(set +x; echo 'Rewinding HEAD to master code')
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче