Skip to content

Commit 8958658

Browse files
authored
Update ccpp.yml
1 parent baa8777 commit 8958658

1 file changed

Lines changed: 35 additions & 22 deletions

File tree

.github/workflows/ccpp.yml

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,40 @@ on: [push]
44

55
jobs:
66
build:
7+
runs-on: windows-2022 # or windows-latest
78

8-
runs-on: windows-latest
9-
109
steps:
11-
- uses: actions/checkout@v4
12-
- name: Build DataDisplay
13-
run: |
14-
cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\"
15-
.\MSBuild.exe $Env:GITHUB_WORKSPACE\Source\datadisplay.vcxproj /property:Configuration=Release
16-
17-
- uses: actions/upload-artifact@v4
18-
with:
19-
name: DataDisplay
20-
path: Result/DataDisplay.exe
21-
22-
- name: Build DataGenerator
23-
run: |
24-
cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\"
25-
.\MSBuild.exe $Env:GITHUB_WORKSPACE\Source\datagenerator.vcxproj /property:Configuration=Release
26-
27-
- uses: actions/upload-artifact@v4
28-
with:
29-
name: DataGenerator
30-
path: Result/DataGenerator.exe
10+
- uses: actions/checkout@v4
11+
12+
# Add MSBuild from the installed Visual Studio (2022) to PATH
13+
- name: Setup MSBuild
14+
uses: microsoft/setup-msbuild@v2
15+
with:
16+
msbuild-architecture: Win32
17+
18+
# (Optional) If you need a full VC++ dev environment for custom steps:
19+
# - uses: ilammy/msvc-dev-cmd@v1
20+
# with:
21+
# arch: x64
22+
23+
- name: Build DataDisplay
24+
shell: pwsh
25+
run: |
26+
msbuild "$Env:GITHUB_WORKSPACE\Source\datadisplay.vcxproj" `
27+
/t:Build /p:Configuration=Release /p:Platform=Win32
28+
29+
- uses: actions/upload-artifact@v4
30+
with:
31+
name: DataDisplay
32+
path: Result/DataDisplay.exe
33+
34+
- name: Build DataGenerator
35+
shell: pwsh
36+
run: |
37+
msbuild "$Env:GITHUB_WORKSPACE\Source\datagenerator.vcxproj" `
38+
/t:Build /p:Configuration=Release /p:Platform=Win32
39+
40+
- uses: actions/upload-artifact@v4
41+
with:
42+
name: DataGenerator
43+
path: Result/DataGenerator.exe

0 commit comments

Comments
 (0)