From 0671f46210cdd5136c09c221030bf0b35f9ae28e Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Tue, 7 Oct 2025 20:10:53 -0400 Subject: [PATCH 1/5] gitlab ci prep --- .gitlab-ci.yml | 108 +++++++++++++++++++++++++++++++------------------ 1 file changed, 69 insertions(+), 39 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 44eefbd1d2..81a57d7aa5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,5 @@ +image: codecr.jlab.org/hallb/clas12/container-forge/base:latest + workflow: rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" @@ -12,53 +14,48 @@ workflow: default: interruptible: true - before_script: - # FIXME: build minimal el9 container, or use container-forge - - dnf install -y java-21-openjdk maven wget tree ruby python3-pip stages: - - build-stage - - test-stage - - deploy-stage + - build + - test + - deploy build: - stage: build-stage + stage: build script: - - ./build-coatjava.sh -T4 --unittests --spotbugs --quiet --no-progress + - ./build-coatjava.sh -T4 --quiet --no-progress + - tar -czf coatjava.tar.gz coatjava artifacts: when: always expire_in: 1 day paths: - - coatjava + - coatjava.tar.gz depana: allow_failure: true - stage: test-stage - dependencies: [build] + stage: build script: - libexec/dependency-tree.sh - libexec/dependency-analysis.sh -eb: - stage: test-stage +spotbugs: + stage: test + needs: [build] dependencies: [build] script: - - cd validation/advanced-tests && ./run-eb-tests.sh -100 ${ARG} - parallel: - matrix: - - ARG: electronproton - - ARG: electronprotonC - - ARG: electrongamma - - ARG: electronneutronC - - ARG: electronFTpion + - > + tar -xzf coatjava.tar.gz && + ./build-coatjava.sh -T4 --spotbugs --quiet --no-progress -jacoco: - allow_failure: true - stage: test-stage +unit_tests: + stage: test needs: [build] dependencies: [build] script: - - ./validation/jacoco-aggregate.sh + - > + tar -xzf coatjava.tar.gz && + ./build-coatjava.sh -T4 --unittests --quiet --no-progress && + ./validation/jacoco-aggregate.sh artifacts: when: always expire_in: 1 day @@ -66,26 +63,59 @@ jacoco: - publish docs: - stage: test-stage - needs: [build,jacoco] - dependencies: [build,jacoco] + stage: test + needs: [build,unit_tests] + dependencies: [build,unit_tests] script: - - python3 -m pip install -r docs/mkdocs/requirements.txt - - ./docs/mkdocs/generate.sh pages - - libexec/build-javadocs.sh - - mv target/reports/apidocs pages/javadoc - - mv publish pages/jacoco + - > + tar -xzf coatjava.tar.gz && + python3 -m venv venv && + source venv/bin/activate && + python3 -m pip install -r docs/mkdocs/requirements.txt && + ./docs/mkdocs/generate.sh pages && + libexec/build-javadocs.sh && + ls -l && ls -l pages && ls -l publish && + mv target/reports/apidocs pages/javadoc && + cp -r publish pages/jacoco artifacts: when: always expire_in: 7 days paths: - pages -#deploy: -# stage: deploy-stage -# dependencies: [docs,jacoco,depana] +eb: + stage: test + needs: [build] + dependencies: [build] + script: + - > + tar -xzf coatjava.tar.gz && + cd validation/advanced-tests && + ./run-eb-tests.sh -100 ${ARG} + parallel: + matrix: + - ARG: electronproton + - ARG: electronprotonC + - ARG: electrongamma + - ARG: electronneutronC + - ARG: electronFTpion + +profile: + stage: test + needs: [build] + dependencies: [build] + script: + - > + tar -xzf coatjava.tar.gz && + libexec/profile.sh -#release: -# stage: deploy-stage -# dependencies: [deploy] +deploy: + stage: deploy + script: + - echo DEPLOY!!! + +release: + stage: deploy + script: + - echo RELEASE!!! From d20804b3a583e42ef6eee2960af4b179c994090d Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Tue, 7 Oct 2025 20:41:05 -0400 Subject: [PATCH 2/5] add missing libexec placeholder --- libexec/profile.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 libexec/profile.sh diff --git a/libexec/profile.sh b/libexec/profile.sh new file mode 100755 index 0000000000..0b1538d7ba --- /dev/null +++ b/libexec/profile.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +echo PROFILE!!! + +#asprof -e cpu -d 120 \ +# -o tree -f results/$1_tree_cpu.html \ +# $(pidof java) + +#asprof -e nativemem -d 120 \ +# -o tree -f results/$1_tree_nativemem.html \ +# $(pidof java) + +#asprof -e nativemem -d 120 \ +# -f results/$1_mem.jfr \ +# $(pidof java) + From 0579402717ff68c7e4777b80bf026018470ea068 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Wed, 8 Oct 2025 13:14:46 -0400 Subject: [PATCH 3/5] Update .gitlab-ci.yml Co-authored-by: Christopher Dilks --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 81a57d7aa5..df7ea57485 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ stages: build: stage: build script: - - ./build-coatjava.sh -T4 --quiet --no-progress + - ./build-coatjava.sh -T$JL_RUNNER_AVAIL_CPU --quiet --no-progress - tar -czf coatjava.tar.gz coatjava artifacts: when: always From 3531b315a6ebea08ef0c464a66db91340fd89af4 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Wed, 8 Oct 2025 13:15:27 -0400 Subject: [PATCH 4/5] Update .gitlab-ci.yml Co-authored-by: Christopher Dilks --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index df7ea57485..03eb861a6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,7 +45,7 @@ spotbugs: script: - > tar -xzf coatjava.tar.gz && - ./build-coatjava.sh -T4 --spotbugs --quiet --no-progress + ./build-coatjava.sh -T$JL_RUNNER_AVAIL_CPU --spotbugs --quiet --no-progress unit_tests: stage: test From ef69d46fdfa04345cd6bab3131251b1f8754df26 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Wed, 8 Oct 2025 13:15:42 -0400 Subject: [PATCH 5/5] Update .gitlab-ci.yml Co-authored-by: Christopher Dilks --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 03eb861a6b..c2dd8719b6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,7 +54,7 @@ unit_tests: script: - > tar -xzf coatjava.tar.gz && - ./build-coatjava.sh -T4 --unittests --quiet --no-progress && + ./build-coatjava.sh -T$JL_RUNNER_AVAIL_CPU --unittests --quiet --no-progress && ./validation/jacoco-aggregate.sh artifacts: when: always