Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/c_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v5

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y cmake build-essential libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev liblz4-dev doxygen
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/doc_generation-6.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ jobs:
working-directory: '.'
doxyfile-path: 'doc/doxygen/DoxyfileCC'

- name: Install Maven
run: |
sudo apt-get update
sudo apt-get install -y maven
# Setup gradle and build Java
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle
run: ./gradlew build

# generate the javadoc files
- name: Set up JDK 17
Expand All @@ -41,7 +43,7 @@ jobs:
java-version: '17'
distribution: 'temurin'
- name: Javadoc Action
run: mvn javadoc:javadoc
run: ./gradlew javadoc

# clean up the javadoc files including removing timestamps. OPTIONAL.
- name: Tidy up the javadocs
Expand Down
30 changes: 16 additions & 14 deletions .github/workflows/java_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,25 @@ jobs:
java_test:
name: Run JUnit Tests
runs-on: ubuntu-latest
container:
image: maven:3.9-eclipse-temurin-17-alpine

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v5

# Uncomment to set up Java and Maven manually, if desired
# # (and probably comment out the container image above)
# - name: Set up JDK 17
# uses: actions/setup-java@v3
# with:
# distribution: temurin
# java-version: 17
# Install maven by hand (if not in container image)
# - name: Maven Setup
# run: sudo apt-get update && apt-get install -y maven
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

# Setup gradle and build Java
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle
run: ./gradlew build

# Run tests with Gradle
- name: Build and run tests
run: mvn --batch-mode test
run: ./gradlew test

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### VERSION DEFINITIONS ###
cmake_minimum_required(VERSION 3.22)
project(evio VERSION 6.1.3 LANGUAGES C CXX)
project(evio VERSION 6.2.0 LANGUAGES C CXX)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 20)
# C/C++ build options
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@ libraries are typically system-specific (e.g. using a command like `yum`, `dbn`,
## **Java Library**

The Java version of evio (internally `org.jlab.coda.jevio`) can also be used for reading & writing
`.evio` format files. A "fat" jar file with all dependencies is included in the `java/jars` folder,
which should be all most users need to run and execute Java code utilizing the evio library.
`.evio` format files. A "fat" jar file with all dependencies is included in the `java/jars` folder,
the only thing strictly required to run and execute `et` in Java.

Java 17 is the default version used, however the Java evio library should be compatible with all
java versions 8 and higher (note this has not been rigorously tested). If one wants to create a
new jar file for any reason (e.g. to modify Java versions), do:

git clone https://github.com/JeffersonLab/evio/
cd evio
mvn clean install
./gradlew

### Prerequisites

Requires Maven (`mvn`) and an installation of Java on your system.
Gradle and an installation of Java on your system.

**Running on "ifarm" at JLab will not work unless you install java yourself**. Note that the default java versions on the farm will be too old to
work. See downloads from [OpenJDK](https://openjdk.org/install/) or [Oracle](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html).
Expand Down
61 changes: 61 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This project uses @Incubating APIs which are subject to change.
*/

plugins {
`java-library`
`maven-publish`
// `com.github.spotbugs`
id("com.gradleup.shadow") version "9.2.2"
}

repositories {
mavenLocal()
maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
}

dependencies {
api(libs.org.lz4.lz4.java)
api(files("$projectDir/java/jars/disruptor-4.0.0.jar"))
testImplementation(platform("org.junit:junit-bom:5.10.3")) // Makes sure JUnit dependencies below have matching versions
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

group = "org.jlab.coda"
version = "6.2.0"
description = "Jefferson Lab EVIO Java Library (JEVIO)"
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17

defaultTasks("build")

publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}

tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}

tasks.withType<Javadoc>() {
options.encoding = "UTF-8"
}

tasks.test {
useJUnitPlatform()
failOnNoDiscoveredTests = false
}

// spotbugs {
// toolVersion.set("4.7.3")
// effort.set(com.github.spotbugs.snom.Effort.MAX)
// reportLevel.set(com.github.spotbugs.snom.ReportLevel.LOW)
// excludeFilter.set(file("config/spotbugs/exclude.xml"))
// }
Binary file modified etc/test_files/testEventsV6_javaAPI.evio
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties

org.gradle.configuration-cache=true
org.gradle.parallel=true
org.gradle.caching=true

12 changes: 12 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

[versions]
com-lmax-disruptor = "4.0.0"
org-junit-jupiter-junit-jupiter = "5.9.3"
org-lz4-lz4-java = "1.8.0"

[libraries]
com-lmax-disruptor = { module = "com.lmax:disruptor", version.ref = "com-lmax-disruptor" }
org-junit-jupiter-junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "org-junit-jupiter-junit-jupiter" }
org-lz4-lz4-java = { module = "org.lz4:lz4-java", version.ref = "org-lz4-lz4-java" }
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading