From cf13e4109b04d9a56dd6321ec76c12a406ee02ff Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 26 Jul 2024 16:24:07 -0700 Subject: [PATCH] Add MSBuild for GitHUb actions --- .github/workflows/msbuild.yml | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/msbuild.yml diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml new file mode 100644 index 00000000..de9e25d4 --- /dev/null +++ b/.github/workflows/msbuild.yml @@ -0,0 +1,52 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkID=512686 + +name: MSBuild + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + paths-ignore: + - '*.md' + - LICENSE + - '.nuget/*' + - build/* + +permissions: + contents: read + +jobs: + build: + runs-on: windows-${{ matrix.vs }} + + strategy: + fail-fast: false + + matrix: + vs: [2019, 2022] + build_type: [Debug, Release] + platform: [x86, x64, ARM64] + + steps: + - uses: actions/checkout@v4 + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v2 + + - if: matrix.platform != 'ARM64' + name: Restore NuGet packages + working-directory: ${{ github.workspace }} + run: nuget restore ./UVAtlas_${{ matrix.vs }}_Win10.sln + + - name: 'Build' + working-directory: ${{ github.workspace }} + run: msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./UVAtlas_${{ matrix.vs }}_Win10.sln + + - if: matrix.vs == '2022' + name: 'Build (UWP)' + working-directory: ${{ github.workspace }} + run: msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./UVAtlas_Windows10_2022.sln