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
17 changes: 7 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
version: 2

registries:
clas12maven:
type: maven-repository
url: https://clasweb.jlab.org/clas12maven
jhep:
type: maven-repository
url: https://clasweb.jlab.org/jhep/maven
# registries: FIXME: disabled, see <https://github.com/JeffersonLab/coatjava/issues/915>
# clas12maven:
# type: maven-repository
# url: https://clasweb.jlab.org/.clas12maven
# jhep:
# type: maven-repository
# url: https://clasweb.jlab.org/.jhep/maven

updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
registries:
- clas12maven
- jhep
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
Expand Down
85 changes: 46 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ defaults:
shell: bash

env:
java_version: 25
JAVA_VERSION: 21 # must be consistent with POM; see also dependabot config for any version limits
JAVA_VERSION_LATEST: 25 # the latest `JAVA_VERSION` that we test with CI
java_distribution: zulu
javadoc_version: 25 # newer than `JAVA_VERSION` for better javadoc
groovy_version: 4.x
CCDB_CONNECTION: 'sqlite:////cvmfs/oasis.opensciencegrid.org/jlab/hallb/clas12/sw/noarch/data/ccdb/ccdb_latest.sqlite'
nthreads: 1
Expand All @@ -40,8 +42,6 @@ jobs:
with:
key: raw_test_data # fixed key will always hit; clear cache to trigger cache miss
path: |
clas_005038.evio.00000
clas_021559.evio.00001
clas_018779.evio.00001
lookup-only: true
- name: install xrootd-client
Expand All @@ -51,10 +51,12 @@ jobs:
sudo apt -y install xrootd-client
- name: download
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
# run: |
# xrdcp xroot://sci-xrootd.jlab.org///osgpool/hallb/clas12/validation/raw/rg-d/clas_018779.evio.00001 ./
run: |
xrdcp xroot://sci-xrootd.jlab.org///osgpool/hallb/clas12/validation/clas_005038.evio.00000 ./
xrdcp xroot://sci-xrootd.jlab.org///osgpool/hallb/clas12/validation/raw/rg-l/clas_021559.evio.00001 ./
xrdcp xroot://sci-xrootd.jlab.org///osgpool/hallb/clas12/validation/raw/rg-d/clas_018779.evio.00001 ./
git lfs install
git clone --depth 1 https://code.jlab.org/hallb/clas12/validation-data
cp validation-data/raw/rg-d/clas_018779.evio.00001 .

# build
#############################################################################
Expand All @@ -71,17 +73,9 @@ jobs:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: ${{ env.java_version }}
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
cache: maven
- name: install xrootd-client (linux)
if: ${{ matrix.runner == 'ubuntu-latest' }}
run: |
sudo apt -y update
sudo apt -y install xrootd-client
- name: install xrootd-client (macos)
if: ${{ matrix.runner == 'macos-latest' }}
run: brew install xrootd
- name: setup cvmfs
uses: cvmfs-contrib/github-action-cvmfs@v5
with:
Expand All @@ -92,7 +86,11 @@ jobs:
if: ${{ github.ref_type == 'tag' }}
run: libexec/version-bump.sh ${{ github.ref_name }}
- name: build
run: ./build-coatjava.sh --clara --xrootd --no-progress -T${{ env.nthreads }}
run: |
git lfs install
git submodule update --init ./etc/data/magfield
./build-coatjava.sh --cvmfs --no-progress -T${{ env.nthreads }}
./install-clara -b -c ./coatjava ./clara
- name: tar # tarball to preserve permissions
run: |
tar czvf coatjava.tar.gz coatjava
Expand All @@ -108,27 +106,40 @@ jobs:
# tests
#############################################################################

java_matrix: # make JSON job matrix, to workaround GitHub's lack of `env` var support in job matrix params
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.matrix.outputs.versions }}
steps:
- name: matrix
id: matrix
run: echo versions="[\"${{ env.JAVA_VERSION }}\",\"${{ env.JAVA_VERSION_LATEST }}\"]" | tee -a $GITHUB_OUTPUT

