Skip to content

Commit

Permalink
Create cmake-single-platform.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
PKFR4ever authored Jan 3, 2025
1 parent b350787 commit 07b4e14
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/cmake-single-platform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CMake on Windows

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Install CMake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: '3.22.0'

- name: Install MSVC
shell: pwsh
run: |
choco install visualstudio2022buildtools --version=17.0 --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools"
refreshenv
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Run Tests
working-directory: ${{github.workspace}}/build
run: .\tests.exe # 运行你的 Google Test 测试可执行文件

0 comments on commit 07b4e14

Please sign in to comment.