From f12887467f2a620bb40f98afc4630ba8d705f37e Mon Sep 17 00:00:00 2001 From: Ben Greenier Date: Sun, 6 Jun 2021 10:01:10 -0700 Subject: [PATCH 1/4] =?UTF-8?q?Add=20GitHub=20Action=20CI=20=E2=9A=99?= =?UTF-8?q?=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/msbuild.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 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 0000000..0725d70 --- /dev/null +++ b/.github/workflows/msbuild.yml @@ -0,0 +1,37 @@ +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: 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}}|${{matrix.BUILD_ARCH}} ${{env.SOLUTION_FILE_PATH}} From 0495d59f2ff88fc76e64be126a41856b03c24108 Mon Sep 17 00:00:00 2001 From: Ben Greenier Date: Sun, 6 Jun 2021 10:03:19 -0700 Subject: [PATCH 2/4] fix(ci): Escape config --- .github/workflows/msbuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 0725d70..d869028 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -34,4 +34,4 @@ jobs: 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}}|${{matrix.BUILD_ARCH}} ${{env.SOLUTION_FILE_PATH}} + run: msbuild /m /p:Configuration="${{matrix.BUILD_TYPE}}|${{matrix.BUILD_ARCH}}" ${{env.SOLUTION_FILE_PATH}} From e64edcd01d081d5fcb8ab8fc86eeb2439d536101 Mon Sep 17 00:00:00 2001 From: Ben Greenier Date: Sun, 6 Jun 2021 10:05:34 -0700 Subject: [PATCH 3/4] fix(ci): Platform --- .github/workflows/msbuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index d869028..d289a94 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -34,4 +34,4 @@ jobs: 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}}|${{matrix.BUILD_ARCH}}" ${{env.SOLUTION_FILE_PATH}} + run: msbuild /m /p:Configuration=${{matrix.BUILD_TYPE}} /p:Platform=${{matrix.BUILD_ARCH}} ${{env.SOLUTION_FILE_PATH}} From ef62a5f341b8d5283b5ae66d89bc69458565f7de Mon Sep 17 00:00:00 2001 From: Ben Greenier Date: Sun, 6 Jun 2021 10:23:38 -0700 Subject: [PATCH 4/4] fix(ci): add old windows sdk --- .github/workflows/msbuild.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index d289a94..8c87ba9 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -26,6 +26,12 @@ jobs: - 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}}