Merge pull request #162 from dotnetinstaller/icnocop-patch-1 #97
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches-ignore: | |
- 'gh-pages' | |
pull_request: | |
branches-ignore: | |
- 'gh-pages' | |
env: | |
# set RestoreUseSkipNonexistentTargets=false so running "nuget.exe restore dni.sln" returns a successful exit code (0). | |
# Otherwise, the following errors occur: | |
# .\Samples\PackagedSetup\Simple\Simple.vdproj(1,1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1. [dni.proj] | |
# EXEC : warning : Error reading msbuild project information, ensure that your input solution or project file is valid. NETCore and UAP projects will be skipped, only packages.config files will be restored. [dni.proj] | |
# dni.proj(130,5): error MSB3073: The command "ThirdParty\NuGet\NuGet.exe restore Dni.sln" exited with code -1. | |
RestoreUseSkipNonexistentTargets: false | |
jobs: | |
build: | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
Configuration: [Debug, Release] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Add MSBuild to PATH | |
uses: microsoft/[email protected] | |
- name: Download Win8.1 SDK | |
shell: powershell | |
run: | | |
md C:\win81sdk | |
Invoke-WebRequest -Method Get -Uri https://go.microsoft.com/fwlink/p/?LinkId=323507 -OutFile C:\win81sdk\sdksetup.exe -UseBasicParsing | |
- name: Install Win8.1 SDK | |
shell: powershell | |
run: | | |
Start-Process -Wait C:\win81sdk\sdksetup.exe -ArgumentList "/q", "/norestart", "/features", "OptionId.WindowsDesktopSoftwareDevelopmentKit", "OptionId.NetFxSoftwareDevelopmentKit" | |
- name: Install Microsoft Visual C++ 2010 Runtime 10.0.40219 | |
# This is required for the test method 'testGetRelatedInstalledProducts' in 'dotNetInstallerToolsLibUnitTests\MsiUtilUnitTests.cpp' to succeed. | |
# The windows-2016 virtual environment has an older version, Microsoft Visual C++ 2010 Runtime 10.0.30319. | |
run: choco install vcredist2010 --version=10.0.40219.32503 | |
- name: Build | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild /t:all /m /p:Configuration=${{ matrix.Configuration }} .\dni.proj | |
- name: Upload Build Artifacts | |
uses: actions/[email protected] | |
with: | |
name: ${{ matrix.Configuration }} | |
path: | | |
.\target\${{ matrix.Configuration }}\dotNetInstaller.*.zip | |
.\target\${{ matrix.Configuration }}\dotNetInstaller.*.msi | |
if-no-files-found: error |