env: # Path to the solution file relative to the root of the project. SOLUTION_FILE_PATH:./revive_hypereal.sln
# Configuration type to build. # You can convert this to a build matrix if you need coverage of multiple configuration types. # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix BUILD_CONFIGURATION:Release
搭建环境
首先确定一下项目需求。这个驱动的代码使用 C++编写,需要在 Windows 环境下使用 VS2022 编译成动态运行库。
-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${{env.SOLUTION_FILE_PATH}}-t:rebuild-property:Configuration=${{env.BUILD_CONFIGURATION}}
打包
一开始本来想打成 7z 压缩包,但是简单 Google 一圈没看到能正常在 windows-latest 环境下正常用的 7z Action,想打 zip 的包,也没看到有可以正常使用的 zip Action。最后在万能的 stackoverflow上找到了答案