Skip to content

Commit 48af562

Browse files
authored
Merge pull request #160 from MethanePowered/bugfix/fix-build-with-new-compilers
Methane Kit v0.8.2: fix build with latest compilers, update external dependencies, fix validation errors and rendering stability
2 parents 6c289ec + 990a450 commit 48af562

109 files changed

Lines changed: 3918 additions & 758 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci-build.yml

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ on:
3434
env:
3535
METHANE_VERSION_MAJOR: 0
3636
METHANE_VERSION_MINOR: 8
37-
METHANE_VERSION_PATCH: 1
37+
METHANE_VERSION_PATCH: 2
3838
METHANE_VERSION_BUILD: ${{ github.run_number }}
39-
TRACY_RELEASE_VERSION: "0.11.2.1"
40-
VULKAN_SDK_VERSION: "1.3.290.0"
39+
TRACY_RELEASE_VERSION: "0.14.0.1"
40+
VULKAN_SDK_VERSION: "1.4.350.1"
4141
ORIGIN_REPOSITORY: 'MethanePowered/MethaneKit'
4242

4343
jobs:
@@ -48,71 +48,71 @@ jobs:
4848
include:
4949
- os: windows-latest
5050
name: "Win64_DX_Release"
51-
config_preset: "VS2022-Win64-DX-Default"
52-
build_preset: "VS2022-Win64-DX-Release"
51+
config_preset: "VS2026-Win64-DX-Default"
52+
build_preset: "VS2026-Win64-DX-Release"
5353
named_logo: Windows
5454
run_tests: true
5555
add_tracy_app: false
5656
install_vulkan_sdk: false
5757

5858
- os: windows-latest
5959
name: "Win64_VK_Release"
60-
config_preset: "VS2022-Win64-VK-Default"
61-
build_preset: "VS2022-Win64-VK-Release"
60+
config_preset: "VS2026-Win64-VK-Default"
61+
build_preset: "VS2026-Win64-VK-Release"
6262
named_logo: Windows
6363
run_tests: true
6464
add_tracy_app: false
6565
install_vulkan_sdk: false
6666

6767
- os: windows-latest
6868
name: "Win64_DX_Profile"
69-
config_preset: "VS2022-Win64-DX-Profile"
70-
build_preset: "VS2022-Win64-DX-Profile"
69+
config_preset: "VS2026-Win64-DX-Profile"
70+
build_preset: "VS2026-Win64-DX-Profile"
7171
named_logo: Windows
7272
run_tests: false
7373
add_tracy_app: true
7474
install_vulkan_sdk: false
7575

7676
- os: windows-latest
7777
name: "Win64_VK_Profile"
78-
config_preset: "VS2022-Win64-VK-Profile"
79-
build_preset: "VS2022-Win64-VK-Profile"
78+
config_preset: "VS2026-Win64-VK-Profile"
79+
build_preset: "VS2026-Win64-VK-Profile"
8080
named_logo: Windows
8181
run_tests: false
8282
add_tracy_app: true
8383
install_vulkan_sdk: false
8484

8585
- os: windows-latest
8686
name: "Win32_DX_Release"
87-
config_preset: "VS2022-Win32-DX-Default"
88-
build_preset: "VS2022-Win32-DX-Release"
87+
config_preset: "VS2026-Win32-DX-Default"
88+
build_preset: "VS2026-Win32-DX-Release"
8989
named_logo: Windows
9090
run_tests: true
9191
add_tracy_app: false
9292
install_vulkan_sdk: false
9393

9494
- os: windows-latest
9595
name: "Win32_VK_Release"
96-
config_preset: "VS2022-Win32-VK-Default"
97-
build_preset: "VS2022-Win32-VK-Release"
96+
config_preset: "VS2026-Win32-VK-Default"
97+
build_preset: "VS2026-Win32-VK-Release"
9898
named_logo: Windows
9999
run_tests: true
100100
add_tracy_app: false
101101
install_vulkan_sdk: false
102102

