Skip to content
Closed
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
1 change: 0 additions & 1 deletion .github-ci.yaml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ updates:
prefix: "build(deps)"
ignore:
- dependency-name: "org.jlab:groot" # since version numbers are not in order
- dependency-name: "org.ejml:ejml-simple" # keep version the same as `j4ml:j4ml-clas12:jar:0.9-SNAPSHOT`; see pull requests #636 and #632
- dependency-name: "net.objecthunter:exp4j" # pinned for dependency convergence
- dependency-name: "org.ejml:ejml-simple" # pinned for dependency convergence
- dependency-name: "org.apache.commons:commons-lang3" # pinned for dependency convergence
- dependency-name: "org.slf4j:slf4j-api" # pinned for dependency convergence
- dependency-name: "org.openjfx:javafx-base"
versions: [">= 24"] # version 24 requires JAVA_VERSION 22+
- dependency-name: "org.openjfx:javafx-graphics"
Expand Down
70 changes: 45 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v5.7.0
- uses: actions/setup-java@v6.0.1
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
Expand All @@ -72,7 +72,7 @@ jobs:
- name: build
run: |
./build-coatjava.sh --lfs --no-progress -T${{ env.nthreads }}
./bin/install-clara -b -c ./coatjava ./clara
./bin/install-clara -c ./coatjava ./clara
- name: tar # tarball to preserve permissions
run: |
tar czvf coatjava.tar.gz coatjava
Expand All @@ -91,7 +91,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v5.7.0
- uses: actions/setup-java@v6.0.1
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
Expand All @@ -102,7 +102,7 @@ jobs:
- name: build
run: |
./build-coatjava.sh --lfs --no-progress -T${{ env.nthreads }}
./bin/install-clara -b -c ./coatjava ./clara
./bin/install-clara -c ./coatjava ./clara
- name: tar # tarball to preserve permissions
run: |
tar czvf coatjava.tar.gz coatjava
Expand All @@ -115,6 +115,26 @@ jobs:
coatjava.tar.gz
clara.tar.gz

dependency_info:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up JDK
uses: actions/setup-java@v6.0.1
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
# NOTE: do not use `cache: maven` here, so stale `_remote.repositories` data aren't read
- name: build
run: |
./build-coatjava.sh --no-aux --no-progress --quiet -T${{ env.nthreads }}
- name: collect info
run: libexec/dependency-info.rb
- name: print dependency trees
run: cat target/info/trees.txt
- name: print dependency repository sources
run: cat target/info/repos.yaml

# tests
#############################################################################

