Skip to content

Commit 1098e11

Browse files
author
Andy McKay
authored
Merge pull request #708 from benmcmorran/add-msbuild-cpp-workflow
Add MSBuild C/C++ starter workflow
2 parents b247fc6 + c4f8fd3 commit 1098e11

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

ci/msbuild.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: MSBuild
2+
3+
on: [push]
4+
5+
env:
6+
# Path to the solution file relative to the root of the project.
7+
SOLUTION_FILE_PATH: .
8+
9+
# Configuration type to build.
10+
# You can convert this to a build matrix if you need coverage of multiple configuration types.
11+
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
12+
BUILD_CONFIGURATION: Release
13+
14+
jobs:
15+
build:
16+
runs-on: windows-latest
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Add MSBuild to PATH
22+
uses: microsoft/setup-msbuild@v1
23+
24+
- name: Restore NuGet packages
25+
working-directory: ${{env.GITHUB_WORKSPACE}}
26+
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
27+
28+
- name: Build
29+
working-directory: ${{env.GITHUB_WORKSPACE}}
30+
# Add additional options to the MSBuild command line here (like platform or verbosity level).
31+
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
32+
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "MSBuild based projects",
3+
"description": "Build a MSBuild based project.",
4+
"iconName": "c-cpp",
5+
"categories": ["C", "C++"]
6+
}

0 commit comments

Comments
 (0)