Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 26 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Windows C++ Build
name: C/C++ CI

on:
push:
Expand All @@ -11,18 +11,30 @@ jobs:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up MinGW (G++)
uses: egor-tensin/setup-mingw@v2
with:
version: 12.2.0
platform: x64
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1

- name: Compile with g++
run: |
g++ -std=c++17 -Wall -Wextra ^
WinMain.cpp ^
Generals/Code/Main/*.cpp ^
-o generals.exe
- name: Build with MSBuild
run: |
msbuild Generals/Code/Main/YourProject.dsp `
/p:Configuration=Release `
/p:Platform="Win32" `
/t:Build `
/m `
/clp:ErrorsOnly;Summary

- name: Run static analysis
run: |
msbuild Generals/Code/Main/YourProject.dsp `
/t:Build `
/p:RunCodeAnalysis=true `
/p:CodeAnalysisRuleSet=AllRules

- name: Run tests (if available)
run: |
if exist ".\bin\Release\YourExecutable.exe" (
.\bin\Release\YourExecutable.exe --test
)
Loading