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
108 changes: 69 additions & 39 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
image: codecr.jlab.org/hallb/clas12/container-forge/base:latest

workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
Expand All @@ -12,80 +14,108 @@ 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
paths:
- 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!!!

16 changes: 16 additions & 0 deletions libexec/profile.sh
Original file line number Diff line number Diff line change
@@ -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)