Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/nepp95/EppoEngine into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
nepp95 committed Dec 19, 2024
2 parents 21471be + 5a8cee6 commit c4f706b
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 1 deletion.
63 changes: 63 additions & 0 deletions .github/workflows/sonarcube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
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"
2 changes: 1 addition & 1 deletion .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test Report

on:
workflow_run:
workflows: [ develop, master ]
workflows: [ CI ]
types:
- completed

Expand Down
2 changes: 2 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sonar.projectKey=nepp95_EppoEngine
sonar.organization=nepp95

0 comments on commit c4f706b

Please sign in to comment.