Skip to content

Commit

Permalink
Merge branch 'development' into iss269-htccClusterPass2
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks authored Dec 5, 2024
2 parents 580229e + 8e265ae commit 9064c5d
Show file tree
Hide file tree
Showing 249 changed files with 7,676 additions and 5,471 deletions.
25 changes: 25 additions & 0 deletions .containers/coatjava.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#syntax=docker/dockerfile:1

FROM ubuntu:noble

LABEL name="coatjava"
LABEL maintainer="Whitney Armstrong <[email protected]>"
LABEL architecture="amd64"

USER root


RUN apt update && apt upgrade -y
RUN apt install cmake vim maven groovy git ca-certificates wget curl python-is-python3 \
openjdk-17-jdk openjdk-17-jre openjdk-17-jdk-headless openjdk-17-jre-headless \
python3-sqlalchemy -y && update-ca-certificates

# CA certificates
ADD https://pki.jlab.org/JLabCA.crt /etc/ssl/certs/JLabCA.crt
#RUN trust anchor --store /image/JLabCA.crt

ARG REF_NAME=development
# build coatjava
RUN java --version && cd /opt && \
git clone https://code.jlab.org/hallb/alert/coatjava.git && cd coatjava && \
git fetch origin && git checkout ${REF_NAME} && ./build-coatjava.sh --nomaps
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
ignore:
- dependency-name: "org.jlab:groot" # since version numbers are not in order
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
81 changes: 66 additions & 15 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

defaults:
run:
shell: bash

env:
java_version: 17
java_distribution: zulu
groovy_version: 4.0.3

jobs:

# build
Expand All @@ -28,16 +37,14 @@ jobs:
runner:
- ubuntu-latest
- macos-latest
outputs:
default_runner: ubuntu-latest
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 11
distribution: zulu
java-version: ${{ env.java_version }}
distribution: ${{ env.java_distribution }}
- name: build
run: ./build-coatjava.sh --spotbugs --unittests --quiet -T4
- name: tar # tarball to preserve permissions
Expand All @@ -52,8 +59,9 @@ jobs:
run: validation/jacoco-aggregate.sh
- name: publish jacoco report
if: ${{ matrix.runner == 'ubuntu-latest' }}
uses: actions/upload-pages-artifact@v3
uses: actions/upload-artifact@v4
with:
name: jacoco_report
path: publish/
retention-days: 1

Expand Down Expand Up @@ -90,8 +98,8 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 11
distribution: zulu
java-version: ${{ env.java_version }}
distribution: ${{ env.java_distribution }}
- uses: actions/download-artifact@v4
with:
name: build_${{ matrix.runner }}
Expand All @@ -105,21 +113,21 @@ jobs:
test_run-groovy:
needs: [ build ]
runs-on: ${{ needs.build.outputs.default_runner }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 11
distribution: zulu
java-version: ${{ env.java_version }}
distribution: ${{ env.java_distribution }}
- name: setup groovy
uses: wtfjoke/setup-groovy@v2
with:
groovy-version: 4.x
groovy-version: ${{ env.groovy_version }}
- uses: actions/download-artifact@v4
with:
name: build_${{ needs.build.outputs.default_runner }}
name: build_ubuntu-latest
- name: untar build
run: tar xzvf coatjava.tar.gz
- name: test run-groovy
Expand All @@ -130,17 +138,60 @@ jobs:
- build
- test_coatjava
- test_run-groovy
runs-on: ${{ needs.build.outputs.default_runner }}
runs-on: ubuntu-latest
steps:
- name: pass
run: exit 0

# generate documentation
#############################################################################

generate_documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ env.java_version }}
distribution: ${{ env.java_distribution }}
- name: build
run: ./build-coatjava.sh
- name: generate documentation
run: ./build-javadocs.sh
- uses: actions/upload-artifact@v4
with:
name: javadoc
path: docs/javadoc/
retention-days: 1

# deploy web pages
#############################################################################

collect_webpages:
if: ${{ github.ref == 'refs/heads/development' }}
needs: [ build, generate_documentation ]
runs-on: ubuntu-latest
steps:
- name: download jacoco report
uses: actions/download-artifact@v4
with:
name: jacoco_report
path: pages/jacoco
- name: download javadoc documentation
uses: actions/download-artifact@v4
with:
name: javadoc
path: pages/javadoc
- run: tree pages
- uses: actions/upload-pages-artifact@v3
with:
retention-days: 1
path: pages/

