Skip to content

Commit 910728d

Browse files
authored
Added SonarCloud analisys to C/C++ CI workflow.
1 parent 629f0d2 commit 910728d

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

.github/workflows/c-cpp.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ jobs:
1111
name: build-windows-vs
1212
runs-on: windows-latest
1313
steps:
14-
- name: compile with VS 2022
14+
- name: Compile with VS 2022
1515
shell: cmd
1616
run: ${{ '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" && msbuild' }}
1717
working-directory: 'likespro.eth - UNIVERSAL'
18-
- name: run
18+
- name: Run
1919
run: |
2020
'x64\Release\likespro.eth - UNIVERSAL.exe'
2121
shell: cmd
22-
- name: upload executable
22+
- name: Upload executable
2323
uses: actions/upload-artifact@v4
2424
with:
2525
name: windows
@@ -32,14 +32,14 @@ jobs:
3232
- uses: actions/checkout@v4
3333
- name: Set up MinGW
3434
uses: egor-tensin/setup-mingw@v2
35-
- name: compile with GCC
35+
- name: Compile with MinGW
3636
run: |
3737
g++ -std=c++17 'likespro.eth - UNIVERSAL/likespro.eth - UNIVERSAL.cpp' -o 'likespro.eth - UNIVERSAL.exe'
38-
- name: run
38+
- name: Run
3939
run: |
4040
'./likespro.eth - UNIVERSAL.exe'
4141
shell: bash
42-
- name: upload executable
42+
- name: Upload executable
4343
uses: actions/upload-artifact@v4
4444
with:
4545
name: ${{matrix.os}}
@@ -53,16 +53,27 @@ jobs:
5353
name: 'build-${{matrix.os}}'
5454
steps:
5555
- uses: actions/checkout@v4
56-
- name: compile with GCC
56+
- name: Compile with GCC
5757
run: |
5858
g++ -std=c++17 'likespro.eth - UNIVERSAL/likespro.eth - UNIVERSAL.cpp' -o 'likespro.eth - UNIVERSAL.o'
59-
- name: run
59+
- name: Run
6060
run: |
6161
'./likespro.eth - UNIVERSAL.o'
6262
shell: bash
63-
- name: upload executable
63+
- name: Upload executable
6464
uses: actions/upload-artifact@v4
6565
with:
6666
name: ${{matrix.os}}
6767
path: |
6868
'likespro.eth - UNIVERSAL.o'
69+
sonarcloud:
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@v4
73+
with:
74+
# Disabling shallow clone is recommended for improving relevancy of reporting
75+
fetch-depth: 0
76+
- name: SonarCloud Scan
77+
uses: sonarsource/[email protected] # Ex: v2.1.0, See the latest version at https://github.com/marketplace/actions/sonarcloud-scan
78+
env:
79+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 commit comments

Comments
 (0)