Skip to content

Commit

Permalink
Add tools build support
Browse files Browse the repository at this point in the history
  • Loading branch information
vinxue committed Nov 11, 2024
1 parent 35aeb69 commit ef3ab10
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,32 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Set up Visual Studio
run: |
# Use vswhere to find the latest version of Visual Studio
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vsInstallationPath = & $vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
echo "VS Installation Path: $vsInstallationPath"
# Add Visual Studio to ENV
$vcvars = "$vsInstallationPath\VC\Auxiliary\Build\vcvarsx86_amd64.bat"
echo "VCVARS=$vcvars" >> $env:GITHUB_ENV
- 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: |
echo "%VCVARS%"
call "%VCVARS%"
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH_PCIE}}
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH_BITVIEWER}}
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH_KBSIM}}
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH_TIMER}}
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH_IMGCONVERTER}}
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH_STOPWATCH}}
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH_IDCARD}}
shell: cmd

- name: Upload Artifact
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit ef3ab10

Please sign in to comment.