deploy_web_pages:
if: ${{ github.event_name == 'push' }}
needs: build
if: ${{ github.ref == 'refs/heads/development' }}
needs: collect_webpages
permissions:
pages: write
id-token: write
Expand Down
31 changes: 31 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_PIPELINE_SOURCE == "webide"'
- if: '$CI_COMMIT_BRANCH == "master"'
- if: '$CI_COMMIT_BRANCH == "development"'
- if: '$CI_COMMIT_TAG'

default:
image: ubuntu:noble
retry: 2

coatjava_build:
image: gcr.io/kaniko-project/executor:debug
script:
- echo "${CI_COMMIT_REF_NAME}"
- >-
/kaniko/executor
--context $CI_PROJECT_DIR/docker
--dockerfile $CI_PROJECT_DIR/.containers/coatjava.Dockerfile
--destination $CI_REGISTRY_IMAGE/coatjava:${CI_COMMIT_REF_NAME}
--build-arg REF_NAME=${CI_COMMIT_REF_NAME}
alert_testing:
needs: ["coatjava_build"]
variables:
REF_NAME: "$CI_COMMIT_REF_NAME"
trigger:
project: hallb/alert/c12
strategy: depend
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# COATJAVA
[![Build Status](https://github.com/jeffersonlab/coatjava/workflows/Coatjava-CI/badge.svg)](https://github.com/jeffersonlab/coatjava/actions)
[![Validation Status](https://github.com/JeffersonLab/coatjava/actions/workflows/validation.yml/badge.svg)](https://github.com/JeffersonLab/coatjava/actions/workflows/validation.yml)
[![Coverage](https://badgen.net/static/JaCoCo/coverage/purple)](https://jeffersonlab.github.io/coatjava)
[![Coverage](https://badgen.net/static/JaCoCo/coverage/purple)](https://jeffersonlab.github.io/coatjava/jacoco)

- [API Documentation (Javadoc)](https://jeffersonlab.github.io/coatjava/javadoc)

----

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:

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

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

<!--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).-->

<!--
## Repository Structure and Dependency Management
### Common Tools
Expand Down
2 changes: 1 addition & 1 deletion bin/bg-merger
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

export MALLOC_ARENA_MAX=1

Expand Down
2 changes: 1 addition & 1 deletion bin/bos2hipo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

java -Xms1024m -XX:+UseSerialGC \
-cp "$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/plugins/*" \
Expand Down
2 changes: 1 addition & 1 deletion bin/cvt-compare
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

export MALLOC_ARENA_MAX=1

Expand Down
2 changes: 1 addition & 1 deletion bin/daqEventViewer
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

java -Xms1024m \
-cp "$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/services/*:$CLAS12DIR/lib/utils/*" \
Expand Down
2 changes: 1 addition & 1 deletion bin/dclayereffs-ana
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

java -Dsun.java2d.pmoffscreen=false -Xmx2048m -Xms1024m \
-cp "$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/utils/*:$CLAS12DIR/lib/services/*" \
Expand Down
2 changes: 1 addition & 1 deletion bin/decoder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

export MALLOC_ARENA_MAX=1

Expand Down
2 changes: 1 addition & 1 deletion bin/dict-generator
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

export MALLOC_ARENA_MAX=1

Expand Down
2 changes: 1 addition & 1 deletion bin/dict-maker
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

export MALLOC_ARENA_MAX=1

Expand Down
2 changes: 1 addition & 1 deletion bin/dict-merger
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

export MALLOC_ARENA_MAX=1

Expand Down
2 changes: 1 addition & 1 deletion bin/dict-validator
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

export MALLOC_ARENA_MAX=1

Expand Down
2 changes: 1 addition & 1 deletion bin/evio-viewer
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

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

java -cp "$CLAS12DIR/lib/clas/*" org.jlab.coda.eventViewer.EventTreeFrame $*
2 changes: 1 addition & 1 deletion bin/evio2hipo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

export MALLOC_ARENA_MAX=1

Expand Down
2 changes: 1 addition & 1 deletion bin/eviocure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

export MALLOC_ARENA_MAX=1

Expand Down
2 changes: 1 addition & 1 deletion bin/eviodump
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

java -Xms1024m \
-cp "$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/plugins/*" \
Expand Down
8 changes: 0 additions & 8 deletions bin/hipo-add

This file was deleted.

2 changes: 1 addition & 1 deletion bin/hipo-browser
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

java -Xms1024m \
-cp "$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/plugins/*" \
Expand Down
2 changes: 1 addition & 1 deletion bin/hipo-diff
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

export MALLOC_ARENA_MAX=1

Expand Down
2 changes: 1 addition & 1 deletion bin/hipo-json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

java -Xms1024m \
-cp "$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/plugins/*" \
Expand Down
Loading

0 comments on commit 9064c5d

Please sign in to comment.