Skip to content

Commit ce84c13

Browse files
committed
resolve merge conflicts
2 parents d0886d2 + 06536ec commit ce84c13

File tree

167 files changed

+6377
-1487
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+6377
-1487
lines changed

.codecov.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "maven"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
ignore:
8+
- dependency-name: "org.jlab:groot" # since version numbers are not in order
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
interval: "weekly"

.github/workflows/maven.yml

Lines changed: 107 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,57 @@ concurrency:
1616
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1717
cancel-in-progress: true
1818

19+
defaults:
20+
run:
21+
shell: bash
22+
23+
env:
24+
java_version: 11
25+
java_distribution: zulu
26+
groovy_version: 4.0.3
27+
1928
jobs:
2029

30+
# build
31+
#############################################################################
32+
2133
build:
2234
strategy:
2335
fail-fast: true
2436
matrix:
2537
runner:
2638
- ubuntu-latest
2739
- macos-latest
28-
outputs:
29-
default_runner: ubuntu-latest
3040
runs-on: ${{ matrix.runner }}
3141
steps:
32-
- uses: actions/checkout@v3
42+
- uses: actions/checkout@v4
3343
- name: Set up JDK
34-
uses: actions/setup-java@v3
44+
uses: actions/setup-java@v4
3545
with:
36-
java-version: 11
37-
distribution: zulu
46+
java-version: ${{ env.java_version }}
47+
distribution: ${{ env.java_distribution }}
3848
- name: build
39-
run: ./build-coatjava.sh --spotbugs --unittests --quiet
49+
run: ./build-coatjava.sh --spotbugs --unittests --quiet -T4
4050
- name: tar # tarball to preserve permissions
4151
run: tar czvf coatjava.tar.gz coatjava
42-
- uses: actions/upload-artifact@v3
52+
- uses: actions/upload-artifact@v4
4353
with:
4454
name: build_${{ matrix.runner }}
4555
retention-days: 1
4656
path: coatjava.tar.gz
57+
- name: collect jacoco report
58+
if: ${{ matrix.runner == 'ubuntu-latest' }}
59+
run: validation/jacoco-aggregate.sh
60+
- name: publish jacoco report
61+
if: ${{ matrix.runner == 'ubuntu-latest' }}
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: jacoco_report
65+
path: publish/
66+
retention-days: 1
67+
68+
# tests
69+
#############################################################################
4770

