Skip to content

Update msbuild.yml

Update msbuild.yml #1

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: MSBuild
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release
permissions:
contents: read
jobs:
build-tests:
name: ${{matrix.config.name}}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
config: # Create matrix with combinations
# Compile for 32-bit platform, enabled AREG extensions and logs
- {name: MSBuild-Win32-ext-log, platform: Win32, extend: 1, logs: 1}
# Compile for 32-bit platform, enabled AREG extensions and no logs
- {name: MSBuild-Win32-ext-nolog, platform: Win32, extend: 1, logs: 0}
# Compile for 32-bit platform, disable AREG extensions and logs
- {name: MSBuild-Win32-noext-log, platform: Win32, extend: 0, logs: 1}
# Compile for 32-bit platform, disable AREG extensions and no logs
- {name: MSBuild-Win32-noext-nolog, platform: Win32, extend: 0, logs: 0}
# Compile for 32-bit platform, enabled AREG extensions and logs
- {name: MSBuild-x64-ext-log, platform: x64, extend: 1, logs: 1}
# Compile for 32-bit platform, enabled AREG extensions and no logs
- {name: MSBuild-x64-ext-nolog, platform: x64, extend: 1, logs: 0}
# Compile for 32-bit platform, disable AREG extensions and logs
- {name: MSBuild-x64-noext-log, platform: x64, extend: 0, logs: 1}
# Compile for 32-bit platform, disable AREG extensions and no logs
- {name: MSBuild-x64-noext-nolog, platform: x64, extend: 0, logs: 0}
steps:
- name: Checkout AREG engine (AREG SDK) source codes and submodules
uses: actions/checkout@v3
with:
submodules: recursive
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
- name: Build areg-sdk solution.
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /property:Configuration=${{env.BUILD_CONFIGURATION}} /property:Platform=${{matrix.config.platform}} /property:AregExtended=${{matrix.config.extend}} /property:AregLogs=${{matrix.config.logs}} ${{env.SOLUTION_FILE_PATH}}