Skip to content

Commit 3ee3404

Browse files
committed
pull master & resolve conflicts
2 parents ea86bf8 + 31f9fd9 commit 3ee3404

File tree

88 files changed

+7408
-1879
lines changed

Some content is hidden

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

88 files changed

+7408
-1879
lines changed

.github/workflows/build-nabla.yml

Lines changed: 87 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Nabla Workflow
1+
name: Build
22

33
on:
44
push:
@@ -7,14 +7,16 @@ on:
77

88
permissions:
99
contents: read
10+
checks: write
1011

1112
concurrency:
1213
group: push-lock-${{ github.ref }}
1314
cancel-in-progress: true
1415

1516
jobs:
1617
build-windows:
17-
runs-on: windows-2022
18+
name: Nabla (${{ matrix.os }}, ${{ matrix.vendor }}-${{ matrix.tag }}, ${{ matrix.config }})
19+
runs-on: ${{ matrix.os }}
1820

1921
env:
2022
image: ghcr.io/devsh-graphics-programming/docker-nanoserver-msvc-winsdk
@@ -33,6 +35,7 @@ jobs:
3335
vendor: [msvc]
3436
config: [Release, Debug, RelWithDebInfo]
3537
tag: ['17.13.6']
38+
os: [windows-2022]
3639

3740
steps:
3841
- name: Environment Setup
@@ -129,7 +132,30 @@ jobs:
129132
--preset ci-build-dynamic-${{ matrix.vendor }} `
130133
-t run-compiler-explorer --config ${{ matrix.config }}
131134
132-
- name: Container – Build Examples
135+
- name: Container – Install Nabla
136+
run: |
137+
docker exec orphan `
138+
${{ env.entry }} ${{ env.cmd }} -Command cmake --install `
139+
${{ env.binary }} --config ${{ matrix.config }} `
140+
--prefix ${{ env.install }}
141+
142+
- name: API / Examples / Check Run (Create)
143+
id: check-run-create
144+
uses: actions/github-script@v6
145+
with:
146+
github-token: ${{ secrets.GITHUB_TOKEN }}
147+
result-encoding: string
148+
script: |
149+
const response = await github.rest.checks.create({
150+
owner: context.repo.owner,
151+
repo: context.repo.repo,
152+
name: `Examples (${{ matrix.os }}, ${{ matrix.vendor }}-${{ matrix.tag }}, ${{ matrix.config }})`,
153+
head_sha: context.sha,
154+
status: 'in_progress'
155+
});
156+
return response.data.id;
157+
158+
- name: Container – Build & Install Examples
133159
id: build-examples
134160
continue-on-error: true
135161
run: |
@@ -139,21 +165,39 @@ jobs:
139165
-t examples_tests\all --config ${{ matrix.config }} `
140166
-- -k 0
141167
142-
- name: Container – Install Nabla
143-
run: |
144168
docker exec orphan `
145169
${{ env.entry }} ${{ env.cmd }} -Command cmake --install `
146-
${{ env.binary }} --config ${{ matrix.config }} `
170+
${{ env.binary }}\examples_tests --config ${{ matrix.config }} `
147171
--prefix ${{ env.install }}
148172
149-
- name: Container – Install Examples
150-
id: install-examples
151-
continue-on-error: true
173+
- name: API / Examples / Check Run (Conclusion)
174+
id: outcome-examples
152175
run: |
153-
docker exec orphan `
154-
${{ env.entry }} ${{ env.cmd }} -Command cmake --install `
155-
${{ env.binary }}\examples_tests --config ${{ matrix.config }} `
156-
--prefix ${{ env.install }}
176+
$completedAt = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
177+
if ("${{ steps.build-examples.outcome }}" -eq "success") {
178+
"conclusion=success" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
179+
} else {
180+
"conclusion=failure" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
181+
}
182+
"completed_at=$completedAt" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
183+
184+
- name: API / Examples / Check Run (Update)
185+
uses: actions/github-script@v6
186+
with:
187+
github-token: ${{ secrets.GITHUB_TOKEN }}
188+
script: |
189+
await github.rest.checks.update({
190+
owner: context.repo.owner,
191+
repo: context.repo.repo,
192+
check_run_id: ${{ steps.check-run-create.outputs.result }},
193+
status: 'completed',
194+
conclusion: '${{ steps.outcome-examples.outputs.conclusion }}',
195+
completed_at: '${{ steps.outcome-examples.outputs.completed_at }}',
196+
output: {
197+
title: '',
198+
summary: '[View logs](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) to see details.'
199+
}
200+
});
157201
158202
- name: Container – Save NSC Image
159203
run: |
@@ -268,20 +312,39 @@ jobs:
268312
commit_message: "[CI] badges update"
269313

