akka.net/build.sh

101 строка
3.2 KiB
Bash
Исходник Обычный вид История

#!/usr/bin/env bash
##########################################################################
# This is the Fake bootstrapper script for Linux and OS X.
##########################################################################
2015-11-25 01:10:39 +03:00
# Define directories.
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
TOOLS_DIR=$SCRIPT_DIR/tools
INCREMENTALIST_DIR=$TOOLS_DIR/incrementalist
INCREMENTALIST_EXE=$INCREMENTALIST_DIR/Incrementalist.Cmd.exe
NUGET_EXE=$TOOLS_DIR/nuget.exe
NUGET_URL=https://dist.nuget.org/win-x86-commandline/v5.8.0/nuget.exe
FAKE_VERSION=4.63.0
FAKE_EXE=$TOOLS_DIR/FAKE/tools/FAKE.exe
DOTNET_EXE=$SCRIPT_DIR/.dotnet/dotnet
DOTNETCORE_VERSION=3.1.105
DOTNET_VERSION=5.0.101
DOTNET_INSTALLER_URL=https://dot.net/v1/dotnet-install.sh
Move Build System to .NET Core 2.1, projects to .NET Standard 2.0 and .NET 4.5.2 (#3668) * migrated to 'dotnet test' * added missing variable for detecing TeamCity * added more targets for end-to-end testing and building * fixed issue with dotnet test lockup for Akka.Cluster.Tests * upgraded all core projects to standards * fixed all major build issues thus far * upgraded all contrib/cluster projects * completed standardizing all projects * fixed issue with Akka.DI.Core * upgrade Linux to .NET Core 2.0 SDK * further fixes to build.sh * changed search location for MNTR assemblies * upgraded MNTR to .NET 4.6.1 * fixed build.sh dotnet-install command * fixed .NET Core test execution * fixed issue with Akka.Remote.Tests.MultiNode outputting to wrong spot * added channel to build.sh * changed to wget * fixed dotnet installer url * skip API approvals on .NET Core * fixed issue with MNTR NuGet packaging * disabled FsCheck * attempted to address Akka.Persistence memory leak * migrated to 'dotnet test' * added missing variable for detecing TeamCity * added more targets for end-to-end testing and building * fixed issue with dotnet test lockup for Akka.Cluster.Tests * rebased on dev * fixed all major build issues thus far * upgraded all contrib/cluster projects * completed standardizing all projects * fixed issue with Akka.DI.Core * upgrade Linux to .NET Core 2.0 SDK * further fixes to build.sh * changed search location for MNTR assemblies * upgraded MNTR to .NET 4.6.1 * fixed build.sh dotnet-install command * fixed .NET Core test execution * fixed issue with Akka.Remote.Tests.MultiNode outputting to wrong spot * added channel to build.sh * changed to wget * fixed dotnet installer url * skip API approvals on .NET Core * fixed issue with MNTR NuGet packaging * disabled FsCheck * attempted to address Akka.Persistence memory leak * fixed issue with Akka.Streams tests * standardized FluentAssertions version * fixed compilation of TCK * upgraded to .NET Core 2.1 SDK * removed restore stage - no longer needed * bumpe tests to .NET Core 2.1 * Revert "bumpe tests to .NET Core 2.1" This reverts commit f76e09f4c05c0e65efc03eb9d9ba65c6cae2c02e. * workaround https://github.com/Microsoft/msbuild/issues/2275 until .NET Core 2.1 migration * Revert "upgraded to .NET Core 2.1 SDK" This reverts commit b000b7667cd9eb0dc6fb8a8ba15e132af32b33cb. * improved test error result handling * Revert "Revert "upgraded to .NET Core 2.1 SDK"" This reverts commit 1b1a8362a47922bb7c2c917a543c95cc9612cbb2. * Revert "Revert "bumpe tests to .NET Core 2.1"" This reverts commit 175d6cadd71deb9dc55bda88860e88f9a9c6a415. * moving onto .NET Standard 2.0 * standardized most test projects * fixed common.props references * fixed .NET Core 2.1 build systems * fixed issue with packing MNTR * fixed issue with single test failure stopping build * fixed failure handling * fixed issues with Akka.Streams specs * fixed scan for incremental tests * working on FsCheck standardization issues * removed more net implicit standard junk * cleaning up implicit package versions; bumped to JSON.NET 12.0.1 * fixed port bindings for Akka.Cluster.Tools and Akka.Cluster.Sharding so suites could theoretically run in parallel * fixed more ports * fixed compilation errors * rolled back to Newtonsoft.Json 9.0.1 * disabled parallelization in Akka.Streams.Tests * added xunit.runner.json * Disabled xunit.runner.json for Akka.Streams.Tests * added more debug logging to scriptedtest * issue appears to be the 1ms deadline not being long enough on .NET Core - stream isn't even wired up yet * fixed race condition with Bug2640Spec for #2640 needed to give the system more messages to process so we guarantee hitting all four dispatcher threads when running the test suite in parallel. * updated API approvals * fixed issue with Bug2640Spec again No longer looking for an exact thread count since the CPU may not schedule it that. Instead, just ensure that all of the threads hit on the dispatcher shut down when the dispatcher is terminated. * same fix as previous
2019-05-16 21:32:25 +03:00
DOTNET_CHANNEL=LTS
PROTOBUF_VERSION=3.21.5
INCREMENTALIST_VERSION=0.9.0
2015-11-25 01:10:39 +03:00
# Define default arguments.
TARGET="Default"
CONFIGURATION="Release"
VERBOSITY="verbose"
DRYRUN=
SCRIPT_ARGUMENTS=()
2015-11-25 01:10:39 +03:00
# Parse arguments.
for i in "$@"; do
case $1 in
-t|--target) TARGET="$2"; shift ;;
-c|--configuration) CONFIGURATION="$2"; shift ;;
-v|--verbosity) VERBOSITY="$2"; shift ;;
-d|--dryrun) DRYRUN="-dryrun" ;;
--) shift; SCRIPT_ARGUMENTS+=("$@"); break ;;
*) SCRIPT_ARGUMENTS+=("$1") ;;
esac
shift
done
# Make sure the tools folder exist.
if [ ! -d "$TOOLS_DIR" ]; then
mkdir "$TOOLS_DIR"
2015-11-25 01:10:39 +03:00
fi
###########################################################################
# INSTALL NUGET
###########################################################################
2015-11-25 01:10:39 +03:00
# Download NuGet if it does not exist.
if [ ! -f "$NUGET_EXE" ]; then
echo "Downloading NuGet..."
curl -Lsfo "$NUGET_EXE" $NUGET_URL
if [ $? -ne 0 ]; then
echo "An error occured while downloading nuget.exe."
exit 1
fi
fi
###########################################################################
# INSTALL FAKE
###########################################################################
if [ ! -f "$FAKE_EXE" ]; then
mono "$NUGET_EXE" install Fake -ExcludeVersion -Version $FAKE_VERSION -OutputDirectory "$TOOLS_DIR"
if [ $? -ne 0 ]; then
echo "An error occured while installing Cake."
exit 1
fi
fi
2015-11-25 01:10:39 +03:00
# Make sure that Fake has been installed.
if [ ! -f "$FAKE_EXE" ]; then
echo "Could not find Fake.exe at '$FAKE_EXE'."
exit 1
2015-11-25 01:10:39 +03:00
fi
###########################################################################
# INSTALL Incrementalist
###########################################################################
if [ ! -f "$INCREMENTALIST_EXE" ]; then
dotnet tool install Incrementalist.Cmd --version $INCREMENTALIST_VERSION --tool-path "$INCREMENTALIST_DIR"
if [ $? -ne 0 ]; then
echo "Incrementalist already installed."
fi
fi
2017-05-11 17:16:33 +03:00
###########################################################################
# WORKAROUND FOR MONO
###########################################################################
export FrameworkPathOverride=/usr/lib/mono/4.5/
###########################################################################
# RUN BUILD SCRIPT
###########################################################################
2015-11-25 01:10:39 +03:00
# Start Fake
exec mono "$FAKE_EXE" build.fsx "${SCRIPT_ARGUMENTS[@]}" --verbosity=$VERBOSITY --configuration=$CONFIGURATION --target=$TARGET $DRYRUN