Update CONTRIBUTING.md #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake Build | |
on: | |
push: | |
branches: | |
- main # 触发条件可以根据你的需要进行调整 | |
pull_request: | |
branches: | |
- main # 同样,根据需要进行调整 | |
jobs: | |
build: | |
runs-on: windows-latest # 使用 Windows 最新版本 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Install CMake | |
run: | | |
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' | |
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 | |
- name: Install Visual Studio Build Tools | |
uses: microsoft/[email protected] # 设置 MSBuild 环境 | |
- name: Configure | |
run: cmake -Bbuild | |
- name: Build | |
run: cmake --build build --config Release # 编译 Release 版本,可以根据需要调整 | |
- name: Test | |
run: cmake --build build --target test # 运行测试,如果有的话 | |
- name: Install | |
run: cmake --install build # 安装生成的文件 |