103103
- os: windows-latest
104104
name: "Win32_DX_Profile"
105-
config_preset: "VS2022-Win32-DX-Profile"
106-
build_preset: "VS2022-Win32-DX-Profile"
105+
config_preset: "VS2026-Win32-DX-Profile"
106+
build_preset: "VS2026-Win32-DX-Profile"
107107
named_logo: Windows
108108
run_tests: false
109109
add_tracy_app: true
110110
install_vulkan_sdk: false
111111

112112
- os: windows-latest
113113
name: "Win32_VK_Profile"
114-
config_preset: "VS2022-Win32-VK-Profile"
115-
build_preset: "VS2022-Win32-VK-Profile"
114+
config_preset: "VS2026-Win32-VK-Profile"
115+
build_preset: "VS2026-Win32-VK-Profile"
116116
named_logo: Windows
117117
run_tests: false
118118
add_tracy_app: true
@@ -190,14 +190,18 @@ jobs:
190190

191191
steps:
192192
- name: Checkout repository
193-
uses: actions/checkout@v4
193+
uses: actions/checkout@v7
194194
with:
195195
fetch-depth: 0
196196

197197
- name: Install Linux prerequisites
198198
if: ${{ runner.os == 'Linux' }}
199199
run: ./Build/Unix/CI/InstallLinuxPrerequisites.sh
200200

201+
- name: Install MacOS prerequisites
202+
if: ${{ matrix.os == 'macos-latest' }}
203+
run: ./Build/Unix/CI/InstallMacOsPrerequisites.sh
204+
201205
- name: Install TestSpace
202206
if: ${{ github.repository == env.ORIGIN_REPOSITORY }}
203207
uses: testspace-com/setup-testspace@v1
@@ -209,7 +213,7 @@ jobs:
209213
run: ./Build/Unix/CI/InstallVulkanSdk.sh "${{ env.VULKAN_SDK_VERSION }}" "${{ runner.tool_cache }}/VulkanSDK"
210214

211215
- name: Initialize Externals Cache
212-
uses: actions/cache@v4
216+
uses: actions/cache@v6
213217
with:
214218
path: Build/Output/ExternalsCache
215219
key: ExternalsCache-${{ matrix.config_preset }}-${{ hashFiles('Externals/*.cmake') }}
@@ -235,7 +239,7 @@ jobs:
235239
run: ${{ github.workspace }}\Build\Windows\CI\RunUnitTests.bat junit
236240

237241
- name: Upload Test Results Artifact
238-
uses: actions/upload-artifact@v4
242+
uses: actions/upload-artifact@v7
239243
if: ${{ matrix.run_tests && (success() || failure()) }}
240244
with:
241245
name: MethaneKit_${{ matrix.name }}_TestResults_${{ env.METHANE_VERSION_MAJOR }}.${{ env.METHANE_VERSION_MINOR }}.${{ env.METHANE_VERSION_PATCH }}.${{ env.METHANE_VERSION_BUILD }}
@@ -278,7 +282,7 @@ jobs:
278282

279283
- name: Upload Archived Build Artifacts
280284
if: ${{ success() || failure() }}
281-
uses: actions/upload-artifact@v4
285+
uses: actions/upload-artifact@v7
282286
with:
283287
name: MethaneKit_${{ matrix.name }}_${{ env.METHANE_VERSION_MAJOR }}.${{ env.METHANE_VERSION_MINOR }}.${{ env.METHANE_VERSION_PATCH }}.${{ env.METHANE_VERSION_BUILD }}
284288
path: ${{ env.INSTALL_DIR }}/MethaneKit_${{ matrix.name }}.7z
@@ -312,7 +316,7 @@ jobs:
312316
runs-on: ubuntu-latest
313317
steps:
314318
- name: Upload Event File
315-
uses: actions/upload-artifact@v4
319+
uses: actions/upload-artifact@v7
316320
with:
317321
name: EventFile
318322
path: ${{ github.event_path }}

