From 93602cba75192163e437219ba32f4b469f8b7adb Mon Sep 17 00:00:00 2001 From: Yan Levin Date: Mon, 24 Aug 2026 12:47:31 -0500 Subject: [PATCH 1/3] add a 3rd ci check for jacoco coverage check --- .github/workflows/test-ci.yml | 39 ++++++++++++++++++++++++++++++++++- estore/pom.xml | 24 +++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-ci.yml b/.github/workflows/test-ci.yml index 9e3e583..08311a1 100644 --- a/.github/workflows/test-ci.yml +++ b/.github/workflows/test-ci.yml @@ -20,4 +20,41 @@ jobs: run: sudo apt-get update && sudo apt-get install -y wget zstd - name: Build and test estore - run: mvn -pl estore clean test -Dmaven.compiler.release=8 + run: mvn -pl estore clean test jacoco:report -Dmaven.compiler.release=8 + + - name: Upload JaCoCo report + if: always() + uses: actions/upload-artifact@v4 + with: + name: jacoco-report + path: estore/target/site/jacoco/ + if-no-files-found: ignore + + - name: Upload coverage data + uses: actions/upload-artifact@v4 + with: + name: jacoco-coverage-data + path: | + estore/target/jacoco.exec + estore/target/classes/ + + coverage: + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "8" + cache: maven + + - name: Download coverage data + uses: actions/download-artifact@v4 + with: + name: jacoco-coverage-data + path: . + + - name: Check coverage + run: mvn -pl estore jacoco:check -Dmaven.compiler.release=8 diff --git a/estore/pom.xml b/estore/pom.xml index f47ffa3..15048dd 100644 --- a/estore/pom.xml +++ b/estore/pom.xml @@ -119,6 +119,23 @@ org.jacoco jacoco-maven-plugin 0.8.13 + + + org/estore/antlr4/** + + + + BUNDLE + + + LINE + COVEREDRATIO + 0.70 + + + + + @@ -132,6 +149,13 @@ report + + check + verify + + check + + From dd08c91cc9515ea32cf2c64b65028e40ab34bcca Mon Sep 17 00:00:00 2001 From: Yan Levin Date: Tue, 25 Aug 2026 14:17:57 -0500 Subject: [PATCH 2/3] added ci badges to readme and changed to oracle java for ci runs --- .github/workflows/coverage-ci.yml | 28 +++++++++++++++++ .github/workflows/formatting-ci.yml | 2 +- .github/workflows/test-ci.yml | 48 ++++++++--------------------- README.md | 5 +++ 4 files changed, 46 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/coverage-ci.yml diff --git a/.github/workflows/coverage-ci.yml b/.github/workflows/coverage-ci.yml new file mode 100644 index 0000000..bb41283 --- /dev/null +++ b/.github/workflows/coverage-ci.yml @@ -0,0 +1,28 @@ +name: Coverage CI + +on: + push: + pull_request: + +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install OpenJDK 8 and test-data tools + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends openjdk-8-jdk wget zstd + echo "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> "$GITHUB_ENV" + echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> "$GITHUB_PATH" + + - uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-m2- + + - name: Check coverage + run: mvn -pl estore clean test jacoco:report jacoco:check -Dmaven.compiler.release=8 diff --git a/.github/workflows/formatting-ci.yml b/.github/workflows/formatting-ci.yml index b7c4b5e..b3cb5dd 100644 --- a/.github/workflows/formatting-ci.yml +++ b/.github/workflows/formatting-ci.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/setup-java@v4 with: - distribution: temurin + distribution: oracle java-version: "25" cache: maven diff --git a/.github/workflows/test-ci.yml b/.github/workflows/test-ci.yml index 08311a1..1a20255 100644 --- a/.github/workflows/test-ci.yml +++ b/.github/workflows/test-ci.yml @@ -10,14 +10,19 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - name: Install OpenJDK 8 and test-data tools + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends openjdk-8-jdk wget zstd + echo "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> "$GITHUB_ENV" + echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> "$GITHUB_PATH" + + - uses: actions/cache@v4 with: - distribution: temurin - java-version: "8" - cache: maven - - - name: Install test-data tools - run: sudo apt-get update && sudo apt-get install -y wget zstd + path: ~/.m2/repository + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-m2- - name: Build and test estore run: mvn -pl estore clean test jacoco:report -Dmaven.compiler.release=8 @@ -29,32 +34,3 @@ jobs: name: jacoco-report path: estore/target/site/jacoco/ if-no-files-found: ignore - - - name: Upload coverage data - uses: actions/upload-artifact@v4 - with: - name: jacoco-coverage-data - path: | - estore/target/jacoco.exec - estore/target/classes/ - - coverage: - needs: test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: "8" - cache: maven - - - name: Download coverage data - uses: actions/download-artifact@v4 - with: - name: jacoco-coverage-data - path: . - - - name: Check coverage - run: mvn -pl estore jacoco:check -Dmaven.compiler.release=8 diff --git a/README.md b/README.md index c8dce0a..85c7373 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ # In-memory Object Graph Stores + +[![Test CI](https://github.com/EngineeringSoftware/eStore/actions/workflows/test-ci.yml/badge.svg)](https://github.com/EngineeringSoftware/eStore/actions/workflows/test-ci.yml) +[![Formatting CI](https://github.com/EngineeringSoftware/eStore/actions/workflows/formatting-ci.yml/badge.svg)](https://github.com/EngineeringSoftware/eStore/actions/workflows/formatting-ci.yml) +[![Coverage CI](https://github.com/EngineeringSoftware/eStore/actions/workflows/coverage-ci.yml/badge.svg)](https://github.com/EngineeringSoftware/eStore/actions/workflows/coverage-ci.yml) + Implementation of an in-memory object graph store, dubbed ϵStore. Our From 0b54c0565511580390f988bcd02b2e2239950baf Mon Sep 17 00:00:00 2001 From: Yan Levin Date: Tue, 25 Aug 2026 14:41:21 -0500 Subject: [PATCH 3/3] changed ci runs and docker to oracle java 25, and made pom source and targets java 8 --- .github/workflows/coverage-ci.yml | 21 ++++++++------------- .github/workflows/test-ci.yml | 21 ++++++++------------- Dockerfile | 17 +++++++++++++++-- estore-maven-plugin/pom.xml | 3 ++- estore/pom.xml | 5 +++-- pom.xml | 3 ++- s | 13 +++++++------ 7 files changed, 45 insertions(+), 38 deletions(-) diff --git a/.github/workflows/coverage-ci.yml b/.github/workflows/coverage-ci.yml index bb41283..98b57a6 100644 --- a/.github/workflows/coverage-ci.yml +++ b/.github/workflows/coverage-ci.yml @@ -10,19 +10,14 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install OpenJDK 8 and test-data tools - run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends openjdk-8-jdk wget zstd - echo "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> "$GITHUB_ENV" - echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> "$GITHUB_PATH" - - - uses: actions/cache@v4 + - uses: actions/setup-java@v4 with: - path: ~/.m2/repository - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-m2- + distribution: oracle + java-version: "25" + cache: maven + + - name: Install test-data tools + run: sudo apt-get update && sudo apt-get install -y wget zstd - name: Check coverage - run: mvn -pl estore clean test jacoco:report jacoco:check -Dmaven.compiler.release=8 + run: mvn -pl estore clean test jacoco:report jacoco:check diff --git a/.github/workflows/test-ci.yml b/.github/workflows/test-ci.yml index 1a20255..b8be1a8 100644 --- a/.github/workflows/test-ci.yml +++ b/.github/workflows/test-ci.yml @@ -10,22 +10,17 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install OpenJDK 8 and test-data tools - run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends openjdk-8-jdk wget zstd - echo "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> "$GITHUB_ENV" - echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> "$GITHUB_PATH" - - - uses: actions/cache@v4 + - uses: actions/setup-java@v4 with: - path: ~/.m2/repository - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-m2- + distribution: oracle + java-version: "25" + cache: maven + + - name: Install test-data tools + run: sudo apt-get update && sudo apt-get install -y wget zstd - name: Build and test estore - run: mvn -pl estore clean test jacoco:report -Dmaven.compiler.release=8 + run: mvn -pl estore clean test jacoco:report - name: Upload JaCoCo report if: always() diff --git a/Dockerfile b/Dockerfile index 66ee760..1c9fdcc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,24 @@ FROM ubuntu:24.04 ENV DEBIAN_FRONTEND=noninteractive +ENV JAVA_HOME=/usr/java/jdk-25 +ENV PATH="${JAVA_HOME}/bin:${PATH}" -# Java 8 first. Installing maven in the same apt command pulls OpenJDK 11. +# Oracle JDK 25 first so apt maven does not become the default java. RUN apt-get update \ && apt-get install -y --no-install-recommends \ - openjdk-8-jdk wget zstd netcat-openbsd \ + ca-certificates wget zstd netcat-openbsd \ + && ARCH="$(dpkg --print-architecture)" \ + && case "$ARCH" in \ + amd64) JDK_ARCH=x64 ;; \ + arm64) JDK_ARCH=aarch64 ;; \ + *) echo "unsupported arch: $ARCH" && exit 1 ;; \ + esac \ + && wget -q "https://download.oracle.com/java/25/latest/jdk-25_linux-${JDK_ARCH}_bin.tar.gz" -O /tmp/jdk.tgz \ + && echo "$(wget -qO- "https://download.oracle.com/java/25/latest/jdk-25_linux-${JDK_ARCH}_bin.tar.gz.sha256") */tmp/jdk.tgz" | sha256sum -c \ + && mkdir -p "$JAVA_HOME" \ + && tar --extract --file /tmp/jdk.tgz --directory "$JAVA_HOME" --strip-components 1 \ + && rm /tmp/jdk.tgz \ && apt-get install -y --no-install-recommends maven \ && rm -rf /var/lib/apt/lists/* diff --git a/estore-maven-plugin/pom.xml b/estore-maven-plugin/pom.xml index 2d9849f..4e29ce5 100644 --- a/estore-maven-plugin/pom.xml +++ b/estore-maven-plugin/pom.xml @@ -25,7 +25,8 @@ UTF-8 - 8 + 8 + 8 3.9.14 diff --git a/estore/pom.xml b/estore/pom.xml index 15048dd..532a1d2 100644 --- a/estore/pom.xml +++ b/estore/pom.xml @@ -14,7 +14,8 @@ estore UTF-8 - 8 + 8 + 8 @@ -118,7 +119,7 @@ org.jacoco jacoco-maven-plugin - 0.8.13 + 0.8.14 org/estore/antlr4/** diff --git a/pom.xml b/pom.xml index f5210d5..b35d1a2 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,8 @@ estore-internal http://maven.apache.org - 8 + 8 + 8 UTF-8 diff --git a/s b/s index 7a6b6a7..bbab7c0 100755 --- a/s +++ b/s @@ -19,8 +19,10 @@ function check_deps() { ! hash "mvn" && \ { echo "missing maven (https://maven.apache.org/download.cgi)"; return 1; } - java -version 2>&1 | grep -qE 'version "1\.8|version "8' || \ - { echo "no java 8 available (apt-get install openjdk-8-jdk; macOS: brew install openjdk@8)"; return 1; } + if ! hash "java" 2>/dev/null || ! hash "javac" 2>/dev/null; then + echo "no JDK available (CI uses Oracle JDK 25; bytecode target is Java 8)" + return 1 + fi ! hash "wget" && \ { echo "missing wget (apt-get install wget)"; return 1; } @@ -51,10 +53,9 @@ function install_deps() { { echo "Failed to install Maven"; return 1; } fi - if ! hash "java" 2>/dev/null || ! java -version 2>&1 | grep -qE 'version "1\.8|version "8'; then - echo "Installing Java 8..." - apt-get update && apt-get install -y openjdk-8-jdk || \ - { echo "Failed to install Java 8"; return 1; } + if ! hash "java" 2>/dev/null || ! hash "javac" 2>/dev/null; then + echo "No JDK found. Install Oracle JDK 25 from https://www.oracle.com/java/technologies/downloads/" + return 1 fi if ! hash "wget" 2>/dev/null; then