Expand All @@ -137,7 +157,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v5.7.0
- uses: actions/setup-java@v6.0.1
with:
java-version: ${{ matrix.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
Expand All @@ -161,7 +181,7 @@ jobs:
steps:
- uses: actions/checkout@v7
- name: Set up JDK
uses: actions/setup-java@v5.7.0
uses: actions/setup-java@v6.0.1
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
Expand All @@ -170,7 +190,7 @@ jobs:
with:
name: build_ubuntu-latest
- name: untar build
run: tar xzvf coatjava.tar.gz
run: tar xzf coatjava.tar.gz
- name: spotbugs
run: ./build-coatjava.sh --spotbugs --no-maps --no-progress

Expand All @@ -180,7 +200,7 @@ jobs:
steps:
- uses: actions/checkout@v7
- name: Set up JDK
uses: actions/setup-java@v5.7.0
uses: actions/setup-java@v6.0.1
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
Expand All @@ -194,7 +214,7 @@ jobs:
path: |
clas_018779.evio.00001
- name: untar build
run: tar xzvf coatjava.tar.gz
run: tar xzf coatjava.tar.gz
- name: run test
run: |
ls -lhtr
Expand All @@ -209,7 +229,7 @@ jobs:
steps:
- uses: actions/checkout@v7
- name: Set up JDK
uses: actions/setup-java@v5.7.0
uses: actions/setup-java@v6.0.1
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
Expand All @@ -224,11 +244,11 @@ jobs:
clas_018779.evio.00001
- name: untar build
run: |
tar xzvf clara.tar.gz
tar xzvf coatjava.tar.gz
tar xzf clara.tar.gz
tar xzf coatjava.tar.gz
- run: ls
- name: run test
run: ./bin/run-clara -y ./etc/services/rgd-clarode.yml -t 4 -n 500 -c ./clara -o ./tmp ./clas_018779.evio.00001
run: ./bin/run-clara -y ./etc/services/data-ai.yaml -t 4 -n 500 -c ./clara -o ./tmp ./clas_018779.evio.00001
- name: ls tmp
run: ls -lhtr tmp
- name: rename
Expand Down Expand Up @@ -267,7 +287,7 @@ jobs:
steps:
- uses: actions/checkout@v7
- name: Set up JDK
uses: actions/setup-java@v5.7.0
uses: actions/setup-java@v6.0.1
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
Expand All @@ -277,8 +297,8 @@ jobs:
name: build_${{ matrix.runner }}
- name: untar build
run: |
tar xzvf coatjava.tar.gz
tar xzvf clara.tar.gz
tar xzf coatjava.tar.gz
tar xzf clara.tar.gz
- name: run test
run: |
git lfs install
Expand All @@ -295,7 +315,7 @@ jobs:
steps:
- uses: actions/checkout@v7
- name: Set up JDK
uses: actions/setup-java@v5.7.0
uses: actions/setup-java@v6.0.1
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
Expand All @@ -305,8 +325,8 @@ jobs:
name: build_macos
- name: untar build
run: |
tar xzvf coatjava.tar.gz
tar xzvf clara.tar.gz
tar xzf coatjava.tar.gz
tar xzf clara.tar.gz
- name: run test
run: |
git lfs install
Expand All @@ -320,7 +340,7 @@ jobs:
steps:
- uses: actions/checkout@v7
- name: Set up JDK
uses: actions/setup-java@v5.7.0
uses: actions/setup-java@v6.0.1
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
Expand All @@ -333,7 +353,7 @@ jobs:
with:
name: build_ubuntu-latest
- name: untar build
run: tar xzvf coatjava.tar.gz
run: tar xzf coatjava.tar.gz
- name: test run-groovy
run: coatjava/bin/run-groovy validation/advanced-tests/test-run-groovy.groovy

Expand All @@ -343,7 +363,7 @@ jobs:
steps:
- uses: actions/checkout@v7
- name: Set up JDK
uses: actions/setup-java@v5.7.0
uses: actions/setup-java@v6.0.1
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
Expand All @@ -355,7 +375,7 @@ jobs:
with:
name: build_ubuntu-latest
- name: untar build
run: tar xzvf coatjava.tar.gz
run: tar xzf coatjava.tar.gz
- name: hipo2npz
run: ./coatjava/bin/hipo2npz rec.hipo rec.npz
- name: hipo2npz-dump
Expand Down Expand Up @@ -384,7 +404,7 @@ jobs:
path: pages/jacoco
### javadoc
- name: set up JDK
uses: actions/setup-java@v5.7.0
uses: actions/setup-java@v6.0.1
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
Expand Down Expand Up @@ -440,7 +460,7 @@ jobs:
mv coatjava{,-${{ env.TAG_NAME }}}
tar czf coatjava-${{ env.TAG_NAME }}{.tar.gz,}
- name: release
uses: softprops/action-gh-release@v3.0.2
uses: softprops/action-gh-release@v3.0.3
with:
files: coatjava-${{ env.TAG_NAME }}.tar.gz
- name: open issue if failed
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ target
tmp
/common-tools/clas-io/src/main/java/org/jlab/io/banks

# data files
*.evio
*.hipo
!/etc/data/test/*.hipo

# deployment
/myLocalMvnRepo
/coatjava-*.tar.gz
Expand Down Expand Up @@ -50,7 +55,6 @@ hs_err_pid*

# no log files:
*.log
*.evio

bin/evio2hipotest
export.sh
14 changes: 7 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,16 @@ clara:
dependencies: [build,download]
script:
- tar -xzf clara.tar.gz
- run-clara -v -c $CLARA_HOME -t 4 -y ./etc/services/rgd-clarode.yml -n 30 -o out $EVIOFILE
- run-clara -v -c $CLARA_HOME -t 4 -y ./etc/services/data-ai.yaml -n 30 -o out $EVIOFILE
- mv out/rec_$EVIOFILE.hipo claroded.hipo

profile:
extends: .clon
allow_failure: true
script:
- ./clara/plugins/clas12/libexec/profile -e cpu run-clara -c ./clara -y ./etc/services/rgd-clarode.yml -o tmp1 -t 16 -l $EVIOFILE
- ./clara/plugins/clas12/libexec/profile -e alloc run-clara -c ./clara -y ./etc/services/rgd-clarode.yml -o tmp2 -t 16 -l $EVIOFILE
- ./clara/plugins/clas12/libexec/profile -e lock run-clara -c ./clara -y ./etc/services/rgd-clarode.yml -o tmp3 -t 16 -l $EVIOFILE
- ./clara/plugins/clas12/libexec/profile -e cpu -o _clara -- run-clara -c ./clara -y ./etc/services/data-ai.yaml -o tmp1 -t 16 -l $EVIOFILE
- ./clara/plugins/clas12/libexec/profile -e alloc -o _clara -- run-clara -c ./clara -y ./etc/services/data-ai.yaml -o tmp2 -t 16 -l $EVIOFILE
- ./clara/plugins/clas12/libexec/profile -e lock -o _clara -- run-clara -c ./clara -y ./etc/services/data-ai.yaml -o tmp3 -t 16 -l $EVIOFILE
artifacts:
when: always
expire_in: 1 week
Expand All @@ -192,12 +192,12 @@ scaling:
extends: .clon
allow_failure: true
script:
- ./clara/plugins/clas12/libexec/scaling -c ./clara -y ./etc/services/rgd-clarode.yml -t 8,12,18,24 $EVIOFILE
- ./clara/plugins/clas12/libexec/scaling -c ./clara -y ./etc/services/data-ai.yaml -t 8,12,18,24 $EVIOFILE
artifacts:
when: always
expire_in: 1 week
paths:
- scaling.svg
- scaling*.svg

pages:
stage: deploy
Expand All @@ -207,7 +207,7 @@ pages:
- cp -r pages public
- mkdir public/perf
- cp asprof*.html public/perf
- cp scaling.svg public/perf
- cp scaling*.svg public/perf
pages: true
artifacts:
expire_in: 1 week
Expand Down
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# this is a simple Makefile meant for developers' convenience
# - it only has the most common build commands we use
# - for any other build command, please use `./build-coatjava.sh`

# convert `make` arg `-j#` -> `mvn` arg `-T#`, if provided
JOBS := $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS)))
THREADS := $(if $(strip $(JOBS)),-T$(JOBS),)

BUILD := ./build-coatjava.sh

.PHONY: default all clean clara

.DEFAULT_GOAL := default

default:
$(BUILD) $(THREADS)

clean:
$(BUILD) --clean $(THREADS)

clara:
$(BUILD) --clara $(THREADS)

all: clara
16 changes: 4 additions & 12 deletions bin/install-clara
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,12 @@ trap cleanup EXIT
# Configure:
debug=0
args=()
usage="Usage: install-clara [-v] [-b] [-c COATJAVA] [-f CLARA] [-g GRAPES] PATH"
usage="Usage: install-clara [-v] [-c COATJAVA] [-f CLARA] [-g GRAPES] PATH"
info="""
- The default CLARA / GRAPES versions are $clara / $grapes
- COATJAVA can also be specified as a local installation directory
- If the COATJAVA version is not specified, it will try to auto-detect it.
- [-v adds verbosity and disables cleanup]
- [-b builds clara from source]"""
- [-v adds verbosity and disables cleanup]"""

while [[ $# -gt 0 ]]
do
Expand All @@ -86,7 +85,6 @@ do
-f) clara="$2" && shift && shift ;;
-c) coatjava="$2" && shift && shift ;;
-g) grapes="$2" && shift && shift ;;
-b) build=1 && shift ;;
-v) let debug=$debug+1 && shift ;;
-*|--*) echo -e "$usage\n\nUnknown option: $1" && exit 1 ;;
*) args+=("$1") && shift ;;
Expand Down Expand Up @@ -126,14 +124,8 @@ tmp_dir=$(cd $tmp_dir && pwd)
cd $tmp_dir

# CLARA:
if ! [ -z ${build+x} ]
then
echo -e "\nBuilding CLARA from source ..."
build_clara $PWD/clara-cre
else
echo -e "\nRetrieving CLARA version $clara ..."
get https://clasweb.jlab.org/clas12offline/distribution/clara/clara-cre-$clara.tar.gz
fi
echo -e "\nBuilding CLARA from source ..."
build_clara $PWD/clara-cre

# COATJAVA:
if ! compgen -G "$coatjava/lib/clas/coat-libs-*.jar" > /dev/null
Expand Down
10 changes: 0 additions & 10 deletions bin/postprocess2

This file was deleted.

7 changes: 0 additions & 7 deletions bin/run-groovy
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
#!/bin/bash

. `dirname $0`/../libexec/env.sh groovy

echo """
****************************************
* Running COATJAVA Groovy Script *
****************************************
"""

groovy -cp "$JYPATH" "$@"
Loading