Merge branch 'develop' of https://github.com/nepp95/EppoEngine into d… #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sonarcube Analysis | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ develop, master ] | |
pull_request: | |
branches: [ develop, master ] | |
jobs: | |
config-matrix: | |
runs-on: [ windows-latest ] | |
name: Build and Analyze | |
strategy: | |
matrix: | |
config: [ Debug, Release, Dist ] | |
env: | |
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install sonar-scanner and build-wrapper | |
uses: SonarSource/sonarcloud-github-c-cpp@v3 | |
- name: Setup Premake | |
uses: abel0b/setup-premake@v2.3 | |
with: | |
version: "5.0.0-beta2" | |
path: Vendor/Premake/Bin | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v1.3.1 | |
- name: Cache VulkanSDK | |
id: cache-vulkansdk | |
uses: actions/cache@v4 | |
with: | |
path: "C:/VulkanSDK" | |
key: vulkansdk | |
- name: Download and Install VulkanSDK | |
if: steps.cache-vulkansdk.outputs.cache-hit != 'true' | |
shell: pwsh | |
run: | | |
Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/1.3.275.0/windows/VulkanSDK-1.3.275.0-Installer.exe -OutFile VulkanSDK.exe | |
.\VulkanSDK.exe --accept-licenses --default-answer --confirm-command install com.lunarg.vulkan.debug | |
- name: Run Premake | |
run: .\Vendor\Premake\Bin\Premake5.exe vs2022 | |
- name: Run build-wrapper | |
run: | | |
build-wrapper-win-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} msbuild /m /t:rebuild /nodeReuse:false /p:Configuration=${{ matrix.config }} EppoEngine.sln | |
- name: Run sonar-scanner | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: | | |
sonar-scanner --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" | |