.github/workflows/ci-codeql-scan.yml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,19 @@ jobs:
4040
include:
4141
- os: windows-latest
4242
name: "Win64_DX_CodeQL-Scan"
43-
config_preset: "VS2022-Win64-DX-Scan"
44-
build_preset: "VS2022-Win64-DX-Scan"
43+
config_preset: "VS2026-Win64-DX-Scan"
44+
build_preset: "VS2026-Win64-DX-Scan"
4545

4646
- os: ubuntu-latest
4747
name: "Ubuntu_VK_CodeQL-Scan"
4848
config_preset: "Make-Lin-VK-Scan"
4949
build_preset: "Make-Lin-VK-Scan"
5050

51-
- os: macos-latest
52-
name: "MacOS_MTL_CodeQL-Scan"
53-
config_preset: "Xcode-Mac-MTL-Scan"
54-
build_preset: "Xcode-Mac-MTL-Scan"
51+
# FIXME: disable CodeQL scan on MacOS because of an issue with Metal Toolchain availability
52+
#- os: macos-latest
53+
# name: "MacOS_MTL_CodeQL-Scan"
54+
# config_preset: "Xcode-Mac-MTL-Scan"
55+
# build_preset: "Xcode-Mac-MTL-Scan"
5556

5657
runs-on: ${{ matrix.os }}
5758

@@ -60,24 +61,32 @@ jobs:
6061

6162
steps:
6263

64+
- name: Checkout repository
65+
uses: actions/checkout@v7
66+
with:
67+
# No later step performs authenticated Git operations (SARIF is uploaded through the API),
68+
# so the checkout token is not persisted into the local Git config.
69+
persist-credentials: false
70+
6371
- name: Install Linux prerequisites
6472
if: ${{ matrix.os == 'ubuntu-latest' }}
6573
run: |
6674
sudo apt update
6775
sudo apt install xcb libx11-dev libx11-xcb-dev libxcb-sync-dev libxcb-randr0-dev
6876
69-
- name: Checkout repository
70-
uses: actions/checkout@v4
77+
- name: Install MacOS prerequisites
78+
if: ${{ matrix.os == 'macos-latest' }}
79+
run: ./Build/Unix/CI/InstallMacOsPrerequisites.sh
7180

7281
- name: Initialize CodeQL
73-
uses: github/codeql-action/init@v3
82+
uses: github/codeql-action/init@v4
7483
with:
7584
languages: cpp
7685
config-file: ./.github/codeql/codeql-config.yml
7786

7887
- name: Initialize Externals Cache
7988
id: cache-externals
80-
uses: actions/cache@v4
89+
uses: actions/cache@v6
8190
env:
8291
cache-name: cache-externals
8392
with:
@@ -91,7 +100,7 @@ jobs:
91100
run: cmake --build --preset ${{ matrix.build_preset }}
92101

93102
- name: Perform CodeQL Analysis
94-
uses: github/codeql-action/analyze@v3
103+
uses: github/codeql-action/analyze@v4
95104
with:
96105
upload: false
97106
output: results
@@ -107,6 +116,6 @@ jobs:
107116
output: results/cpp-filtered.sarif
108117

109118
- name: Upload Filtered CodeQL Results
110-
uses: github/codeql-action/upload-sarif@v3
119+
uses: github/codeql-action/upload-sarif@v4
111120
with:
112121
sarif_file: results/cpp-filtered.sarif

.github/workflows/ci-sonar-scan.yml

Lines changed: 50 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,20 @@ on:
5959
env:
6060
METHANE_VERSION_MAJOR: 0
6161
METHANE_VERSION_MINOR: 8
62-
METHANE_VERSION_PATCH: 1
62+
METHANE_VERSION_PATCH: 2
6363
METHANE_VERSION_BUILD: ${{ github.run_number }}
6464