unit_tests:
needs:
- java_matrix
strategy:
fail-fast: false
matrix:
JAVA_VERSION: ${{ fromJson(needs.java_matrix.outputs.versions) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: ${{ env.java_version }}
java-version: ${{ matrix.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
cache: maven
- name: install xrootd-client
run: |
sudo apt -y update
sudo apt -y install xrootd-client
- uses: cvmfs-contrib/github-action-cvmfs@v5
with:
cvmfs_repositories: 'oasis.opensciencegrid.org'
- name: unit tests
run: ./build-coatjava.sh --xrootd --unittests --no-progress -T${{ env.nthreads }}
run: ./build-coatjava.sh --cvmfs --unittests --no-progress -T${{ env.nthreads }}
- name: collect jacoco report
if: ${{ matrix.JAVA_VERSION == env.JAVA_VERSION }}
run: validation/jacoco-aggregate.sh
- name: publish jacoco report
if: ${{ matrix.JAVA_VERSION == env.JAVA_VERSION }}
uses: actions/upload-artifact@v5
with:
name: jacoco_report
Expand All @@ -143,7 +154,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: ${{ env.java_version }}
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
cache: maven
- uses: cvmfs-contrib/github-action-cvmfs@v5
Expand All @@ -165,32 +176,26 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: ${{ env.java_version }}
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
cache: maven
- uses: cvmfs-contrib/github-action-cvmfs@v5
with:
cvmfs_repositories: 'oasis.opensciencegrid.org'
- name: install xrootd-client
run: |
sudo apt -y update
sudo apt -y install xrootd-client
- uses: actions/download-artifact@v6
with:
name: build_ubuntu-latest
- uses: actions/cache/restore@v4
with:
key: raw_test_data
path: |
clas_005038.evio.00000
clas_021559.evio.00001
clas_018779.evio.00001
- name: untar build
run: tar xzvf coatjava.tar.gz
- name: run test
run: |
ls -lhtr
./coatjava/bin/decoder -n 10000 -o dog.hipo ./clas_005038.evio.00000
./coatjava/bin/decoder -n 10000 -o dog.hipo ./clas_018779.evio.00001

test_clara:
needs: [ build, download_test_data ]
Expand All @@ -202,7 +207,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: ${{ env.java_version }}
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
cache: maven
- name: setup cvmfs
Expand All @@ -216,8 +221,6 @@ jobs:
with:
key: raw_test_data
path: |
clas_005038.evio.00000
clas_021559.evio.00001
clas_018779.evio.00001
- name: untar build
run: |
Expand Down Expand Up @@ -258,7 +261,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: ${{ env.java_version }}
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
cache: maven
- uses: actions/download-artifact@v6
Expand All @@ -268,9 +271,13 @@ jobs:
with:
cvmfs_repositories: 'oasis.opensciencegrid.org'
- name: untar build
run: tar xzvf coatjava.tar.gz
run: |
tar xzvf coatjava.tar.gz
tar xzvf clara.tar.gz
- name: run test
run: |
git lfs install
git submodule update --init validation/advanced-tests/data
cd validation/advanced-tests
echo "COMMAND: ${{ matrix.cmd }}"
${{ matrix.cmd }}
Expand All @@ -283,7 +290,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: ${{ env.java_version }}
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
cache: maven
- name: setup groovy
Expand All @@ -306,7 +313,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: ${{ env.java_version }}
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.java_distribution }}
cache: maven
- uses: actions/download-artifact@v6
Expand Down Expand Up @@ -342,7 +349,7 @@ jobs:
- name: set up JDK
uses: actions/setup-java@v5
with:
java-version: ${{ env.java_version }}
java-version: ${{ env.javadoc_version }}
distribution: ${{ env.java_distribution }}
cache: maven
- name: build coatjava javadocs # javadoc:aggregate output dir cannot be controlled, so assume the latest "standard" path and `mv` it
Expand Down
Loading