UltimateZoneBuilder/.github/workflows/continuous_integration_windows.yml
alexey.lysiuk d391538337 Report build error in corresponding CI job
Without explicit check for msbuild return code 'Test Files Presence' was marked as failed job
2020-09-12 12:16:25 +03:00

70 lines
2.2 KiB
YAML

name: Continuous Integration - Windows
on: [push, pull_request]
jobs:
build:
name: "Visual Studio ${{ matrix.platform }} ${{ matrix.configuration }}"
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
configuration: [Release, Debug]
platform: [x64, x86]
steps:
- uses: actions/checkout@v1
- name: Build
run: |
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$msbuild = & "$vswhere" -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe | select-object -first 1
$options = @( `
'-property:Configuration=${{ matrix.configuration }}', `
'-property:Platform=${{ matrix.platform }}', `
'-maxcpucount', `
'-verbosity:minimal' `
)
& $msbuild Builder.sln $options
if (-not $?) { throw "Build failed" }
& $msbuild Source\Tools\Updater\Updater.csproj $options
if (-not $?) { throw "Build failed" }
- name: Test Files Presence
run: |
$files = @( `
'Build\Builder.exe', `
'Build\BuilderNative.dll', `
'Build\Plugins\AutomapMode.dll', `
'Build\Plugins\BuilderEffects.dll', `
'Build\Plugins\BuilderModes.dll', `
'Build\Plugins\ColorPicker.dll', `
'Build\Plugins\CommentsPanel.dll', `
'Build\Plugins\NodesViewer.dll', `
'Build\Plugins\SoundPropagationMode.dll', `
'Build\Plugins\StairSectorBuilder.dll', `
'Build\Plugins\TagExplorer.dll', `
'Build\Plugins\TagRange.dll', `
'Build\Plugins\ThreeDFloorMode.dll', `
'Build\Plugins\VisplaneExplorer.dll', `
'Build\Updater.exe' `
)
foreach($file in $files)
{
if (!(Test-Path -Path $file -PathType Leaf))
{
Write-Output "ERROR: File $file is missing"
exit 1
}
}
- name: Prepare Package
run: |
# Delete unwanted files
Remove-Item Build\Setup -recurse
- name: Upload Package
uses: actions/upload-artifact@v1
with:
path: Build
name: "vs_${{ matrix.platform }}_${{ matrix.configuration }}"