Skip to content

Commit

Permalink
VS2017 - NetCore2
Browse files Browse the repository at this point in the history
  • Loading branch information
snakefoot committed Aug 24, 2017
1 parent 0b2d657 commit f179bb5
Show file tree
Hide file tree
Showing 136 changed files with 812 additions and 10,543 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ build/
*.DotSettings
*.vshost.*
/.vs
/src/.vs
28 changes: 22 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
language: csharp
solution: src/NLog.mono.sln
mono: none
dotnet: 2.0.0
dist: trusty
sudo: required

install:
- nuget restore src/NLog.mono.sln
- nuget install xunit.runners -Version 1.9.2 -OutputDirectory testrunner
# Display dotnet version info
- which dotnet;
if [ $? -eq 0 ]; then
echo "Using dotnet:";
dotnet --info;
else
echo "dotnet.exe not found"
exit 1;
fi

# Restore dependencies
- dotnet restore src/NLog
- dotnet restore src/NLogAutoLoadExtension
- dotnet restore tests/SampleExtensions
- dotnet restore tests/NLog.UnitTests

script:
- xbuild /p:Configuration=Release src/NLog.mono.sln
- mono ./testrunner/xunit.runners.1.9.2/tools/xunit.console.clr4.exe "./build/bin/Release/Mono 2.x/NLog.UnitTests.dll"

# Run tests
- dotnet test tests/NLog.UnitTests --configuration Release
46 changes: 10 additions & 36 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,13 @@
version: 4.4.{build}
version: 4.5.0-beta{build}
image: Visual Studio 2017
configuration: Release
clone_folder: c:\projects\nlog
environment:
github_auth_token:
secure: +vzVo4DsD93fPeSkrIL12KQsq2VJrge4ZSt3KanSxtnifHsBXYmGko4Ck00sVOqD
sonar_token:
secure: GBaeujJgXPbcDto3kyJXpwrTJdPNKNOjwzyzAGNvvKYg+X/S3anpG+8qKMBjjGFI

build_script:
- msbuild src/NLog.proj /verbosity:minimal /t:rebuild /t:xsd /t:NuGetPackage /p:BuildVersion=4.4.12 /p:AssemblyFileVersion=4.4.%APPVEYOR_BUILD_NUMBER% /p:BuildLastMajorVersion=4.0.0 /p:configuration=release /p:BuildLabelOverride=NONE
- msbuild src/NLog.proj /verbosity:minimal /t:BuildTests /p:BuildNetFX35=true /p:BuildNetFX40=true /p:BuildNetFX45=true
- ps: .\run-sonar.ps1

build_script:
- ps: .\build.ps1
test_script:
- tools\CheckSourceCode\NLog.SourceCodeTests.exe no-interactive
- xunit.console.clr4 "build\bin\Debug\.NET Framework 3.5\NLog.UnitTests.dll" /appveyor /noshadow
- xunit.console.clr4 "build\bin\Debug\.NET Framework 4.0\NLog.UnitTests.dll" /appveyor /noshadow
- nuget.exe install OpenCover -ExcludeVersion
- OpenCover\tools\OpenCover.Console.exe -register:user -target:"%xunit20%\xunit.console.x86.exe" -targetargs:"\"C:\projects\nlog\build\bin\Debug\.NET Framework 4.5\NLog.UnitTests.dll\" -appveyor -noshadow" -returntargetcode -filter:"+[NLog]* +[NLog.Extended]* -[NLog]JetBrains.Annotations.*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:coverage.xml
- "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
- pip install codecov
- codecov -f "coverage.xml"

cache:
- src\packages -> **\packages.config
- c:\projects\nlog\appveyor.sonar\cache
services:
- mssql2012sp1

- ps: .\run-tests.ps1
deploy: off
artifacts:
- path: 'build\bin\release\NuGetPackages\*.nupkg'

deploy:
- provider: NuGet
api_key:
secure: DtVDH1ZfIR8E2oDLeSPxfn0WFXw3MCv4WhLkkQQl9LfEHswb5sdxdCYodNKhrKik
artifact: /.*\.nupkg/
on:
branch: master
- path: 'artifacts\*.nupkg'
services:
- mssql2012sp1
8 changes: 8 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# restore and builds all projects as release.
# creates NuGet package at \artifacts
dotnet --version

dotnet restore .\src\NLog\
dotnet pack .\src\NLog\ --configuration release -o artifacts

exit $LASTEXITCODE
9 changes: 9 additions & 0 deletions run-tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dotnet restore .\src\NLogAutoLoadExtension\
dotnet restore .\tests\SampleExtensions\
dotnet restore .\tests\NLog.UnitTests\
dotnet build .\src\NLogAutoLoadExtension\ --configuration release
dotnet build .\tests\SampleExtensions\ --configuration release
dotnet build .\tests\NLog.UnitTests\ --configuration release

dotnet test .\tests\NLog.UnitTests\ --configuration release
exit $LASTEXITCODE
37 changes: 0 additions & 37 deletions src/LocalTestRun.netfx40.testrunconfig

This file was deleted.

37 changes: 0 additions & 37 deletions src/LocalTestRun.netfx45.testrunconfig

This file was deleted.

5 changes: 0 additions & 5 deletions src/LocalTestRun.testrunconfig

This file was deleted.

5 changes: 0 additions & 5 deletions src/LocalTestRun.vs2008.testrunconfig

This file was deleted.

71 changes: 0 additions & 71 deletions src/Mono.targets

This file was deleted.

24 changes: 0 additions & 24 deletions src/NLog.Xamarin.Android.sln

This file was deleted.

24 changes: 0 additions & 24 deletions src/NLog.Xamarin.iOS.sln

This file was deleted.

26 changes: 0 additions & 26 deletions src/NLog.doc.sln

This file was deleted.

Loading

0 comments on commit f179bb5

Please sign in to comment.