working on build scripts
This commit is contained in:
parent
f273ea4f7d
commit
d524732bbb
111 changed files with 3052 additions and 1989 deletions
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
# Set up the environment to be used for building with clang.
|
||||
if which "clang-3.5" > /dev/null 2>&1; then
|
||||
export CC="$(which clang-3.5)"
|
||||
export CXX="$(which clang++-3.5)"
|
||||
elif which "clang-3.6" > /dev/null 2>&1; then
|
||||
export CC="$(which clang-3.6)"
|
||||
export CXX="$(which clang++-3.6)"
|
||||
elif which clang > /dev/null 2>&1; then
|
||||
export CC="$(which clang)"
|
||||
export CXX="$(which clang++)"
|
||||
else
|
||||
error "Unable to find Clang Compiler"
|
||||
error "Install clang-3.5 or clang3.6"
|
||||
exit 1
|
||||
fi
|
|
@ -5,33 +5,26 @@
|
|||
|
||||
. $PSScriptRoot\_utility.ps1
|
||||
|
||||
$Skip_Crossgen = $false
|
||||
$Rid = "win7-x64"
|
||||
$Tfm = "dnxcore50"
|
||||
$RepoRoot = Resolve-Path "$PSScriptRoot\..\.."
|
||||
$OutputDir = "$RepoRoot\artifacts\$Rid"
|
||||
$Stage1Dir = "$OutputDir\stage1"
|
||||
$Stage1CompilationDir = "$OutputDir\stage1compilation"
|
||||
$Stage2Dir = "$OutputDir\stage2"
|
||||
$Stage2CompilationDir = "$OutputDir\stage2compilation"
|
||||
$HostDir = "$OutputDir\corehost"
|
||||
$PackageDir = "$RepoRoot\artifacts\packages\dnvm"
|
||||
$TestBinRoot = "$RepoRoot\artifacts\tests"
|
||||
$TestPackageDir = "$TestBinRoot\packages"
|
||||
# Copy things from environment variables that were sent by the build scripts
|
||||
$Rid = $env:Rid
|
||||
$Tfm = $env:Tfm
|
||||
$OutputDir = $env:OutputDir
|
||||
$Stage1Dir = $env:Stage1Dir
|
||||
$Stage1CompilationDir = $env:Stage1CompilationDir
|
||||
$Stage2Dir = $env:Stage2Dir
|
||||
$Stage2CompilationDir = $env:Stage2CompilationDir
|
||||
$HostDir = $env:HostDir
|
||||
$PackageDir = $env:PackageDir
|
||||
$TestBinRoot = $env:TestBinRoot
|
||||
$TestPackageDir = $env:TestPackageDir
|
||||
|
||||
$env:TEST_ROOT = "$OutputDir\tests"
|
||||
$env:TEST_ARTIFACTS = "$env:TEST_ROOT\artifacts"
|
||||
$env:TEST_ROOT = "$OutputDir\tests"
|
||||
$env:TEST_ARTIFACTS = "$env:TEST_ROOT\artifacts"
|
||||
|
||||
$env:ReleaseSuffix = "beta"
|
||||
$env:Channel = "$env:ReleaseSuffix"
|
||||
$env:Channel = "$env:RELEASE_SUFFIX"
|
||||
|
||||
# Set reasonable defaults for unset variables
|
||||
setEnvIfDefault "DOTNET_INSTALL_DIR" "$RepoRoot\.dotnet_stage0\win7-x64"
|
||||
setEnvIfDefault "DOTNET_CLI_VERSION" "0.1.0.0"
|
||||
setEnvIfDefault "SKIP_CROSSGEN" "$Skip_Crossgen"
|
||||
setPathAndHomeIfDefault "$Stage2Dir"
|
||||
setVarIfDefault "Configuration" "Debug"
|
||||
|
||||
# Common Files which depend on above properties
|
||||
. $PSScriptRoot\_nuget.ps1
|
||||
. $PSScriptRoot\_configuration.ps1
|
|
@ -12,23 +12,11 @@ done
|
|||
COMMONDIR="$( cd -P "$( dirname "$COMMONSOURCE" )" && pwd )"
|
||||
|
||||
source "$COMMONDIR/_prettyprint.sh"
|
||||
source "$COMMONDIR/_rid.sh"
|
||||
|
||||
# TODO: Replace this with a dotnet generation
|
||||
export SKIP_CROSSGEN=false
|
||||
export TFM=dnxcore50
|
||||
export REPOROOT=$(cd $COMMONDIR/../.. && pwd)
|
||||
export OUTPUT_ROOT=$REPOROOT/artifacts/$RID
|
||||
export STAGE1_DIR=$OUTPUT_ROOT/stage1
|
||||
export STAGE2_DIR=$OUTPUT_ROOT/stage2
|
||||
export HOST_DIR=$OUTPUT_ROOT/corehost
|
||||
export TEST_BIN_ROOT="$REPOROOT/artifacts/tests"
|
||||
export TEST_PACKAGE_DIR="$TEST_BIN_ROOT/packages"
|
||||
|
||||
# Other variables are set by the outer build script
|
||||
export TEST_ROOT="$OUTPUT_ROOT/tests"
|
||||
export TEST_ARTIFACTS="$TEST_ROOT/artifacts"
|
||||
|
||||
export RELEASE_SUFFIX=beta
|
||||
export CHANNEL=$RELEASE_SUFFIX
|
||||
|
||||
[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$RID
|
||||
|
@ -36,10 +24,6 @@ export CHANNEL=$RELEASE_SUFFIX
|
|||
[ -z "$DOTNET_HOME" ] && export DOTNET_HOME=$STAGE2_DIR && export PATH=$STAGE2_DIR/bin:$PATH
|
||||
[ -z "$CONFIGURATION" ] && export CONFIGURATION=Debug
|
||||
|
||||
# Common Files which depend on above properties
|
||||
source "$COMMONDIR/_nuget.sh"
|
||||
source "$COMMONDIR/_configuration.sh"
|
||||
|
||||
#TODO this is a workaround for a nuget bug on ubuntu. Remove
|
||||
export DISABLE_PARALLEL=""
|
||||
[[ "$RID" =~ "ubuntu" ]] && export DISABLE_PARALLEL="--disable-parallel"
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
function loadTestProjectList()
|
||||
{
|
||||
return Import-CSV "$RepoRoot\scripts\configuration\testProjects.csv" -Header "ProjectName"
|
||||
}
|
||||
|
||||
function loadTestScriptList()
|
||||
{
|
||||
return Import-CSV "$RepoRoot\scripts\configuration\testScripts.csv" -Header "ProjectName"
|
||||
}
|
||||
|
||||
function loadTestPackageList()
|
||||
{
|
||||
return Import-CSV "$RepoRoot\scripts\configuration\testPackageProjects.csv" -Header "ProjectName"
|
||||
}
|
||||
|
||||
function loadBuildProjectList()
|
||||
{
|
||||
return Import-CSV "$RepoRoot\scripts\configuration\buildProjects.csv" -Header "ProjectName"
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
loadTestProjectList()
|
||||
{
|
||||
echo $(cat "$REPOROOT/scripts/configuration/testProjects.csv")
|
||||
}
|
||||
|
||||
loadTestScriptList()
|
||||
{
|
||||
echo $(cat "$REPOROOT/scripts/configuration/testScripts.csv")
|
||||
}
|
||||
|
||||
loadTestPackageList()
|
||||
{
|
||||
echo $(cat "$REPOROOT/scripts/configuration/testPackageProjects.csv")
|
||||
}
|
||||
|
||||
loadBuildProjectList()
|
||||
{
|
||||
echo $(cat "$REPOROOT/scripts/configuration/buildProjects.csv")
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
$env:NUGET_PACKAGES = (Join-Path $env:USERPROFILE ".nuget\packages")
|
||||
$env:DOTNET_PACKAGES = $env:NUGET_PACKAGES
|
||||
$env:DNX_PACKAGES = $env:NUGET_PACKAGES
|
||||
if(!(Test-Path $env:NUGET_PACKAGES)) {
|
||||
mkdir $env:NUGET_PACKAGES | Out-Null
|
||||
}
|
||||
|
||||
# default the package cache expiration to 1 week, in hours
|
||||
setEnvIfDefault "NUGET_PACKAGES_CACHE_TIME_LIMIT" (7 * 24)
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
if [ ! -z "$CI_BUILD" ]; then
|
||||
# On CI, $HOME is redirected under the repo, which gets deleted after every build.
|
||||
# So make $NUGET_PACKAGES outside of the repo.
|
||||
NUGET_PACKAGES=$REPOROOT/../.nuget/packages
|
||||
else
|
||||
NUGET_PACKAGES=~/.nuget/packages
|
||||
fi
|
||||
|
||||
export NUGET_PACKAGES
|
||||
export DOTNET_PACKAGES=$NUGET_PACKAGES
|
||||
export DNX_PACKAGES=$NUGET_PACKAGES
|
||||
|
||||
if [ ! -d $NUGET_PACKAGES ]; then
|
||||
mkdir -p $NUGET_PACKAGES
|
||||
fi
|
||||
|
||||
if [ -z "$NUGET_PACKAGES_CACHE_TIME_LIMIT" ]; then
|
||||
# default the package cache expiration to 1 week, in hours
|
||||
export NUGET_PACKAGES_CACHE_TIME_LIMIT=$(( 7 * 24 ))
|
||||
fi
|
|
@ -1,37 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
export UNAME=$(uname)
|
||||
|
||||
if [ -z "$RID" ]; then
|
||||
if [ "$UNAME" == "Darwin" ]; then
|
||||
export OSNAME=osx
|
||||
if [ -n "$(sw_vers -productVersion | grep 10.10)" ]; then
|
||||
export RID=osx.10.10-x64
|
||||
elif [ -n "$(sw_vers -productVersion | grep 10.11)" ]; then
|
||||
export RID=osx.10.11-x64
|
||||
else
|
||||
error "unknown OS X: $(sw_vers -productVersion)" 1>&2
|
||||
fi
|
||||
elif [ "$UNAME" == "Linux" ]; then
|
||||
# Detect Distro
|
||||
if [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then
|
||||
export OSNAME=ubuntu
|
||||
export RID=ubuntu.14.04-x64
|
||||
elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then
|
||||
export OSNAME=centos
|
||||
export RID=centos.7-x64
|
||||
else
|
||||
error "unknown Linux Distro" 1>&2
|
||||
fi
|
||||
else
|
||||
error "unknown OS: $UNAME" 1>&2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$RID" ]; then
|
||||
exit 1
|
||||
fi
|
|
@ -73,4 +73,4 @@ function _cmd([string]$command)
|
|||
error "Command Failed: 'cmd /c $command'"
|
||||
Exit 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue