Re-add sonarcloud integration
Somehow it got lost
This commit is contained in:
87
.github/workflows/cmake.yml
vendored
87
.github/workflows/cmake.yml
vendored
@@ -30,6 +30,9 @@ jobs:
|
|||||||
|
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
|
|
||||||
|
env:
|
||||||
|
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
@@ -106,6 +109,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||||
|
|
||||||
|
- name: Install sonar-scanner and build-wrapper
|
||||||
|
uses: SonarSource/sonarcloud-github-c-cpp@v1
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: >-
|
run: >-
|
||||||
@@ -117,7 +125,16 @@ jobs:
|
|||||||
-D STATIC_BUILD=${{ matrix.ui.static }}
|
-D STATIC_BUILD=${{ matrix.ui.static }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build
|
run: |
|
||||||
|
cmake --build build
|
||||||
|
|
||||||
|
- name: Run sonar-scanner
|
||||||
|
if: 0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
run: |
|
||||||
|
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
|
||||||
|
|
||||||
- name: Generate package
|
- name: Generate package
|
||||||
run: cmake --install build
|
run: cmake --install build
|
||||||
@@ -130,10 +147,12 @@ jobs:
|
|||||||
|
|
||||||
llvm-windows:
|
llvm-windows:
|
||||||
name: "Windows vcpkg/LLVM (${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.target.name }})"
|
name: "Windows vcpkg/LLVM (${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.target.name }})"
|
||||||
|
if: 0
|
||||||
|
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
|
||||||
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
|
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
@@ -209,6 +228,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||||
|
|
||||||
|
- name: Install sonar-scanner and build-wrapper
|
||||||
|
uses: SonarSource/sonarcloud-github-c-cpp@v1
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: >
|
run: >
|
||||||
@@ -229,13 +253,24 @@ jobs:
|
|||||||
|
|
||||||
- name: Reconfigure CMake
|
- name: Reconfigure CMake
|
||||||
if: matrix.ui.qt == 'on'
|
if: matrix.ui.qt == 'on'
|
||||||
run: cmake clean build
|
run: |
|
||||||
|
cmake clean build
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build
|
run: |
|
||||||
|
build-wrapper-win-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build
|
||||||
|
|
||||||
|
- name: Run sonar-scanner
|
||||||
|
# if: 0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
run: |
|
||||||
|
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
|
||||||
|
|
||||||
- name: Generate package
|
- name: Generate package
|
||||||
run: cmake --install build
|
run: |
|
||||||
|
cmake --install build
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
@@ -248,6 +283,9 @@ jobs:
|
|||||||
|
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
env:
|
||||||
|
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
@@ -295,6 +333,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||||
|
|
||||||
|
- name: Install sonar-scanner and build-wrapper
|
||||||
|
uses: SonarSource/sonarcloud-github-c-cpp@v1
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: >-
|
run: >-
|
||||||
@@ -305,10 +348,20 @@ jobs:
|
|||||||
-D QT=${{ matrix.ui.qt }}
|
-D QT=${{ matrix.ui.qt }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build
|
run: |
|
||||||
|
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build
|
||||||
|
|
||||||
|
- name: Run sonar-scanner
|
||||||
|
# if: 0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
run: |
|
||||||
|
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
|
||||||
|
|
||||||
- name: Generate package
|
- name: Generate package
|
||||||
run: cmake --install build
|
run: |
|
||||||
|
cmake --install build
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
@@ -321,6 +374,9 @@ jobs:
|
|||||||
|
|
||||||
runs-on: macos-11
|
runs-on: macos-11
|
||||||
|
|
||||||
|
env:
|
||||||
|
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
@@ -362,6 +418,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||||
|
|
||||||
|
- name: Install sonar-scanner and build-wrapper
|
||||||
|
uses: SonarSource/sonarcloud-github-c-cpp@v1
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: >-
|
run: >-
|
||||||
@@ -375,10 +436,20 @@ jobs:
|
|||||||
-D OpenAL_ROOT=$(brew --prefix openal-soft)
|
-D OpenAL_ROOT=$(brew --prefix openal-soft)
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build
|
run: |
|
||||||
|
build-wrapper-macosx-x86 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build
|
||||||
|
|
||||||
|
- name: Run sonar-scanner
|
||||||
|
# if: 0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
run: |
|
||||||
|
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
|
||||||
|
|
||||||
- name: Generate package
|
- name: Generate package
|
||||||
run: cmake --install build
|
run: |
|
||||||
|
cmake --install build
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
Reference in New Issue
Block a user