Skip to content

Fix MSBuild dependency graph resolution #18

Fix MSBuild dependency graph resolution

Fix MSBuild dependency graph resolution #18

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, closed, reopened]
paths:
- '**/*.cs'
- '**/*.sln'
- '**/*.proj'
- '**/*.csproj'
- '**/*.vcxproj'
- '**/*.props'
- '**/*.targets'
- '**/packages.lock.json'
workflow_dispatch:
env:
MSBUILD_CACHES: |
**/bin
**/obj
**/Win32
**/x64
MSBUILD_DEFAULTS: /m:2 /v:m /clp:Summary /p:Configuration=Release /p:Platform="Any CPU"
NUGET_CACHES: |
~/.nuget/packages
NUGET_DEFAULTS: -Verbosity quiet -NonInteractive -ConfigFile NuGet.Config -UseLockFile
jobs:
# Runs test suite
build:
runs-on: windows-latest
name: "MSBuild Runner"
steps:
# Fetches remote repository without --progress option.
#
# The default behavior of @actions/checkout outputs many noisy lines of
# status output in the workflow log, which is problematic for log size.
- name: Checkout latest repository commit
uses: actions/checkout@v4
with:
show-progress: false
# Setup the .NET environment
- name: Install .NET Core
uses: actions/setup-dotnet@v3
# Setup MSBuild environment
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.3.1
- name: Restore Build Cache
id: msbuild-cache
uses: actions/cache@v3
with:
path: ${{ env.MSBUILD_CACHES }}
key: ${{ runner.os }}-msbuild-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-msbuild-${{ github.ref_name }}
${{ runner.os }}-msbuild-
# Setup NuGet environment
- name: Setup NuGet
uses: NuGet/setup-nuget@v1.2.0
- name: Restore NuGet Cache
id: nuget-cache
uses: actions/cache@v3
with:
path: ${{ env.NUGET_CACHES }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore NuGet packages
if: steps.nuget-cache.outputs.cache-hit != 'true'
run: nuget restore SDK.sln ${{ env.NUGET_DEFAULTS }}
# Build MTGO reference assemblies
- name: Build Reference Assemblies
run: msbuild Ref.sln /t:Build ${{ env.MSBUILD_DEFAULTS }}
# Build the SDK
- name: Build SDK Solution
run: msbuild SDK.sln /t:Build ${{ env.MSBUILD_DEFAULTS }}