Skip to content

Commit

Permalink
Replaced Travis CI with AppVeyor (#29)
Browse files Browse the repository at this point in the history
Because AppVeyor supports Ubuntu and Mono, we can switch from Travis CI (.NETCore+Mono) and AppVeyor(.NETCore+.NETFX) to AppVeyor only(.NETCore+.NETFX & .NETCore+Mono)
  • Loading branch information
Aragas authored Jul 5, 2018
1 parent 9538d6e commit 9f0049c
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 80 deletions.
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion after_build_docfx.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE -and $env:CONFIGURATION -eq "Release") # is not a pull request
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE -and $env:CONFIGURATION -eq "Release" -and $isWindows) # is not a pull request
{
CD docs
& docfx docfx.json
Expand Down
35 changes: 19 additions & 16 deletions after_test_fx_core.ps1
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# PCLExt.FileStorage.Core.Test
choco install codecov
dotnet tool install -g coveralls.net
CD $env:APPVEYOR_BUILD_FOLDER
CD test\PCLExt.FileStorage.Core.Test
dotnet add package coverlet.msbuild
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=[NUnit*]*
csmacnz.coveralls --opencover -i coverage.opencover.xml --repoToken $env:COVERALLS_REPO_TOKEN
codecov -f coverage.opencover.xml
if($isWindows) #no need to do the coverage on Ubuntu
{
# PCLExt.FileStorage.Core.Test
choco install codecov
dotnet tool install -g coveralls.net
CD $env:APPVEYOR_BUILD_FOLDER
CD test\PCLExt.FileStorage.Core.Test
dotnet add package coverlet.msbuild
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=[NUnit*]*
csmacnz.coveralls --opencover -i coverage.opencover.xml --repoToken $env:COVERALLS_REPO_TOKEN
codecov -f coverage.opencover.xml

# PCLExt.FileStorage.NetFX.Test
CD $env:APPVEYOR_BUILD_FOLDER
nuget install OpenCover -Version 4.6.519 -OutputDirectory tools
nuget install NUnit.ConsoleRunner -Version 3.8.0 -OutputDirectory tools
.\tools\OpenCover.4.6.519\tools\OpenCover.Console.exe -filter:"+[PCLExt.*]* -[PCLExt.FileStorage.NetFX.Test]*" -register:user -target:".\tools\NUnit.ConsoleRunner.3.8.0\tools\nunit3-console.exe" -targetargs:"/domain:single test/PCLExt.FileStorage.NetFX.Test/bin/Debug/PCLExt.FileStorage.NetFX.Test.dll" -output:coverage_netfx.xml
csmacnz.coveralls --opencover -i coverage_netfx.xml --repoToken $env:COVERALLS_REPO_TOKEN
codecov -f coverage_netfx.xml
# PCLExt.FileStorage.NetFX.Test
CD $env:APPVEYOR_BUILD_FOLDER
nuget install OpenCover -Version 4.6.519 -OutputDirectory tools
nuget install NUnit.ConsoleRunner -Version 3.8.0 -OutputDirectory tools
.\tools\OpenCover.4.6.519\tools\OpenCover.Console.exe -filter:"+[PCLExt.*]* -[PCLExt.FileStorage.NetFX.Test]*" -register:user -target:".\tools\NUnit.ConsoleRunner.3.8.0\tools\nunit3-console.exe" -targetargs:"/domain:single test/PCLExt.FileStorage.NetFX.Test/bin/Debug/PCLExt.FileStorage.NetFX.Test.dll" -output:coverage_netfx.xml
csmacnz.coveralls --opencover -i coverage_netfx.xml --repoToken $env:COVERALLS_REPO_TOKEN
codecov -f coverage_netfx.xml
}
2 changes: 1 addition & 1 deletion after_test_nuget-devel.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if($env:CONFIGURATION -eq "Release") # is not a pull request
if($env:CONFIGURATION -eq "Release" -and $isWindows) # is not a pull request
{
cd $env:APPVEYOR_BUILD_FOLDER
cd common
Expand Down
2 changes: 1 addition & 1 deletion after_test_nuget.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if($env:CONFIGURATION -eq "Release" -and $env:APPVEYOR_REPO_TAG -eq "true")
if($env:CONFIGURATION -eq "Release" -and $env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows)
{
cd $env:APPVEYOR_BUILD_FOLDER
cd common
Expand Down
49 changes: 23 additions & 26 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
only:
- master

os: Visual Studio 2017
image:
- Visual Studio 2017
- Ubuntu
configuration:
- Debug
- Release
platform: Any CPU
platform: AnyCPU
version: 1.4.1.{build}

skip_commits:
Expand Down Expand Up @@ -42,9 +44,8 @@
assembly_informational_version: "{version}"

init:
- cd %APPVEYOR_BUILD_FOLDER%
- ps: |
if ($env:APPVEYOR_REPO_TAG -eq "true")
if ($env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows)
{
Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_TAG_NAME)"
}
Expand All @@ -54,21 +55,16 @@

before_build:
- nuget restore
- cd %APPVEYOR_BUILD_FOLDER%
- ps: ./before_build_docfx.ps1

build:
project: PCLExt.FileStorage.sln
verbosity: minimal
build_script:
- ps: ./build.ps1

after_build:
- cd %APPVEYOR_BUILD_FOLDER%
- ps: ./after_build_docfx.ps1

after_test:
- cd %APPVEYOR_BUILD_FOLDER%
- ps: ./after_test_fx_core.ps1
- cd %APPVEYOR_BUILD_FOLDER%
- ps: ./after_test_nuget.ps1


Expand All @@ -80,6 +76,7 @@
artifact: PCLExt.FileStorage.nupkg
on:
configuration: Release
os: Visual Studio 2017
APPVEYOR_REPO_TAG: true


Expand All @@ -91,11 +88,13 @@
only:
- devel

os: Visual Studio 2017
image:
- Visual Studio 2017
- Ubuntu
configuration:
- Debug
- Release
platform: Any CPU
platform: AnyCPU
version: 1.4.1.{build}

skip_commits:
Expand Down Expand Up @@ -128,14 +127,11 @@
before_build:
- nuget restore

build:
project: PCLExt.FileStorage.sln
verbosity: minimal

build_script:
- ps: ./build.ps1

after_test:
- cd %APPVEYOR_BUILD_FOLDER%
- ps: ./after_test_fx_core.ps1
- cd %APPVEYOR_BUILD_FOLDER%
- ps: ./after_test_nuget-devel.ps1

deploy:
Expand All @@ -145,18 +141,21 @@
skip_symbols: false
artifact: PCLExt.FileStorage-devel.nupkg
on:
os: Visual Studio 2017
configuration: Release


########################################################
## ANY OTHER BRANCH ##
########################################################
-
os: Visual Studio 2017
image:
- Visual Studio 2017
- Ubuntu
configuration:
- Release
- Debug
platform: Any CPU
- Release
platform: AnyCPU

skip_commits:
files:
Expand All @@ -177,10 +176,8 @@
before_build:
- nuget restore

build:
project: PCLExt.FileStorage.sln
verbosity: minimal
build_script:
- ps: ./build.ps1

after_test:
- cd %APPVEYOR_BUILD_FOLDER%
- ps: ./after_test_fx_core.ps1
2 changes: 1 addition & 1 deletion before_build_docfx.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE -and $env:CONFIGURATION -eq "Release") # is not a pull request
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE -and $env:CONFIGURATION -eq "Release" -and $isWindows) # is not a pull request
{
git checkout $env:APPVEYOR_REPO_BRANCH -q
choco install docfx -y
Expand Down
17 changes: 17 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
if($isWindows)
{
msbuild PCLExt.FileStorage.sln /verbosity:m
}
if($isLinux)
{
msbuild src/PCLExt.FileStorage.Abstractions
msbuild src/PCLExt.FileStorage.Standard
msbuild src/PCLExt.FileStorage.Portable111
msbuild src/PCLExt.FileStorage.Portable259
msbuild src/PCLExt.FileStorage.NetFX
msbuild test/PCLExt.FileStorage.NetFX.Test
nuget install NUnit.ConsoleRunner -Version 3.9.0 -OutputDirectory packages
mono packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe test/PCLExt.FileStorage.NetFX.Test/bin/Debug/PCLExt.FileStorage.NetFX.Test.dll

dotnet test test/PCLExt.FileStorage.Core.Test
}

0 comments on commit 9f0049c

Please sign in to comment.