From 0e75aa5a09fe49cca92b3f9ce4ff4bdf35125d00 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 21:50:35 +0300 Subject: [PATCH 01/34] check --- .github/workflows/build.yml | 33 +++++++++ pom.xml | 14 +--- .../lunatix/ragscan/WebChatController.java | 70 ------------------- 3 files changed, 35 insertions(+), 82 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 src/main/java/lunatix/ragscan/WebChatController.java diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..83433c7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: Build Ragscan with GraalVM +on: [push, pull_request] +jobs: + build: + name: HelloWorld on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + steps: + - uses: actions/checkout@v4 + + - uses: graalvm/setup-graalvm@v1 + with: + java-version: '21' + distribution: 'graalvm' + github-token: ${{ secrets.GITHUB_TOKEN }} + native-image-job-reports: 'true' + + - name: Build Ragscan + run: | + echo "GRAALVM_HOME: $GRAALVM_HOME" + echo "JAVA_HOME: $JAVA_HOME" + java --version + native-image --version + - name: Example step using Maven plugin # https://graalvm.github.io/native-build-tools/latest/maven-plugin.html + run: mvn -Pnative -DskipTests native:compile + + - name: Upload binary + uses: actions/upload-artifact@v2 + with: + name: ragscan-${{ matrix.os }} + path: ragscan* \ No newline at end of file diff --git a/pom.xml b/pom.xml index 1698d4a..14d4ee0 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.springframework.boot spring-boot-starter-parent 3.3.1 - + lunatix ragscan @@ -32,17 +32,8 @@ 3.3.0 21.0.1 21.0.1 - - - org.springframework.boot - spring-boot-starter-web - - - - - org.springframework.ai spring-ai-qdrant-store-spring-boot-starter @@ -52,10 +43,9 @@ spring-shell-starter - org.jsoup jsoup - 1.17.2 + 1.18.1 org.projectlombok diff --git a/src/main/java/lunatix/ragscan/WebChatController.java b/src/main/java/lunatix/ragscan/WebChatController.java deleted file mode 100644 index cfaad93..0000000 --- a/src/main/java/lunatix/ragscan/WebChatController.java +++ /dev/null @@ -1,70 +0,0 @@ -package lunatix.ragscan; - -import java.util.List; - -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import lunatix.ragscan.gemini.ContentRequest; -import lunatix.ragscan.gemini.GeminiResponse; -import lunatix.ragscan.gemini.GenerateContentRequest; -import lunatix.ragscan.gemini.PartRequest; -import org.springframework.ai.chat.messages.SystemMessage; -import org.springframework.ai.chat.messages.UserMessage; -import org.springframework.ai.chat.prompt.Prompt; -import org.springframework.ai.document.Document; -import org.springframework.ai.vectorstore.SearchRequest; -import org.springframework.ai.vectorstore.VectorStore; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpStatusCode; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.client.RestClient; - -@RestController -@RequiredArgsConstructor -@Slf4j -class WebChatController { - - private final VectorStore vectorStore; - private final RestClient restClient; - - @Value("${spring.ai.vertex.ai.api-key}") - private String apiKey; - - @GetMapping("/chat/llama3") - public String llama3(@RequestParam("message") String message) { - final var resultInDB = vectorStore.similaritySearch(SearchRequest.query(message).withTopK(3)); - - final var generateContentRequest = getGenerateContentRequest(message, resultInDB); - return restClient.post() - .uri("/v1beta/models/gemini-1.5-flash-latest:generateContent?key={key}", apiKey) - .accept(MediaType.APPLICATION_JSON) - .contentType(MediaType.APPLICATION_JSON) - .body(generateContentRequest) - .retrieve() - .body(GeminiResponse.class) - .getCandidates().getFirst() - .getContent() - .getParts() - .getFirst() - .getText(); - } - - private static GenerateContentRequest getGenerateContentRequest(String message, List resultInDB) { - final var systemContent = """ - Answer only from the context, otherwise say you don't know, and clean up weird formats - like if it's json clean it up, if it's Markdown clean it up etc... - context: %s - """; - - return new GenerateContentRequest( - List.of(new ContentRequest(List.of(new PartRequest(message)))), - new ContentRequest(List.of( - new PartRequest(String.format(systemContent, resultInDB)))) - ); - } -} From c49e2bf10f1d475020b0fbdfe176150b0c235cff Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 21:54:50 +0300 Subject: [PATCH 02/34] check --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83433c7..46bccf6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build Ragscan with GraalVM on: [push, pull_request] jobs: build: - name: HelloWorld on ${{ matrix.os }} + name: Ragscan on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: @@ -24,7 +24,7 @@ jobs: java --version native-image --version - name: Example step using Maven plugin # https://graalvm.github.io/native-build-tools/latest/maven-plugin.html - run: mvn -Pnative -DskipTests native:compile + run: mvnw -Pnative -DskipTests native:compile - name: Upload binary uses: actions/upload-artifact@v2 From 27db0064cd22d90e224cdbe85fedf0c86b5fb355 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 22:00:21 +0300 Subject: [PATCH 03/34] check --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 46bccf6..c95c3ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,6 @@ jobs: os: [macos-latest, windows-latest, ubuntu-latest] steps: - uses: actions/checkout@v4 - - uses: graalvm/setup-graalvm@v1 with: java-version: '21' @@ -24,7 +23,7 @@ jobs: java --version native-image --version - name: Example step using Maven plugin # https://graalvm.github.io/native-build-tools/latest/maven-plugin.html - run: mvnw -Pnative -DskipTests native:compile + run: mvn -Pnative package - name: Upload binary uses: actions/upload-artifact@v2 From 5c56cfa6a458c25a0a7c06636b01c832dc50ab85 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 22:01:38 +0300 Subject: [PATCH 04/34] check --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c95c3ad..fc82710 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: echo "GRAALVM_HOME: $GRAALVM_HOME" echo "JAVA_HOME: $JAVA_HOME" java --version - native-image --version + - name: Example step using Maven plugin # https://graalvm.github.io/native-build-tools/latest/maven-plugin.html run: mvn -Pnative package From a024231c6dfb8e78a5c051f1a85c45b8b407623f Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 22:03:04 +0300 Subject: [PATCH 05/34] new tests --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc82710..1815240 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,9 +21,9 @@ jobs: echo "GRAALVM_HOME: $GRAALVM_HOME" echo "JAVA_HOME: $JAVA_HOME" java --version - - - name: Example step using Maven plugin # https://graalvm.github.io/native-build-tools/latest/maven-plugin.html - run: mvn -Pnative package + native-image --version + - name: Example step using Maven plugin # https://graalvm.github.io/native-build-tools/latest/maven-plugin.html + run: mvnw -Pnative native:compile -DskipTests - name: Upload binary uses: actions/upload-artifact@v2 From 7bde19096e32f347786873ee7bd58aa6e36beddd Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 22:13:41 +0300 Subject: [PATCH 06/34] new tests --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1815240..df3ceb9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,8 +22,8 @@ jobs: echo "JAVA_HOME: $JAVA_HOME" java --version native-image --version - - name: Example step using Maven plugin # https://graalvm.github.io/native-build-tools/latest/maven-plugin.html - run: mvnw -Pnative native:compile -DskipTests + - name: Example step using Maven plugin + run: mvn -Pnative native:compile -DskipTests - name: Upload binary uses: actions/upload-artifact@v2 From ab844a4b25c86be761dcb004f27ed74d9730f0f3 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 22:15:40 +0300 Subject: [PATCH 07/34] add maven snapshot --- pom.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pom.xml b/pom.xml index 14d4ee0..09c56bd 100644 --- a/pom.xml +++ b/pom.xml @@ -148,5 +148,21 @@ false + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + false + + From b58847f07869f800d043e047cf3e11b1ca6835b9 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 22:16:05 +0300 Subject: [PATCH 08/34] rename step --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df3ceb9..df0d616 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: echo "JAVA_HOME: $JAVA_HOME" java --version native-image --version - - name: Example step using Maven plugin + - name: Compile with maven run: mvn -Pnative native:compile -DskipTests - name: Upload binary From 5cc76f43534b6feeaece9759e0ba2a13234193d4 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 22:17:56 +0300 Subject: [PATCH 09/34] fixes --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 09c56bd..f31d704 100644 --- a/pom.xml +++ b/pom.xml @@ -141,8 +141,8 @@ - spring-milestones - Spring Milestones + maven + Maven central https://repo.maven.apache.org/maven2 false From 2fd37ced19dab0dda0842668f36b339f8fbfa4be Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 22:24:32 +0300 Subject: [PATCH 10/34] second test --- pom.xml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/pom.xml b/pom.xml index f31d704..f2a094d 100644 --- a/pom.xml +++ b/pom.xml @@ -140,14 +140,6 @@ - - maven - Maven central - https://repo.maven.apache.org/maven2 - - false - - spring-milestones Spring Milestones @@ -156,13 +148,5 @@ false - - spring-snapshots - Spring Snapshots - https://repo.spring.io/snapshot - - false - - From 64e12e202ae866690531cd618b4e1da3e99fae6f Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 22:30:02 +0300 Subject: [PATCH 11/34] third test --- pom.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pom.xml b/pom.xml index f2a094d..8ed4b7f 100644 --- a/pom.xml +++ b/pom.xml @@ -148,5 +148,13 @@ false + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + false + + From 4ef7c075b459fcbeb08c2eb103c6eea7c4901a9f Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 22:49:10 +0300 Subject: [PATCH 12/34] fourth test --- pom.xml | 16 ++++++++-------- settings.xml | 15 ++++++++++++++- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 8ed4b7f..a52f52d 100644 --- a/pom.xml +++ b/pom.xml @@ -140,14 +140,6 @@ - - spring-milestones - Spring Milestones - https://repo.spring.io/milestone - - false - - spring-snapshots Spring Snapshots @@ -156,5 +148,13 @@ false + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + diff --git a/settings.xml b/settings.xml index 19f8ee7..f9ecee6 100644 --- a/settings.xml +++ b/settings.xml @@ -8,9 +8,14 @@ https://repo.spring.io/milestone * + + spring-snapshots + https://repo.spring.io/snapshot + * + central - spring-milestones + spring-snapshots https://repo.maven.apache.org/maven2 @@ -35,6 +40,14 @@ Maven Repository Switchboard https://repo1.maven.org/maven2 + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + false + + From 809ce75350407f6b2f9e0341b6204e4e79c6beaf Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 23:06:46 +0300 Subject: [PATCH 13/34] fifth test --- pom.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index a52f52d..f9e2f75 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 21.0.1 - 1.0.0-M1 + 1.0.0-SNAPSHOT 3.3.0 21.0.1 21.0.1 @@ -140,14 +140,6 @@ - - spring-snapshots - Spring Snapshots - https://repo.spring.io/snapshot - - false - - spring-milestones Spring Milestones @@ -156,5 +148,13 @@ false + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + false + + From 2623b93df1153424409b8ba65317a6a67abe3193 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 23:18:35 +0300 Subject: [PATCH 14/34] fix libs --- pom.xml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index f9e2f75..c8708a3 100644 --- a/pom.xml +++ b/pom.xml @@ -63,9 +63,9 @@ test - group.springframework.ai + org.springframework.ai spring-ai-tika-document-reader - 1.1.0 + 1.0.0-SNAPSHOT org.apache.maven.plugins @@ -83,14 +83,14 @@ 3.3.1 - group.springframework.ai + org.springframework.ai spring-ai-pdf-document-reader - 1.1.0 + 1.0.0-SNAPSHOT - group.springframework.ai + org.springframework.ai spring-ai-vertex-ai-palm2-spring-boot-starter - 1.0.4 + 1.0.0-SNAPSHOT @@ -140,14 +140,6 @@ - - spring-milestones - Spring Milestones - https://repo.spring.io/milestone - - false - - spring-snapshots Spring Snapshots From cb3dd6a06142134f4321cfec1bc015b5ee74e489 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 23:22:40 +0300 Subject: [PATCH 15/34] update java version --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index c8708a3..7ff5033 100644 --- a/pom.xml +++ b/pom.xml @@ -27,11 +27,11 @@ - 21.0.1 + 21.0.4 1.0.0-SNAPSHOT 3.3.0 - 21.0.1 - 21.0.1 + 21.0.4 + 21.0.4 From c9a87a417c023b6ec15e924f6073d7ddabdbc539 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 23:35:35 +0300 Subject: [PATCH 16/34] downgrade target and source version --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 7ff5033..4fa7697 100644 --- a/pom.xml +++ b/pom.xml @@ -30,8 +30,8 @@ 21.0.4 1.0.0-SNAPSHOT 3.3.0 - 21.0.4 - 21.0.4 + 21 + 21 From 8fde8e82b0876ddb417d509cc499a059b4720b04 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 23:37:27 +0300 Subject: [PATCH 17/34] downgrade java version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4fa7697..fa1568d 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ - 21.0.4 + 21 1.0.0-SNAPSHOT 3.3.0 21 From 60264fd66c4ce4b6f0ebdeedfb0b16f5df99ca2b Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 23:42:55 +0300 Subject: [PATCH 18/34] some tries --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index fa1568d..45f98ff 100644 --- a/pom.xml +++ b/pom.xml @@ -124,6 +124,11 @@ org.graalvm.buildtools native-maven-plugin 0.10.2 + + + --initialize-at-run-time=org.apache.commons.logging.LogFactory + + org.springframework.boot From 4989b8c2f7bbf8a7a4c1d4c2f2479fc8deb4e575 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 23:45:55 +0300 Subject: [PATCH 19/34] some tries --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df0d616..7a05b63 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, windows-latest, ubuntu-latest] + os: [windows-latest, ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v4 - uses: graalvm/setup-graalvm@v1 From 9dff4c391df918ebfe6043a722ef14c2dbbc169d Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 23:47:53 +0300 Subject: [PATCH 20/34] remove macos --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a05b63..7b53663 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest, ubuntu-latest, macos-latest] + os: [windows-latest, ubuntu-latest] steps: - uses: actions/checkout@v4 - uses: graalvm/setup-graalvm@v1 From e130afca115100db238eadaad4a328aa9f3969af Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 23:53:12 +0300 Subject: [PATCH 21/34] debug --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b53663..c9c8b56 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: java --version native-image --version - name: Compile with maven - run: mvn -Pnative native:compile -DskipTests + run: mvn -e -Pnative native:compile -DskipTests - name: Upload binary uses: actions/upload-artifact@v2 From a36e89d2cc00b0c854a629a8476e0931f9c5c6ec Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Mon, 29 Jul 2024 23:58:59 +0300 Subject: [PATCH 22/34] remove config --- pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pom.xml b/pom.xml index 45f98ff..fa1568d 100644 --- a/pom.xml +++ b/pom.xml @@ -124,11 +124,6 @@ org.graalvm.buildtools native-maven-plugin 0.10.2 - - - --initialize-at-run-time=org.apache.commons.logging.LogFactory - - org.springframework.boot From d3a351f54ca98271a826bb48e3b773ced01365ce Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Tue, 30 Jul 2024 00:07:26 +0300 Subject: [PATCH 23/34] full debug mode --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c9c8b56..612c9c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: java --version native-image --version - name: Compile with maven - run: mvn -e -Pnative native:compile -DskipTests + run: mvn -X -Pnative native:compile -DskipTests - name: Upload binary uses: actions/upload-artifact@v2 From 8cd18dd8761aebc57f2e8771bd2ae1c51bbd7491 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Tue, 30 Jul 2024 00:10:45 +0300 Subject: [PATCH 24/34] install gu --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 612c9c2..4a36c23 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,8 +22,10 @@ jobs: echo "JAVA_HOME: $JAVA_HOME" java --version native-image --version - - name: Compile with maven - run: mvn -X -Pnative native:compile -DskipTests + gu install native-image + mvn -X -Pnative native:compile -DskipTests +# - name: Compile with maven +# run: mvn -X -Pnative native:compile -DskipTests - name: Upload binary uses: actions/upload-artifact@v2 From 2c90f340b0311e7f78c31be2941b1a77573b5cc4 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Tue, 30 Jul 2024 00:13:05 +0300 Subject: [PATCH 25/34] remove gu --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a36c23..02b452b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,6 @@ jobs: echo "JAVA_HOME: $JAVA_HOME" java --version native-image --version - gu install native-image mvn -X -Pnative native:compile -DskipTests # - name: Compile with maven # run: mvn -X -Pnative native:compile -DskipTests From 6e8bee265679be7ab7117e535042ed983fa56507 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Tue, 30 Jul 2024 00:29:30 +0300 Subject: [PATCH 26/34] tests --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 02b452b..cdd3d2d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v4 - uses: graalvm/setup-graalvm@v1 with: - java-version: '21' + java-version: '22' distribution: 'graalvm' github-token: ${{ secrets.GITHUB_TOKEN }} native-image-job-reports: 'true' From a20514407160011857ca32fbbf858d842462eab1 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Sat, 3 Aug 2024 00:56:05 +0300 Subject: [PATCH 27/34] update build actions --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cdd3d2d..426fc40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,8 @@ name: Build Ragscan with GraalVM on: [push, pull_request] jobs: - build: + build-with-graal: + if: false # currently disabled name: Ragscan on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: @@ -22,12 +23,30 @@ jobs: echo "JAVA_HOME: $JAVA_HOME" java --version native-image --version - mvn -X -Pnative native:compile -DskipTests -# - name: Compile with maven -# run: mvn -X -Pnative native:compile -DskipTests + - name: Compile with maven + run: mvn -X -Pnative native:compile -DskipTests - name: Upload binary - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ragscan-${{ matrix.os }} - path: ragscan* \ No newline at end of file + path: ragscan* + build: + name: Ragscan on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ windows-latest, ubuntu-latest ] + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 8 + uses: actions/setup-java@v4 + with: + java-version: 21 + - name: Build Ragscan + run: mvn -f pom.xml clean package + - name: Upload Maven build artifact + uses: actions/upload-artifact@v4 + with: + name: artifact + path: ./target/ragscan.jar \ No newline at end of file From ef8f16ce5a3203016300b0671a5fbe361ab4ec46 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Sat, 3 Aug 2024 00:56:18 +0300 Subject: [PATCH 28/34] rename --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 426fc40..c0a5cdf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,7 +45,7 @@ jobs: java-version: 21 - name: Build Ragscan run: mvn -f pom.xml clean package - - name: Upload Maven build artifact + - name: Upload build artifact uses: actions/upload-artifact@v4 with: name: artifact From b272df9cfeb559c6eee861016aa7c5115ef2fdd7 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Sat, 3 Aug 2024 00:56:30 +0300 Subject: [PATCH 29/34] setup java --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c0a5cdf..9b60689 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: os: [ windows-latest, ubuntu-latest ] steps: - uses: actions/checkout@v4 - - name: Set up JDK 8 + - name: Set up Java uses: actions/setup-java@v4 with: java-version: 21 From c970f2e0fc6aedb93606d8dd335815ec4f490622 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Sat, 3 Aug 2024 00:58:24 +0300 Subject: [PATCH 30/34] add oracle distribution --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b60689..3bc95b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,6 +42,7 @@ jobs: - name: Set up Java uses: actions/setup-java@v4 with: + distribution: oracle java-version: 21 - name: Build Ragscan run: mvn -f pom.xml clean package From 60d754d3ff6ba37278dc4e0f4705971a9c8b654e Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Sat, 3 Aug 2024 01:02:31 +0300 Subject: [PATCH 31/34] some fixes --- .github/workflows/build.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3bc95b2..0b54c94 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,11 +32,8 @@ jobs: name: ragscan-${{ matrix.os }} path: ragscan* build: - name: Ragscan on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ windows-latest, ubuntu-latest ] + name: Ragscan + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Java @@ -45,7 +42,7 @@ jobs: distribution: oracle java-version: 21 - name: Build Ragscan - run: mvn -f pom.xml clean package + run: mvn -f pom.xml clean package -DskipTests - name: Upload build artifact uses: actions/upload-artifact@v4 with: From 54ae39c6c39e5e0143e5dae361f564427be7c22f Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Sat, 3 Aug 2024 01:04:51 +0300 Subject: [PATCH 32/34] some fixes --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b54c94..45cfb63 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,4 +47,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: artifact - path: ./target/ragscan.jar \ No newline at end of file + path: ./target/*.jar \ No newline at end of file From 4d9351af305cb7625c614c26b7ba2a601179e7ff Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Sat, 3 Aug 2024 01:05:26 +0300 Subject: [PATCH 33/34] rename --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 45cfb63..110a27d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build Ragscan with GraalVM +name: Build Ragscan on: [push, pull_request] jobs: build-with-graal: From 937b7d4527d6068ad37348ff1a257055fdae8325 Mon Sep 17 00:00:00 2001 From: Aland Osman Date: Sat, 3 Aug 2024 01:09:38 +0300 Subject: [PATCH 34/34] add conditions for artifact --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 110a27d..84bcc31 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,6 +44,7 @@ jobs: - name: Build Ragscan run: mvn -f pom.xml clean package -DskipTests - name: Upload build artifact + if: github.ref_name == 'master' uses: actions/upload-artifact@v4 with: name: artifact