6565
jobs:
6666
sonar_scan:
6767
name: ${{ matrix.name }}
6868

69+
permissions:
70+
# NOTE: declaring this block sets every omitted scope to "none",
71+
# so "contents: read" has to be listed explicitly for actions/checkout.
72+
contents: read
73+
checks: write
74+
pull-requests: write
75+
6976
# Run sonar scan job only in context of the origin repository:
7077
# - Trigger on either "push" or "pull request" event for the origin repository owned branches
7178
# - Or trigger on "pull request target" event for external repositories to have access to secrets from origin repo context
@@ -119,13 +126,13 @@ jobs:
119126
steps:
120127
- name: Checkout pull-request merge commit from origin
121128
if: ${{ github.event_name != 'pull_request_target' }}
122-
uses: actions/checkout@v4
129+
uses: actions/checkout@v7
123130
with:
124131
fetch-depth: 0 # checkout all history for all branches, as required by Sonar scanner
125132

126133
- name: Checkout pull-request merge commit from fork
127134
if: ${{ github.event_name == 'pull_request_target' }}
128-
uses: actions/checkout@v4
135+
uses: actions/checkout@v7
129136
with:
130137
ref: "${{ github.event.pull_request.merge_commit_sha }}"
131138
fetch-depth: 0 # checkout all history for all branches, as required by Sonar scanner
@@ -134,6 +141,10 @@ jobs:
134141
if: ${{ runner.os == 'Linux' }}
135142
run: ./Build/Unix/CI/InstallLinuxPrerequisites.sh lcov
136143

144+
- name: Install MacOS prerequisites
145+
if: ${{ matrix.os == 'macos-latest' }}
146+
run: ./Build/Unix/CI/InstallMacOsPrerequisites.sh
147+
137148
- name: Install TestSpace
138149
if: ${{ github.event_name == 'push' }}
139150
uses: testspace-com/setup-testspace@v1
@@ -147,17 +158,14 @@ jobs:
147158
dotnet-version: 8.x
148159
dotnet-quality: 'ga'
149160

150-
- name: Install Sonar-Scanner
151-
uses: sonarsource/sonarcloud-github-c-cpp@v3
152-
153161
# Ninja build is required to generate compile commands file used by Sonar-Scanner
154162
- name: Install Ninja
155-
uses: seanmiddleditch/gha-setup-ninja@v5
163+
uses: seanmiddleditch/gha-setup-ninja@v6
156164
with:
157165
version: 1.11.1
158166

159167
- name: Initialize Externals Cache
160-
uses: actions/cache@v4
168+
uses: actions/cache@v6
161169
with:
162170
path: Build/Output/ExternalsCache
163171
key: ExternalsCache-${{ matrix.config_preset }}-${{ hashFiles('Externals/*.cmake') }}
@@ -226,7 +234,7 @@ jobs:
226234

227235
- name: Upload Code Coverage Cobertura Report
228236
if: ${{ success() || failure() }}
229-
uses: actions/upload-artifact@v4
237+
uses: actions/upload-artifact@v7
230238
with:
231239
name: MethaneKit_${{ matrix.name }}_CoverageResults
232240
path: Build/Output/${{ matrix.config_preset }}/Install/Tests/Coverage/Report/Cobertura.xml
@@ -290,23 +298,40 @@ jobs:
290298
action_fail: true
291299
action_fail_on_inconclusive: true
292300

