From 11782dc4a17bf562afcb947b4b8ee2db537a5104 Mon Sep 17 00:00:00 2001 From: DSFans2014 Date: Fri, 29 Aug 2025 14:10:50 +0800 Subject: [PATCH 1/4] feat: add stylecheck Signed-off-by: DSFans2014 --- .github/workflows/style.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/style.yaml diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml new file mode 100644 index 00000000..64a2a027 --- /dev/null +++ b/.github/workflows/style.yaml @@ -0,0 +1,21 @@ +# This is a basic workflow to help you get started with Actions +name: style + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: + - main + tags: + - v* + pull_request: + +jobs: + cpplint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: reviewdog/action-cpplint@master + with: + github_token: ${{ secrets.github_token } \ No newline at end of file From ff90760e8eec3b6f7d18e58a32da6dd2940098e7 Mon Sep 17 00:00:00 2001 From: DSFans2014 Date: Fri, 29 Aug 2025 14:13:11 +0800 Subject: [PATCH 2/4] fix: add } Signed-off-by: DSFans2014 --- .github/workflows/style.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index 64a2a027..d7ef0b3a 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -18,4 +18,4 @@ jobs: - uses: actions/checkout@master - uses: reviewdog/action-cpplint@master with: - github_token: ${{ secrets.github_token } \ No newline at end of file + github_token: ${{ secrets.github_token }} \ No newline at end of file From 066f5b22662846a28550f5abf9286d1807bab22a Mon Sep 17 00:00:00 2001 From: DSFans2014 Date: Fri, 29 Aug 2025 14:15:03 +0800 Subject: [PATCH 3/4] test: add test code Signed-off-by: DSFans2014 --- src/nvml/hook.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nvml/hook.c b/src/nvml/hook.c index c8e96db9..20d8ede9 100644 --- a/src/nvml/hook.c +++ b/src/nvml/hook.c @@ -318,7 +318,10 @@ void nvml_postInit() { nvmlReturn_t _nvmlDeviceGetMemoryInfo(nvmlDevice_t device,void* memory,int version) { unsigned int dev_id; LOG_DEBUG("into nvmlDeviceGetMemoryInfo"); - + int a = 0; + if(a > 0){ + LOG_DEBUG("debug a"); + } switch (version){ case 1: CHECK_NVML_API(NVML_OVERRIDE_CALL(nvml_library_entry,nvmlDeviceGetMemoryInfo, device, memory)); From 12f4037bf5b567b59abc64fa218713bb2174c20a Mon Sep 17 00:00:00 2001 From: DSFans2014 Date: Fri, 29 Aug 2025 14:28:07 +0800 Subject: [PATCH 4/4] feat: update yaml Signed-off-by: DSFans2014 --- .github/workflows/style.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index d7ef0b3a..815ceb5b 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -4,11 +4,6 @@ name: style # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch on: - push: - branches: - - main - tags: - - v* pull_request: jobs: