diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml new file mode 100644 index 0000000..8c87ba9 --- /dev/null +++ b/.github/workflows/msbuild.yml @@ -0,0 +1,43 @@ +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: ./CppFactory.sln + +jobs: + build: + runs-on: windows-latest + strategy: + matrix: + BUILD_TYPE: ['Debug', 'Release'] + BUILD_ARCH: ['x64', 'x86'] + + steps: + - uses: actions/checkout@v2 + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Setup Windows 10 SDK Action + uses: GuillaumeFalourd/setup-windows10-sdk-action@v1 + with: + # SDK 5-digit version to install (e.g 17763, 18362, 19041) + sdk-version: 15063 + + - name: Restore NuGet packages + working-directory: ${{env.GITHUB_WORKSPACE}} + run: nuget restore ${{env.SOLUTION_FILE_PATH}} + + - name: Build + 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 /p:Configuration=${{matrix.BUILD_TYPE}} /p:Platform=${{matrix.BUILD_ARCH}} ${{env.SOLUTION_FILE_PATH}}