File tree Expand file tree Collapse file tree 4 files changed +16
-3
lines changed
annotation-processor-test/src/test
java/io/github/digitalsmile/gpio/libcurl
annotation-processor/src/main/java/io/github/digitalsmile Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 2828 with :
2929 java-version : ' 22'
3030 distribution : ' corretto'
31+ - name : Get GCC 12 for system header files
32+ run : |
33+ sudo apt install gcc-12
34+ - name : Get libcurl for tests
35+ run : |
36+ cd annotation-processor-test/src/test/resources/libclang && git clone https://github.com/curl/curl.git
3137 - name : Getting linux header version for tests
3238 run : |
3339 echo "headerVersion=$(uname -r)" >> "$GITHUB_ENV"
Original file line number Diff line number Diff line change 1313import io .github .digitalsmile .gpio .libcurl .enums .CURLoption ;
1414import io .github .digitalsmile .gpio .libcurl .opaque .CURL ;
1515
16- @ NativeMemory (headers = "/home/ds /curl/include/curl/curl.h" )
16+ @ NativeMemory (headers = "libcurl /curl/include/curl/curl.h" )
1717@ NativeMemoryOptions (systemIncludes = {
18- "/usr/lib/llvm-15/lib/clang/15.0.7 /include/"
19- })
18+ "/usr/lib/gcc/x86_64-linux-gnu/12 /include/"
19+ }, debugMode = true )
2020@ Structs ({
2121 @ Struct (name = "CURL" , javaName = "CurlInstance" )
2222})
Original file line number Diff line number Diff line change 1+ *
2+ ! .gitignore
Original file line number Diff line number Diff line change @@ -343,6 +343,11 @@ private List<Path> getHeaderPaths(String[] headerFiles) {
343343 var main = rootPath .resolve ("src" , "main" );
344344 var headerFileSplit = headerFile .split (Pattern .quote (File .separator ));
345345 headerPath = main .resolve ("resources" , headerFileSplit );
346+ if (!headerPath .toFile ().exists ()) {
347+ var test = rootPath .resolve ("src" , "test" );
348+ headerFileSplit = headerFile .split (Pattern .quote (File .separator ));
349+ headerPath = test .resolve ("resources" , headerFileSplit );
350+ }
346351 }
347352 }
348353 paths .add (headerPath );
You can’t perform that action at this time.
0 commit comments