File tree Expand file tree Collapse file tree 1 file changed +13
-25
lines changed Expand file tree Collapse file tree 1 file changed +13
-25
lines changed Original file line number Diff line number Diff line change 1- # This workflow will build a .NET project
2- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3-
4- name : .NET
1+ # This workflow will build a C++ project using g++
2+ name : C++ Build with g++
53
64on :
75 push :
1210jobs :
1311 build :
1412
15- runs-on : windows-latest # Set the environment to Windows
13+ runs-on : windows-latest
1614
1715 steps :
18- - name : Checkout code
19- uses : actions/checkout@v4
20-
21- - name : Setup .NET
22- uses : actions/setup-dotnet@v4
23- with :
24- dotnet-version : ' 8.0.403' # Use '7.0.x' to get the latest patch of .NET 7.0
25-
26- - name : Restore dependencies
27- run : dotnet restore
28-
29- - name : Build
30- run : dotnet build --configuration Release --no-restore # Use Release configuration for builds
31-
32- - name : Run Tests
33- run : dotnet test --configuration Release --no-build --verbosity normal # Run tests with Release configuration
34-
35- - name : Publish
36- run : dotnet publish --configuration Release --no-build -o ./output # Optional: Publish the project
37-
16+ - uses : actions/checkout@v4
17+ - name : Install MinGW (for g++)
18+ run : |
19+ choco install mingw
20+ echo "C:\tools\mingw64\bin" >> $env:GITHUB_PATH
21+ - name : Build C++ Project
22+ run : |
23+ g++ -o output.exe -Wall -Wextra -O2 ./src/*.cpp
24+ - name : Run Executable
25+ run : ./output.exe
You can’t perform that action at this time.
0 commit comments