-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from mach3-software/feature_CUDAsamples
Smarter CUDA Samples treatment
- Loading branch information
Showing
5 changed files
with
100 additions
and
40 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Pull request description: | ||
|
||
|
||
## Changes or fixes: | ||
|
||
|
||
## Examples: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#Bases on https://github.com/root-project/root/blob/master/.github/workflows/test-result-comment.yml | ||
|
||
name: Test Summary PR comment | ||
|
||
on: | ||
workflow_run: | ||
# do NOT use quotes: https://stackoverflow.com/a/72551795/17876693 | ||
workflows: [MaCh3 CI] | ||
types: | ||
- completed | ||
permissions: {} | ||
|
||
jobs: | ||
comment-test-results: | ||
name: Publish Test Results | ||
|
||
if: (github.event.workflow_run.event == 'pull_request' || github.event.workflow_run.event == 'schedule') && github.event.workflow_run.conclusion != 'skipped' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
checks: write | ||
pull-requests: write | ||
actions: read | ||
|
||
steps: | ||
- name: Download and Extract Artifacts | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
mkdir -p artifacts && cd artifacts | ||
artifacts_url=${{ github.event.workflow_run.artifacts_url }} | ||
gh api --paginate "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact | ||
do | ||
IFS=$'\t' read name url <<< "$artifact" | ||
gh api $url > "$name.zip" | ||
unzip -d "$name" "$name.zip" | ||
done | ||
- name: Publish Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
with: | ||
commit: ${{ github.event.workflow_run.head_sha }} | ||
event_file: artifacts/Event File/event.json | ||
event_name: ${{ github.event.workflow_run.event }} | ||
files: "artifacts/**/*.xml" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Variable to hold the paths once found | ||
set(CMAKE_CUDA_SAMPLES_PATH "") | ||
set(CUDASAMPLES_FOUND FALSE) | ||
|
||
#KS: List of directories to search for helper_functions.h and cuda_runtime.h | ||
# Please expand if needed | ||
set(CUDA_SAMPLE_SEARCH_PATHS | ||
"${CUDAToolkit_TARGET_DIR}/samples/common/inc/" | ||
) | ||
|
||
# Loop over the directories and append to CMAKE_CUDA_SAMPLES_PATH if headers are found | ||
foreach(dir ${CUDA_SAMPLE_SEARCH_PATHS}) | ||
if(EXISTS "${dir}/helper_functions.h") | ||
list(APPEND CMAKE_CUDA_SAMPLES_PATH ${dir}) | ||
set(CUDASAMPLES_FOUND TRUE) | ||
endif() | ||
endforeach() | ||
|
||
#HW: If we're doing GPU stuff, we need the CUDA helper module | ||
if(NOT CUDASAMPLES_FOUND) | ||
cmessage(WARNING "Adding Built-in CUDA Sample Library, it make take some time") | ||
CPMAddPackage( | ||
NAME cuda-samples | ||
GITHUB_REPOSITORY "NVIDIA/cuda-samples" | ||
GIT_TAG v12.3 | ||
SOURCE_SUBDIR Common | ||
DOWNLOAD_ONLY YES | ||
) | ||
list(APPEND CMAKE_CUDA_SAMPLES_PATH ${cuda-samples_SOURCE_DIR}/Common) | ||
endif() | ||
|
||
cmessage(STATUS "Using the following CUDA samples paths: ${CMAKE_CUDA_SAMPLES_PATH}") | ||
target_include_directories(MaCh3CompilerOptions INTERFACE ${CMAKE_CUDA_SAMPLES_PATH}) |
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