diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 44eefbd1d2..c2dd8719b6 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 -T$JL_RUNNER_AVAIL_CPU --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 -T$JL_RUNNER_AVAIL_CPU --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 -T$JL_RUNNER_AVAIL_CPU --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!!! 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) +