X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=appveyor.yml;h=43838a454f941dc671111ca4bcbdc45b98893060;hb=26561242a3298d4eca668f7352a43d8b5ee6c702;hp=3b0402a6f999860e22c3ac419bb5a650214db2f0;hpb=6f4777e1427b09e2d67e402a1e0b267f803d5fd7;p=opentween%2Fopen-tween.git diff --git a/appveyor.yml b/appveyor.yml index 3b0402a6..43838a45 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,38 +1,88 @@ -version: 2.3.1.{build} +version: 2.5.0.{build} -os: Visual Studio 2019 +os: Visual Studio 2022 -assembly_info: - patch: true - file: OpenTween\Properties\AssemblyInfo.cs - assembly_file_version: '{version}' +environment: + matrix: + - RELEASE_TAG: 'false' + - RELEASE_TAG: 'true' + +configuration: + - Debug + - Release + +matrix: + exclude: + - RELEASE_TAG: 'false' + configuration: Release + - RELEASE_TAG: 'true' + configuration: Debug + +branches: + only: + - develop + - release + +for: + - # for dev build + matrix: + only: + - RELEASE_TAG: 'false' + skip_tags: true + assembly_info: + patch: true + file: OpenTween\Properties\AssemblyInfo.cs + assembly_version: '{version}' + artifacts: + - name: OpenTween.zip + path: OpenTween_dev-$(APPVEYOR_BUILD_NUMBER).zip + - # for release build + matrix: + only: + - RELEASE_TAG: 'true' + skip_non_tags: true + artifacts: + - name: OpenTween.zip + path: $(APPVEYOR_REPO_TAG_NAME).zip build: project: OpenTween.sln verbosity: minimal cache: - - ./packages/ + - '%UserProfile%\.nuget\packages -> OpenTween\OpenTween.csproj, OpenTween.Tests\OpenTween.Tests.csproj' init: - git config --global core.autocrlf true before_build: - nuget restore - - choco install opencover.portable test_script: - - OpenCover.Console.exe -register:user -target:"%xunit20%\xunit.console.x86.exe" -targetargs:".\OpenTween.Tests\bin\Debug\net472\OpenTween.Tests.dll -noshadow -appveyor" -filter:"+[OpenTween*]* -[OpenTween.Tests]*" -excludebyfile:"*.Designer.cs" -skipautoprops -hideskipped:All -returntargetcode -output:coverage.xml + - cmd: | + set altCoverVersion=8.2.837 + set xunitVersion=2.4.1 + set targetFramework=net472 + set nugetPackages=%UserProfile%\.nuget\packages -after_test: - - npm install codecov --save - - ./node_modules/.bin/codecov -f coverage.xml + %nugetPackages%\altcover\%altCoverVersion%\tools\%targetFramework%\AltCover.exe --inputDirectory .\OpenTween.Tests\bin\Debug\%targetFramework%\ --outputDirectory .\__Instrumented\ --assemblyFilter "?^OpenTween(?!\.Tests)" --typeFilter "?^OpenTween\." --fileFilter "\.Designer\.cs" --visibleBranches - - del %APPVEYOR_BUILD_FOLDER%\OpenTween\bin\Debug\OpenTween.pdb - - 7z a OpenTween_dev-%APPVEYOR_BUILD_NUMBER%.zip %APPVEYOR_BUILD_FOLDER%\OpenTween\bin\Debug\* + %nugetPackages%\altcover\%altCoverVersion%\tools\%targetFramework%\AltCover.exe runner --recorderDirectory .\__Instrumented\ --executable %nugetPackages%\xunit.runner.console\%xunitVersion%\tools\%targetFramework%\xunit.console.exe -- .\__Instrumented\OpenTween.Tests.dll -artifacts: - - name: OpenTween.zip - path: OpenTween_dev-$(APPVEYOR_BUILD_NUMBER).zip +after_test: + - ps: | + Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile codecov.exe + .\codecov.exe -f coverage.xml + - ps: | + $env:PATH = $env:PATH + ';C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\Roslyn\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\' + $binDir = '.\OpenTween\bin\' + $env:CONFIGURATION + '\' + $objDir = '.\OpenTween\obj\' + $env:CONFIGURATION + '\' + $assemblyInfo = '.\OpenTween\Properties\AssemblyInfo.cs' + if ($env:RELEASE_TAG -eq 'true') { + $destPath = $env:APPVEYOR_REPO_TAG_NAME + '.zip' + } else { + $destPath = 'OpenTween_dev-' + $env:APPVEYOR_BUILD_NUMBER + '.zip' + } + .\tools\build-zip-archive.ps1 -BinDir $binDir -ObjDir $objDir -AssemblyInfo $assemblyInfo -DestPath $destPath # vim: et fenc=utf-8 sts=2 sw=2 ts=2