Skip to content

Commit

Permalink
Merge pull request #38 from sharwell/build-release
Browse files Browse the repository at this point in the history
Build debug and release configurations on AppVeyor
  • Loading branch information
sharwell authored Sep 18, 2018
2 parents f92f58c + bb8a7e1 commit 837bda2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .nuget/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Codecov" version="1.0.1" />
<package id="Codecov" version="1.1.0" />
<package id="Microsoft.DiaSymReader.Pdb2Pdb" version="1.1.0-beta1-62624-01" />
<package id="OpenCover" version="4.6.519" />
<package id="ReportGenerator" version="2.3.5.0" targetFramework="net452" />
Expand Down
25 changes: 20 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,36 @@ version: '{build}'
image: Visual Studio 2017
init:
- git config --global core.autocrlf true
configuration:
- Debug
- Release
before_build:
- nuget restore
build:
project: DocumentationAnalyzers.sln
verbosity: minimal
test_script:
- cd build
- ps: .\opencover-report.ps1 -Debug -NoBuild -NoReport -AppVeyor
- ps: |
if ($env:Configuration -eq 'Debug') {
.\opencover-report.ps1 -Debug -NoBuild -NoReport -AppVeyor
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
$packageConfig = [xml](Get-Content ..\.nuget\packages.config)
$codecov_version = $packageConfig.SelectSingleNode('/packages/package[@id="Codecov"]').version
$codecov = "..\packages\Codecov.$codecov_version\tools\codecov.exe"
&$codecov -f '..\build\OpenCover.Reports\OpenCover.DocumentationAnalyzers.xml'
} else {
.\opencover-report.ps1 -NoBuild -NoReport -AppVeyor
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
}
- cd ..
- .\packages\Codecov.1.0.1\tools\codecov.exe -f ".\build\OpenCover.Reports\OpenCover.DocumentationAnalyzers.xml"
- .\DocumentationAnalyzers\DocumentationAnalyzers.Status.Generator\bin\Debug\net46\DocumentationAnalyzers.Status.Generator.exe .\DocumentationAnalyzers.sln > DocumentationAnalyzers.Status.json
- .\DocumentationAnalyzers\DocumentationAnalyzers.Status.Generator\bin\%Configuration%\net46\DocumentationAnalyzers.Status.Generator.exe .\DocumentationAnalyzers.sln > DocumentationAnalyzers.Status.json
cache:
- packages -> **\packages.config
- C:\Users\appveyor\.nuget\packages -> appveyor.yml

# 'Release' is hard-coded to ensure VSIX and NuGet artifacts are only published for release configuration builds
artifacts:
- path: 'DocumentationAnalyzers\**\*.vsix'
- path: 'DocumentationAnalyzers\**\*.nupkg'
- path: 'DocumentationAnalyzers\DocumentationAnalyzers.Vsix\bin\Release\net452\*.vsix'
- path: 'DocumentationAnalyzers\DocumentationAnalyzers.CodeFixes\bin\Release\*.nupkg'
- path: 'DocumentationAnalyzers.Status.json'
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ <h3>Commit information</h3>
</script>

<script type="text/javascript">
$.getJSON("https://ci.appveyor.com/api/projects/sharwell/Documentationanalyzers/artifacts/DocumentationAnalyzers.Status.json?branch=master&pr=false&stream=true", function (data) {
$.getJSON("https://ci.appveyor.com/api/projects/sharwell/Documentationanalyzers/artifacts/DocumentationAnalyzers.Status.json?branch=master&pr=false&stream=true&job=Configuration:%20Release", function (data) {
$("#renderedDiagnostics").html($.templates($("#diagnostics").html()).render(data));
$("#renderedCommitInfo").html($.templates($("#commitInfo").html()).render(data.git));
});
Expand Down

0 comments on commit 837bda2

Please sign in to comment.