4871
test_coatjava:
4972
needs: [ build ]
@@ -71,13 +94,13 @@ jobs:
7194
- { runner: macos-latest, id: eb-ep, cmd: ./run-eb-tests.sh -100 electronproton }
7295
runs-on: ${{ matrix.runner }}
7396
steps:
74-
- uses: actions/checkout@v3
97+
- uses: actions/checkout@v4
7598
- name: Set up JDK
76-
uses: actions/setup-java@v3
99+
uses: actions/setup-java@v4
77100
with:
78-
java-version: 11
79-
distribution: zulu
80-
- uses: actions/download-artifact@v3
101+
java-version: ${{ env.java_version }}
102+
distribution: ${{ env.java_distribution }}
103+
- uses: actions/download-artifact@v4
81104
with:
82105
name: build_${{ matrix.runner }}
83106
- name: untar build
@@ -90,21 +113,21 @@ jobs:
90113
91114
test_run-groovy:
92115
needs: [ build ]
93-
runs-on: ${{ needs.build.outputs.default_runner }}
116+
runs-on: ubuntu-latest
94117
steps:
95-
- uses: actions/checkout@v3
118+
- uses: actions/checkout@v4
96119
- name: Set up JDK
97-
uses: actions/setup-java@v3
120+
uses: actions/setup-java@v4
98121
with:
99-
java-version: 11
100-
distribution: zulu
122+
java-version: ${{ env.java_version }}
123+
distribution: ${{ env.java_distribution }}
101124
- name: setup groovy
102-
uses: wtfjoke/setup-groovy@v1
125+
uses: wtfjoke/setup-groovy@v2
103126
with:
104-
groovy-version: 4.x
105-
- uses: actions/download-artifact@v3
127+
groovy-version: ${{ env.groovy_version }}
128+
- uses: actions/download-artifact@v4
106129
with:
107-
name: build_${{ needs.build.outputs.default_runner }}
130+
name: build_ubuntu-latest
108131
- name: untar build
109132
run: tar xzvf coatjava.tar.gz
110133
- name: test run-groovy
@@ -115,7 +138,68 @@ jobs:
115138
- build
116139
- test_coatjava
117140
- test_run-groovy
118-
runs-on: ${{ needs.build.outputs.default_runner }}
141+
runs-on: ubuntu-latest
119142
steps:
120143
- name: pass
121144
run: exit 0
145+
146+
# generate documentation
147+
#############################################################################
148+
149+
generate_documentation:
150+
runs-on: ubuntu-latest
151+
steps:
152+
- uses: actions/checkout@v4
153+
- name: Set up JDK
154+
uses: actions/setup-java@v4
155+
with:
156+
java-version: ${{ env.java_version }}
157+
distribution: ${{ env.java_distribution }}
158+
- name: build
159+
run: ./build-coatjava.sh
160+
- name: generate documentation
161+
run: ./build-javadocs.sh
162+
- uses: actions/upload-artifact@v4
163+
with:
164+
name: javadoc
165+
path: docs/javadoc/
166+
retention-days: 1
167+
168+
# deploy web pages
169+
#############################################################################
170+
171+
collect_webpages:
172+
if: ${{ github.ref == 'refs/heads/development' }}
173+
needs: [ build, generate_documentation ]
174+
runs-on: ubuntu-latest
175+
steps:
176+
- name: download jacoco report
177+
uses: actions/download-artifact@v4
178+
with:
179+
name: jacoco_report
180+
path: pages/jacoco
181+
- name: download javadoc documentation
182+
uses: actions/download-artifact@v4
183+
with:
184+
name: javadoc
185+
path: pages/javadoc
186+
- run: tree pages
187+
- uses: actions/upload-pages-artifact@v3
188+
with:
189+
retention-days: 1
190+
path: pages/
191+
192+
deploy_web_pages:
193+
if: ${{ github.ref == 'refs/heads/development' }}
194+
needs: collect_webpages
195+
permissions:
196+
pages: write
197+
id-token: write
198+
environment:
199+
name: github-pages
200+
url: ${{ steps.deployment.outputs.page_url }}
201+
runs-on: ubuntu-latest
202+
steps:
203+
- name: deployment
204+
id: deployment
205+
uses: actions/deploy-pages@v4

.github/workflows/validation.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ on:
77
tags: [ '*' ]
88
workflow_dispatch:
99

10-
concurrency:
11-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12-
cancel-in-progress: true
13-
1410
jobs:
1511
validation:
1612
uses: JeffersonLab/clas12-validation/.github/workflows/ci.yml@main

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/coatjava
33
/myLocalMvnRepo
44
target
5+
/publish
56

67
*.class
78
*lundfiles*.dat
@@ -36,4 +37,4 @@ hs_err_pid*
3637
*.evio
3738