270314
deploy-production:
271-
name: Deploy to production host
315+
name: Deploy Godbolt production image
272316
if: ${{ always() && github.ref == 'refs/heads/master' }}
273317
needs: build-windows
274-
runs-on: ubuntu-latest
318+
runs-on: windows-2022
275319

276320
steps:
277-
- name: Pull latest images, re-run containers
278-
uses: appleboy/ssh-action@v1
279-
with:
280-
host: ${{ secrets.CE_HOST }}
281-
username: ${{ secrets.CE_USER }}
282-
key: ${{ secrets.CE_KEY }}
283-
script: |
284-
powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -NoExit -File C:\Scripts\startup-docker.ps1
321+
- name: Invoke Web Request
322+
run: |
323+
function Invoke-UpdateImages {
324+
param(
325+
[string]$Token,
326+
[string]$Url = 'https://godbolt.devsh.eu/api/update-images'
327+
)
328+
329+
$resp = Invoke-WebRequest -Method Post `
330+
-Uri $Url `
331+
-Headers @{ 'X-API-Token' = $Token } `
332+
-SkipHttpErrorCheck
333+
334+
$httpCode = $resp.StatusCode
335+
$body = $resp.Content | ConvertFrom-Json
336+
337+
Write-Host "HTTP code : $httpCode"
338+
Write-Host "status : $($body.status)"
339+
Write-Host "message : $($body.message)"
340+
341+
if ($httpCode -ne 200) {
342+
throw "Request failed"
343+
}
344+
}
345+
346+
$token = '${{ secrets.CE_IMAGE_UPDATE_TOKEN }}'
347+
Invoke-UpdateImages -Token $token
285348
286349
smoke-tests:
287350
name: smoke-windows
@@ -318,4 +381,4 @@ jobs:
318381
cd smoke
319382
cmake . -B out
320383
cmake --build out --config ${{ matrix.config }}
321-
ctest --test-dir out --force-new-ctest-process --output-on-failure --no-tests=error -C ${{ matrix.config }}
384+
ctest --test-dir out --force-new-ctest-process --output-on-failure --no-tests=error -C ${{ matrix.config }}

3rdparty/dxc/dxc

Submodule dxc updated 371 files

CMakePresets.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"name": "ci-configure-base",
1111
"hidden": true,
1212
"cacheVariables": {
13+
"CMAKE_SUPPRESS_REGENERATION": "ON",
1314
"NBL_EMBED_BUILTIN_RESOURCES": "ON",
1415
"NBL_UPDATE_GIT_SUBMODULE": "OFF",
1516
"NBL_COMPILE_WITH_CUDA": "OFF",
@@ -475,4 +476,4 @@
475476
}
476477
}
477478
]
478-
}
479+
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
</div>
55

66
<p align="center">
7-
<a href="https://github.com/Devsh-Graphics-Programming/Nabla/actions">
8-
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Devsh-Graphics-Programming/Nabla/badges/nabla/build.json" alt="Build Status" /></a>
7+
<a href="https://github.com/Devsh-Graphics-Programming/Nabla/actions/workflows/build-nabla.yml">
8+
<img src="https://github.com/Devsh-Graphics-Programming/Nabla/actions/workflows/build-nabla.yml/badge.svg" alt="Build Status" /></a>
99
<a href="https://opensource.org/licenses/Apache-2.0">
1010
<img src="https://img.shields.io/badge/license-Apache%202.0-blue" alt="License: Apache 2.0" /></a>
1111
<a href="https://discord.gg/krsBcABm7u">

cmake/common.cmake

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,13 +1242,17 @@ struct DeviceConfigCaps
12421242
endif()
12431243

12441244
set(REQUIRED_SINGLE_ARGS TARGET BINARY_DIR OUTPUT_VAR INPUTS INCLUDE NAMESPACE MOUNT_POINT_DEFINE)
1245-
cmake_parse_arguments(IMPL "" "${REQUIRED_SINGLE_ARGS}" "COMMON_OPTIONS" ${ARGV})
1245+
cmake_parse_arguments(IMPL "" "${REQUIRED_SINGLE_ARGS};LINK_TO" "COMMON_OPTIONS;DEPENDS" ${ARGV})
12461246
NBL_PARSE_REQUIRED(IMPL ${REQUIRED_SINGLE_ARGS})
12471247

12481248
if(NOT TARGET ${IMPL_TARGET})
12491249
add_library(${IMPL_TARGET} INTERFACE)
12501250
endif()
12511251

1252+
if(IMPL_LINK_TO)
1253+
target_link_libraries(${IMPL_LINK_TO} PUBLIC ${IMPL_TARGET})
1254+
endif()
1255+
12521256
if(IS_ABSOLUTE "${IMPL_INCLUDE}")
12531257
message(FATAL_ERROR "INCLUDE argument must be relative path")
12541258
endif()
@@ -1346,6 +1350,10 @@ namespace @IMPL_NAMESPACE@ {
13461350
endif()
13471351
endif()
13481352

1353+
if(IMPL_DEPENDS)
1354+
list(APPEND DEPENDS_ON ${IMPL_DEPENDS})
1355+
endif()
1356+
13491357
set(HAS_CAPS FALSE)
13501358
set(CAPS_LENGTH 0)
13511359
string(JSON CAPS_TYPE TYPE "${IMPL_INPUTS}" ${INDEX} CAPS)
@@ -1542,9 +1550,14 @@ endfunction()
15421550

15431551
function(NBL_CREATE_RESOURCE_ARCHIVE)
15441552
set(REQUIRED_SINGLE_ARGS TARGET BIND NAMESPACE)
1545-
cmake_parse_arguments(IMPL "" "${REQUIRED_SINGLE_ARGS}" "BUILTINS" ${ARGV})
1553+
cmake_parse_arguments(IMPL "" "${REQUIRED_SINGLE_ARGS}" "BUILTINS;LINK_TO" ${ARGV})
15461554
NBL_PARSE_REQUIRED(IMPL ${REQUIRED_SINGLE_ARGS})
15471555

1556+
if(NOT NBL_EMBED_BUILTIN_RESOURCES)
1557+
add_library(${IMPL_TARGET} INTERFACE) # dummy, could use LINK_TO but makes no difference in this case
1558+
return()
1559+
endif()
1560+
15481561
set(IMPL_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${IMPL_TARGET}")
15491562

15501563
set(_BUNDLE_ARCHIVE_ABSOLUTE_PATH_ "")
@@ -1558,17 +1571,18 @@ function(NBL_CREATE_RESOURCE_ARCHIVE)
15581571
get_filename_component(BUILTIN_ARCHIVE_INPUT_ABS_ENTRY "${IMPL_INPUT_DIRECTORY}" ABSOLUTE)
15591572
set(BUILTIN_KEY_ENTRY_ABS "${BUILTIN_ARCHIVE_INPUT_ABS_ENTRY}/${_BUNDLE_ARCHIVE_ABSOLUTE_PATH_}")
15601573

1561-
if(NBL_EMBED_BUILTIN_RESOURCES)
1562-
foreach(IT ${IMPL_BUILTINS})
1563-
if(NBL_LOG_VERBOSE)
1564-
message(STATUS "[${IMPL_TARGET}'s Builtins]: Registered \"${IT}\" key")
1565-
endif()
1574+
unset(NBL_RESOURCES_TO_EMBED)
1575+
foreach(IT ${IMPL_BUILTINS})
1576+
if(NBL_LOG_VERBOSE)
1577+
message(STATUS "[${IMPL_TARGET}'s Builtins]: Registered \"${IT}\" key")
1578+
endif()
15661579

1567-
LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED ${IT})
1568-
endforeach()
1580+
LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED ${IT})
1581+
endforeach()
15691582

1570-
ADD_CUSTOM_BUILTIN_RESOURCES(${IMPL_TARGET} NBL_RESOURCES_TO_EMBED "${_BUNDLE_SEARCH_DIRECTORY_}" "${_BUNDLE_ARCHIVE_ABSOLUTE_PATH_}" "${_BUILTIN_RESOURCES_NAMESPACE_}" "${_OUTPUT_DIRECTORY_HEADER_}" "${_OUTPUT_DIRECTORY_SOURCE_}" "${_LINK_MODE_}")
1571-
else()
1572-
add_library(${IMPL_TARGET} INTERFACE) # dummy
1583+
ADD_CUSTOM_BUILTIN_RESOURCES(${IMPL_TARGET} NBL_RESOURCES_TO_EMBED "${_BUNDLE_SEARCH_DIRECTORY_}" "${_BUNDLE_ARCHIVE_ABSOLUTE_PATH_}" "${_BUILTIN_RESOURCES_NAMESPACE_}" "${_OUTPUT_DIRECTORY_HEADER_}" "${_OUTPUT_DIRECTORY_SOURCE_}" "${_LINK_MODE_}")
1584+
1585+
if(IMPL_LINK_TO)
1586+
LINK_BUILTIN_RESOURCES_TO_TARGET(${IMPL_LINK_TO} ${IMPL_TARGET})
15731587
endif()
15741588
endfunction()

examples_tests

Submodule examples_tests updated 36 files

0 commit comments

Comments
 (0)