diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index f8d6ab22a..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,422 +0,0 @@ -# https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: Coatjava-CI - -on: - pull_request: - push: - branches: [ development ] - tags: [ '*' ] - schedule: - # NOTE: From what I read, the email notification for cron can only go - # to the last committer of this file!!!!! - - cron: '0 22 * * *' - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -defaults: - run: - shell: bash - -env: - 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 - -jobs: - - # download & cache - ############################################################################# - - download_test_data: - runs-on: ubuntu-latest - steps: - - uses: actions/cache@v5 - id: cache - with: - key: raw_test_data # fixed key will always hit; clear cache to trigger cache miss - path: | - clas_018779.evio.00001 - lookup-only: true - - name: install xrootd-client - if: ${{ steps.cache.outputs.cache-hit != 'true' }} - run: | - sudo apt -y update - 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: | - 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 - ############################################################################# - - build: - strategy: - fail-fast: true - matrix: - runner: - - ubuntu-latest - - macos-latest - runs-on: ${{ matrix.runner }} - steps: - - uses: actions/checkout@v6 - - uses: actions/setup-java@v5 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: ${{ env.java_distribution }} - cache: maven - - name: setup cvmfs - uses: cvmfs-contrib/github-action-cvmfs@v5 - with: - cvmfs_repositories: 'oasis.opensciencegrid.org' - - name: cvmfs - run: ls /cvmfs/oasis.opensciencegrid.org/jlab/hallb/clas12/sw/noarch/data/ccdb/ccdb_latest.sqlite - - name: bump version to tag if tag trigger - if: ${{ github.ref_type == 'tag' }} - run: libexec/version-bump.sh ${{ github.ref_name }} - - name: build - run: | - ./build-coatjava.sh --lfs --no-progress -T${{ env.nthreads }} - ./bin/install-clara -b -c ./coatjava ./clara - - name: tar # tarball to preserve permissions - run: | - tar czvf coatjava.tar.gz coatjava - tar czvf clara.tar.gz clara - - uses: actions/upload-artifact@v6 - with: - name: build_${{ matrix.runner }} - retention-days: 1 - path: | - coatjava.tar.gz - clara.tar.gz - - # 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@v6 - - uses: actions/setup-java@v5 - with: - java-version: ${{ matrix.JAVA_VERSION }} - distribution: ${{ env.java_distribution }} - cache: maven - - uses: cvmfs-contrib/github-action-cvmfs@v5 - with: - cvmfs_repositories: 'oasis.opensciencegrid.org' - - name: unit tests - run: ./build-coatjava.sh --lfs --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@v6 - with: - name: jacoco_report - path: publish/ - retention-days: 1 - - spotbugs: - needs: [ build ] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: Set up JDK - uses: actions/setup-java@v5 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: ${{ env.java_distribution }} - cache: maven - - uses: cvmfs-contrib/github-action-cvmfs@v5 - with: - cvmfs_repositories: 'oasis.opensciencegrid.org' - - uses: actions/download-artifact@v7 - with: - name: build_ubuntu-latest - - name: untar build - run: tar xzvf coatjava.tar.gz - - name: spotbugs - run: ./build-coatjava.sh --spotbugs --nomaps --no-progress - - test_decoder: - needs: [ build, download_test_data ] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: Set up JDK - uses: actions/setup-java@v5 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: ${{ env.java_distribution }} - cache: maven - - uses: cvmfs-contrib/github-action-cvmfs@v5 - with: - cvmfs_repositories: 'oasis.opensciencegrid.org' - - uses: actions/download-artifact@v7 - with: - name: build_ubuntu-latest - - uses: actions/cache/restore@v5 - with: - key: raw_test_data - path: | - clas_018779.evio.00001 - - name: untar build - run: tar xzvf coatjava.tar.gz - - name: run test - run: | - ls -lhtr - ./coatjava/bin/decoder -l FINE -n 10000 -o dog.hipo ./clas_018779.evio.00001 - - test_clara: - needs: [ build, download_test_data ] - strategy: - fail-fast: true - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: Set up JDK - uses: actions/setup-java@v5 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: ${{ env.java_distribution }} - cache: maven - - name: setup cvmfs - uses: cvmfs-contrib/github-action-cvmfs@v5 - with: - cvmfs_repositories: 'oasis.opensciencegrid.org' - - uses: actions/download-artifact@v7 - with: - name: build_ubuntu-latest - - uses: actions/cache/restore@v5 - with: - key: raw_test_data - path: | - clas_018779.evio.00001 - - name: untar build - run: | - tar xzvf clara.tar.gz - - name: run test - run: | - ls -lhtr - ./bin/run-clara -y ./etc/services/rgd-clarode.yml -t 4 -n 500 -c ./clara -o ./tmp ./clas_018779.evio.00001 - ls -lhtr - - test_coatjava: - needs: [ build ] - strategy: - fail-fast: true - matrix: - runner: - - ubuntu-latest - id: - - kpp - - eb-ep - - eb-eg - - eb-epc - - eb-enc - - eb-eftpi - include: - # run all tests on ubuntu - - { id: kpp, cmd: ./run-advanced-tests.sh } - - { id: eb-ep, cmd: ./run-eb-tests.sh -100 electronproton } - - { id: eb-eg, cmd: ./run-eb-tests.sh -100 electrongamma } - - { id: eb-epc, cmd: ./run-eb-tests.sh -100 electronprotonC } - - { id: eb-enc, cmd: ./run-eb-tests.sh -100 electronneutronC } - - { id: eb-eftpi, cmd: ./run-eb-tests.sh -100 electronFTpion } - # run one macos test - - { runner: macos-latest, id: eb-ep, cmd: ./run-eb-tests.sh -100 electronproton } - runs-on: ${{ matrix.runner }} - steps: - - uses: actions/checkout@v6 - - name: Set up JDK - uses: actions/setup-java@v5 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: ${{ env.java_distribution }} - cache: maven - - uses: actions/download-artifact@v7 - with: - name: build_${{ matrix.runner }} - - uses: cvmfs-contrib/github-action-cvmfs@v5 - with: - cvmfs_repositories: 'oasis.opensciencegrid.org' - - name: untar build - 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 }} - - test_run-groovy: - needs: [ build ] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: Set up JDK - uses: actions/setup-java@v5 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: ${{ env.java_distribution }} - cache: maven - - name: setup groovy - uses: wtfjoke/setup-groovy@v3 - with: - groovy-version: ${{ env.groovy_version }} - - uses: actions/download-artifact@v7 - with: - name: build_ubuntu-latest - - name: untar build - run: tar xzvf coatjava.tar.gz - - name: test run-groovy - run: coatjava/bin/run-groovy validation/advanced-tests/test-run-groovy.groovy - - dependency_analysis: - needs: [ build ] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: Set up JDK - uses: actions/setup-java@v5 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: ${{ env.java_distribution }} - cache: maven - - uses: actions/download-artifact@v7 - with: - name: build_ubuntu-latest - - name: untar build - run: tar xzvf coatjava.tar.gz - - name: print dependency tree - run: libexec/dependency-tree.sh - - name: dependency analysis - run: libexec/dependency-analysis.sh - - # documentation - ############################################################################# - - generate_documentation: - runs-on: ubuntu-latest - needs: [ unit_tests ] - steps: - ### mkdocs - - uses: actions/checkout@v6 - - name: install mkdocs dependencies - run: python -m pip install -r docs/mkdocs/requirements.txt - - name: generate mkdocs - run: docs/mkdocs/generate.sh pages - ### jacoco - - name: download jacoco report artifact - uses: actions/download-artifact@v7 - with: - name: jacoco_report - path: pages/jacoco - ### javadoc - - name: set up JDK - uses: actions/setup-java@v5 - with: - 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 - run: | - libexec/build-javadocs.sh - mv target/reports/apidocs pages/javadoc - ### upload artifacts - - uses: actions/upload-pages-artifact@v4 - with: - retention-days: 7 - path: pages/ - - deploy_web_pages: - if: ${{ github.ref == 'refs/heads/development' }} - needs: [ generate_documentation ] - permissions: - pages: write - id-token: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: deployment - id: deployment - uses: actions/deploy-pages@v4 - - # finalize - ############################################################################# - - release_build: - if: ${{ github.ref_type == 'tag' }} - needs: [ build ] - runs-on: ubuntu-latest - permissions: - contents: write - issues: write - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REPO_URL: ${{ github.event.repository.html_url }} - RUN_ID: ${{ github.run_id }} - TAG_NAME: ${{ github.ref_name }} - steps: - - uses: actions/checkout@v6 - - uses: actions/download-artifact@v7 - with: - name: build_ubuntu-latest - - name: rename artifact - run: | - tar xzf coatjava.tar.gz - mv coatjava{,-${{ env.TAG_NAME }}} - tar czf coatjava-${{ env.TAG_NAME }}{.tar.gz,} - - name: release - uses: softprops/action-gh-release@v2 - with: - files: coatjava-${{ env.TAG_NAME }}.tar.gz - - name: open issue if failed - if: ${{ cancelled() || failure() }} - uses: JasonEtco/create-an-issue@v2 - with: - filename: .github/issue_release.md - - final: - needs: - - test_coatjava - - dependency_analysis - - test_run-groovy - - generate_documentation - runs-on: ubuntu-latest - steps: - - name: pass - run: exit 0 diff --git a/.github/workflows/submodule.yml b/.github/workflows/submodule.yml deleted file mode 100644 index a647fa395..000000000 --- a/.github/workflows/submodule.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Submodule Changes - -on: - pull_request: - types: - - opened - -permissions: - pull-requests: write - contents: read - -jobs: - changes: - name: Submodule Changes - if: github.actor == 'dependabot[bot]' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - submodules: true - - name: get changes - id: changes - run: | - for sm in $(grep 'path = ' .gitmodules | awk '{print $3}'); do - git diff origin/${{ github.base_ref }} --submodule=log -- $sm | tee -a changes.txt - done - echo "changes<> $GITHUB_OUTPUT - cat changes.txt >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - name: comment - uses: actions/github-script@v8 - with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `## Submodule Changes\n\n\`\`\`\n${{ steps.changes.outputs.changes }}\n\`\`\`` - }) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml deleted file mode 100644 index 6c42d6d92..000000000 --- a/.github/workflows/validation.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Validation - -on: - pull_request: - push: - branches: [ development ] - tags: [ '*' ] - workflow_dispatch: - -jobs: - validation: - uses: JeffersonLab/clas12-validation/.github/workflows/ci.yml@main - with: - matrix_evgen: >- - [ - "e_p", - "e_n", - "e_g", - "e_pC", - "eFT_K", - "e_gFT" - ] - matrix_config: >- - [ - "rgb_fall2019" - ] diff --git a/README.md b/README.md index 41938c803..aac7bce5f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# COATJAVA +# 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/jacoco)