Skip to content

Commit 10fd6f9

Browse files
Update dotnet.yml
1 parent 3724fc6 commit 10fd6f9

File tree

1 file changed

+13
-25
lines changed

1 file changed

+13
-25
lines changed

.github/workflows/dotnet.yml

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
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

64
on:
75
push:
@@ -12,26 +10,16 @@ on:
1210
jobs:
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

0 commit comments

Comments
 (0)