293-
- name: Run Sonar Scanner
294-
if: ${{ success() || failure() }}
295-
shell: bash
301+
- name: Run Sonar Scanner for Push
302+
uses: SonarSource/sonarqube-scan-action@v8.2.0
303+
if: ${{ (success() || failure()) && github.event_name == 'push' }}
296304
env:
297-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
298305
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
299-
SONAR_ORGANIZATION: methane-powered
300-
GITHUB_COMMIT_SHA: ${{ github.event_name == 'push' && github.sha || github.event.pull_request.head.sha }}
301-
GITHUB_PR_FLAG: ${{ (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && 1 || 0 }}
302-
GITHUB_PR_REPO: ${{ github.repository }}
303-
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
304-
GITHUB_PR_BRANCH: ${{ github.event.pull_request.head.ref }}
305-
GITHUB_PR_BASE: ${{ github.event.pull_request.base.ref }}
306-
run: |
307-
./Build/Unix/CI/RunSonarScanner.sh "${{ matrix.sonar_project_key }}" \
308-
"Build/Output/${{ matrix.config_preset }}/Build" \
309-
"Build/Output/${{ matrix.config_preset }}/Install/Tests"
306+
SONAR_HOST_URL: "https://sonarcloud.io"
307+
with:
308+
args: >
309+
--define sonar.projectKey=${{ matrix.sonar_project_key }}
310+
--define sonar.projectVersion=${{ env.METHANE_VERSION_MAJOR }}.${{ env.METHANE_VERSION_MINOR }}.${{ env.METHANE_VERSION_PATCH }}.${{ env.METHANE_VERSION_BUILD }}
311+
--define sonar.cfamily.compile-commands=Build/Output/${{ matrix.config_preset }}/Build/compile_commands.json
312+
--define sonar.testExecutionReportPaths=${{ env.test_results }}
313+
--define sonar.coverageReportPaths=Build/Output/${{ matrix.config_preset }}/Install/Tests/Coverage/Report/SonarQube.xml
314+
--define sonar.scm.revision=${{ github.sha }}
315+
316+
- name: Run Sonar Scanner for Pull-Request
317+
uses: SonarSource/sonarqube-scan-action@v8.2.0
318+
if: ${{ (success() || failure()) && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') }}
319+
env:
320+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
321+
SONAR_HOST_URL: "https://sonarcloud.io"
322+
with:
323+
args: >
324+
--define sonar.projectKey=${{ matrix.sonar_project_key }}
325+
--define sonar.projectVersion=${{ env.METHANE_VERSION_MAJOR }}.${{ env.METHANE_VERSION_MINOR }}.${{ env.METHANE_VERSION_PATCH }}.${{ env.METHANE_VERSION_BUILD }}
326+
--define sonar.cfamily.compile-commands=Build/Output/${{ matrix.config_preset }}/Build/compile_commands.json
327+
--define sonar.testExecutionReportPaths=${{ env.test_results }}
328+
--define sonar.coverageReportPaths=Build/Output/${{ matrix.config_preset }}/Install/Tests/Coverage/Report/SonarQube.xml
329+
--define sonar.scm.revision=${{ github.event.pull_request.head.sha }}
330+
--define sonar.pullrequest.provider=GitHub
331+
--define sonar.pullrequest.github.repository=${{ github.repository }}
332+
--define sonar.pullrequest.key=${{ github.event.pull_request.number }}
333+
--define sonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
334+
--define sonar.pullrequest.base=${{ github.event.pull_request.base.ref }}
310335
311336
- name: Archive Scan Artifacts
312337
if: ${{ success() || failure() }}
@@ -316,7 +341,7 @@ jobs:
316341

317342
- name: Upload Archived Scan Artifacts
318343
if: ${{ success() || failure() }}
319-
uses: actions/upload-artifact@v4
344+
uses: actions/upload-artifact@v7
320345
with:
321346
name: MethaneKit_${{ matrix.name }}_${{ env.METHANE_VERSION_MAJOR }}.${{ env.METHANE_VERSION_MINOR }}.${{ env.METHANE_VERSION_PATCH }}.${{ env.METHANE_VERSION_BUILD }}
322347
path: Build/Output/${{ matrix.config_preset }}/Install/MethaneKit_${{ matrix.name }}.7z

.idea/MethaneKit.iml

Lines changed: 2 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)