Skip to content

Commit 211f681

Browse files
author
Timothy Mothra Lee (from Dev Box)
committed
testing fix for jni.h file
1 parent db72c43 commit 211f681

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/codeql-daily.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ jobs:
110110
$simpleCode = @"
111111
// Simple file to ensure compiler is run
112112
#include <windows.h>
113+
#include <jni.h>
113114
#include "etw_provider.h"
114115
int main() { return 0; }
115116
"@
@@ -129,7 +130,20 @@ jobs:
129130
130131
# Try a minimal compile to help CodeQL recognize the files
131132
Write-Host "Running minimal compile..."
132-
& cl.exe /c codeql_trigger.cpp /I"$headerDir" /I"$sourceDir" /EHsc
133+
# Print the Java home path to verify it
134+
Write-Host "Using JAVA_HOME: $env:JAVA_HOME"
135+
# Check if the JNI include directory exists
136+
$jniIncludePath = "$env:JAVA_HOME/include"
137+
$jniIncludeWinPath = "$env:JAVA_HOME/include/win32"
138+
139+
if (Test-Path $jniIncludePath) {
140+
Write-Host "JNI include path exists: $jniIncludePath"
141+
} else {
142+
Write-Host "WARNING: JNI include path doesn't exist: $jniIncludePath"
143+
}
144+
145+
# Compile with explicit include paths
146+
& cl.exe /c codeql_trigger.cpp /I"$headerDir" /I"$sourceDir" /I"$jniIncludePath" /I"$jniIncludeWinPath" /EHsc
133147
134148
Write-Host "C++ preparation completed successfully"
135149
echo "CPP_BUILD_SUCCEEDED=true" | Out-File -FilePath $env:GITHUB_ENV -Append

0 commit comments

Comments
 (0)