X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=appveyor.yml;h=1893d8839b24f39ef7faebf2713205c61aa0f846;hb=b7475a783892406176047e2aca7da6b9e9434105;hp=8ffb7d71ea319f747d4f2cad63ca7812aa1da253;hpb=067ca4c1fc749f5a84501563021545c5fee11765;p=opentween%2Fopen-tween.git diff --git a/appveyor.yml b/appveyor.yml index 8ffb7d71..1893d883 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,38 +1,83 @@ -version: 2.2.0.{build} +version: 3.9.0.{build} -os: Visual Studio 2017 +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 + - /^OpenTween.+/ # release tag + +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 + - ps: Set-Content .\msbuild.rsp "/warnaserror /p:DebugType=None" -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 +test: + assemblies: + only: + - OpenTween.Tests.dll after_test: - - npm install codecov --save - - ./node_modules/.bin/codecov -f coverage.xml - - - del %APPVEYOR_BUILD_FOLDER%\OpenTween\bin\Debug\OpenTween.pdb - - 7z a OpenTween_dev-%APPVEYOR_BUILD_NUMBER%.zip %APPVEYOR_BUILD_FOLDER%\OpenTween\bin\Debug\* - -artifacts: - - name: OpenTween.zip - path: OpenTween_dev-$(APPVEYOR_BUILD_NUMBER).zip + - 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 + '\net48\' + if ($env:RELEASE_TAG -eq 'true') { + $destPath = $env:APPVEYOR_REPO_TAG_NAME + '.zip' + } else { + $destPath = 'OpenTween_dev-' + $env:APPVEYOR_BUILD_NUMBER + '.zip' + } + if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -ne $null) { + $headCommit = $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT + } else { + $headCommit = 'HEAD' + } + .\tools\build-zip-archive.ps1 -BinDir $binDir -DestPath $destPath -HeadCommit $headCommit # vim: et fenc=utf-8 sts=2 sw=2 ts=2