3839
bin/evio2hipotest
39-
export.sh
40+
export.sh

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Nathan Baltzell <[email protected]> <[email protected]>
4343
4444
4545
46+
4647
4748
4849
Nick Markov <[email protected]>

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# COATJAVA
22
[![Build Status](https://github.com/jeffersonlab/coatjava/workflows/Coatjava-CI/badge.svg)](https://github.com/jeffersonlab/coatjava/actions)
33
[![Validation Status](https://github.com/JeffersonLab/coatjava/actions/workflows/validation.yml/badge.svg)](https://github.com/JeffersonLab/coatjava/actions/workflows/validation.yml)
4-
[![codecov](https://codecov.io/gh/JeffersonLab/coatjava/branch/development/graph/badge.svg?precision=2)](https://codecov.io/gh/JeffersonLab/coatjava/branch/development)
4+
[![Coverage](https://badgen.net/static/JaCoCo/coverage/purple)](https://jeffersonlab.github.io/coatjava/jacoco)
5+
6+
- [API Documentation (Javadoc)](https://jeffersonlab.github.io/coatjava/javadoc)
7+
8+
----
59

610
The original repository for COATJAVA was named "clas12-offline-software" and is [now archived and read-only](https://github.com/JeffersonLab/clas12-offline-software). On May 17, 2023, this new repository was created by running BFG Repo Cleaner to get rid of old, large data files and things that should never have been in the repository, giving 10x reduction in repository size, clone time, etc, and renamed `coatjava`. The most critical, GitHub-specific aspects have been transferred to this new repository:
711

@@ -27,8 +31,6 @@ For anything more, see the "General Developer Documentation" link on that softwa
2731

2832
The [troubleshooting](https://github.com/JeffersonLab/clas12-offline-software/wiki/Troubleshooting) wiki page may also still be useful but likely outdated.
2933

30-
<!--Javadocs can be found at the repository's [gh-page](https://jeffersonlab.github.io/clas12-offline-software/). A build history can be found at [Travis CI](https://travis-ci.org/JeffersonLab/clas12-offline-software).-->
31-
3234
<!--
3335
## Repository Structure and Dependency Management
3436
### Common Tools

bin/env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22

3-
thisEnv=${BASH_SOURCE[0]:-$0}
4-
CLAS12DIR=$(cd $(dirname $thisEnv)/.. && pwd -P)
3+
CLAS12DIR=$(cd $(dirname ${BASH_SOURCE[0]:-$0})/.. && pwd -P)
54
export CLAS12DIR
65

76
# Set default field maps (but do not override user's env):
@@ -26,6 +25,7 @@ if [ $# -ge 1 ]; then
2625
JYPATH="${JYPATH:+${JYPATH}:}${jars}"
2726
done
2827
done
28+
unset lib jars
2929

3030
# additional variables and settings for groovy
3131
if [ "$1" = "groovy" ]; then

build-coatjava.sh

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,28 @@ set -e
44
set -u
55
set -o pipefail
66

7-
usage='build-coatjava.sh [-h] [--quiet] [--spotbugs] [--nomaps] [--unittests]'
7+
usage='''build-coatjava.sh [-h] [--help] [--quiet] [--spotbugs] [--nomaps] [--unittests]
8+
- all other arguments will be passed to `mvn`, e.g., -T4 will build with 4 parallel threads'''
89

910
quiet="no"
1011
runSpotBugs="no"
1112
downloadMaps="yes"
1213
runUnitTests="no"
14+
mvnArgs=()
1315
for xx in $@
1416
do
15-
if [ "$xx" == "--spotbugs" ]
16-
then
17-
runSpotBugs="yes"
18-
elif [ "$xx" == "-n" ]
19-
then
20-
runSpotBugs="no"
21-
elif [ "$xx" == "--nomaps" ]
22-
then
23-
downloadMaps="no"
24-
elif [ "$xx" == "--unittests" ]
25-
then
26-
runUnitTests="yes"
27-
elif [ "$xx" == "--quiet" ]
28-
then
29-
quiet="yes"
30-
else
31-
echo "$usage"
32-
exit 2
33-
fi
17+
case $xx in
18+
--spotbugs) runSpotBugs="yes" ;;
19+
-n) runSpotBugs="no" ;;
20+
--nomaps) downloadMaps="no" ;;
21+
--unittests) runUnitTests="yes" ;;
22+
--quiet) quiet="yes" ;;
23+
-h|--help)
24+
echo "$usage"
25+
exit 2
26+
;;
27+
*) mvnArgs+=($xx) ;;
28+
esac
3429
done
3530

3631
top="$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
@@ -42,6 +37,7 @@ then
4237
wget='wget --progress=dot:mega'
4338
mvn="mvn -q -B --settings $top/maven-settings.xml"
4439
fi
40+
mvn+=" ${mvnArgs[*]:-}"
4541

4642
command_exists () {
4743
type "$1" &> /dev/null
@@ -96,13 +92,12 @@ cp -r etc coatjava/
9692
which python3 >& /dev/null && python=python3 || python=python
9793
$python etc/bankdefs/util/bankSplit.py coatjava/etc/bankdefs/hipo4 || exit 1
9894
mkdir -p coatjava/lib/clas
99-
#cp external-dependencies/JEventViewer-1.1.jar coatjava/lib/clas/
100-
#cp external-dependencies/vecmath-1.3.1-2.jar coatjava/lib/clas/
10195
mkdir -p coatjava/lib/utils
102-
cp external-dependencies/jclara-4.3-SNAPSHOT.jar coatjava/lib/utils
103-
#cp external-dependencies/jaw-1.0.jar coatjava/lib/utils
10496
mkdir -p coatjava/lib/services
10597

98+
# FIXME: this is still needed by one of the tests
99+
cp external-dependencies/jclara-4.3-SNAPSHOT.jar coatjava/lib/utils
100+
106101
### clean up any cache copies ###
107102
cd common-tools/coat-lib; $mvn clean; cd -
108103

0 commit comments

Comments
 (0)