From 5481609554662fc9f0a75286cc51520f62a266fc Mon Sep 17 00:00:00 2001 From: Adam Hathcock Date: Tue, 27 Feb 2018 08:48:45 +0000 Subject: [PATCH 1/2] Build with new cake --- .circleci/config.yml | 10 +++++++--- build.sh | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8cd5464c..a1fa617c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,10 +2,14 @@ version: 2 jobs: build: docker: - - image: adamhathcock/cake-build:latest + - image: microsoft/dotnet:2.0.5-sdk-2.1.4 steps: - checkout + - run: + name: Install unzip + command: | + apt-get update + apt-get install -y unzip - run: name: Build - command: ./build.sh - \ No newline at end of file + command: ./build.sh \ No newline at end of file diff --git a/build.sh b/build.sh index 90111e63..71dd07dc 100755 --- a/build.sh +++ b/build.sh @@ -8,7 +8,7 @@ # Define directories. SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) TOOLS_DIR=$SCRIPT_DIR/tools -CAKE_VERSION=0.23.0 +CAKE_VERSION=0.26.0 CAKE_DLL=$TOOLS_DIR/Cake.CoreCLR.$CAKE_VERSION/Cake.dll # Make sure the tools folder exist. From e27d2ec6604e1c2c784a95a46531b77be2c43eb1 Mon Sep 17 00:00:00 2001 From: Adam Hathcock Date: Thu, 1 Mar 2018 15:35:55 +0000 Subject: [PATCH 2/2] Remove netcoreapp1.x testing --- SharpCompress.sln.DotSettings | 8 ++++++++ build.cake | 13 ++----------- tests/SharpCompress.Test/SharpCompress.Test.csproj | 8 +------- tests/SharpCompress.Test/TestBase.cs | 6 +----- 4 files changed, 12 insertions(+), 23 deletions(-) diff --git a/SharpCompress.sln.DotSettings b/SharpCompress.sln.DotSettings index a3a163da..5b016930 100644 --- a/SharpCompress.sln.DotSettings +++ b/SharpCompress.sln.DotSettings @@ -45,10 +45,14 @@ True 1 1 + NEVER + NEVER False False + NEVER True False + NEVER True True @@ -115,6 +119,10 @@ <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> True + True + True + True True + True True True diff --git a/build.cake b/build.cake index c92639cc..3fc65799 100644 --- a/build.cake +++ b/build.cake @@ -25,7 +25,8 @@ Task("Build") var settings = new DotNetCoreBuildSettings { Framework = "netstandard1.0", - Configuration = "Release" + Configuration = "Release", + NoRestore = true }; DotNetCoreBuild("./src/SharpCompress/SharpCompress.csproj", settings); @@ -50,16 +51,6 @@ Task("Test") Configuration = "Release", Framework = "netcoreapp2.0" }; - - DotNetCoreTest(file.ToString(), settings); - - - settings = new DotNetCoreTestSettings - { - Configuration = "Release", - Framework = "netcoreapp1.1" - }; - DotNetCoreTest(file.ToString(), settings); } }); diff --git a/tests/SharpCompress.Test/SharpCompress.Test.csproj b/tests/SharpCompress.Test/SharpCompress.Test.csproj index 8dbcecb1..a79fe35d 100644 --- a/tests/SharpCompress.Test/SharpCompress.Test.csproj +++ b/tests/SharpCompress.Test/SharpCompress.Test.csproj @@ -1,6 +1,6 @@  - netcoreapp1.1;netcoreapp2.0 + netcoreapp2.0 SharpCompress.Test ../../SharpCompress.snk true @@ -16,10 +16,4 @@ - - - - - - \ No newline at end of file diff --git a/tests/SharpCompress.Test/TestBase.cs b/tests/SharpCompress.Test/TestBase.cs index 4547ad76..423535d2 100644 --- a/tests/SharpCompress.Test/TestBase.cs +++ b/tests/SharpCompress.Test/TestBase.cs @@ -241,13 +241,9 @@ namespace SharpCompress.Test { Monitor.Enter(lockObject); -#if NETSTANDARD20 var index = AppDomain.CurrentDomain.BaseDirectory.IndexOf("SharpCompress.Test", StringComparison.OrdinalIgnoreCase); SOLUTION_BASE_PATH = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory.Substring(0, index)); -#else - var index = Microsoft.Extensions.PlatformAbstractions.PlatformServices.Default.Application.ApplicationBasePath.IndexOf("SharpCompress.Test", StringComparison.OrdinalIgnoreCase); - SOLUTION_BASE_PATH = Path.GetDirectoryName(Microsoft.Extensions.PlatformAbstractions.PlatformServices.Default.Application.ApplicationBasePath.Substring(0, index)); -#endif + TEST_ARCHIVES_PATH = Path.Combine(SOLUTION_BASE_PATH, "TestArchives", "Archives"); ORIGINAL_FILES_PATH = Path.Combine(SOLUTION_BASE_PATH, "TestArchives", "Original"); MISC_TEST_FILES_PATH = Path.Combine(SOLUTION_BASE_PATH, "TestArchives", "MiscTest");