From 89b968393bf7514985d3892718cc58b9afe639db Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Mon, 7 Sep 2020 00:56:32 +0200 Subject: [PATCH] [DEV] update for ant --- .gitlab-ci.yml | 58 +++++++----------- build.xml | 156 ++++++++++++++++++++++++++++++------------------- 2 files changed, 117 insertions(+), 97 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 66d7124..71cc41e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,60 +5,42 @@ variables: #JAVA_HOME: "/usr/lib/jvm/java-14-openjdk/" before_script: - #- apk update && apk add python3 gawk - which javac - javac --version - mvn --version -cache: - paths: - - .m2/repository/ - - target/ - stages: - - style - - build - - test - - package + - ant + - maven -style_job: - stage: style +ant_job: + stage: ant + script: + - ant all + #- awk -F, '{ instructions += $4 + $5; covered += $5 } END { print "===============================================\nCoverage Results:\n\n", covered, " / ", instructions, " instructions covered"; print "Total", 100*covered/instructions, "% covered\n==\n===============================================" }' out/coverage/site/jacoco.csv + artifacts: + when: on_success + expire_in: 3 day + paths: + - out/coverage/site + - out/package + reports: + junit: out/junit/TEST-*.xml + +maven_job: + stage: maven script: - mvn $MAVEN_CLI_OPTS checkstyle:checkstyle - mvn $MAVEN_CLI_OPTS formatter:validate - -build_job: - stage: build - dependencies: - - style_job - script: - mvn $MAVEN_CLI_OPTS compile - -test_job: - stage: test - dependencies: - - build_job - script: - mvn $MAVEN_CLI_OPTS test - #- mkdir -p target/site/cobertura && /usr/bin/python3 ./cover2cover.py target/site/jacoco/jacoco.xml src/io/scenarium/logger/ > target/site/cobertura/coverage.xml + - mvn $MAVEN_CLI_OPTS -Dmaven.test.skip=true compile package javadoc:javadoc javadoc:jar - awk -F, '{ instructions += $4 + $5; covered += $5 } END { print "===============================================\nCoverage Results:\n\n", covered, " / ", instructions, " instructions covered"; print "Total", 100*covered/instructions, "% covered\n==\n===============================================" }' target/site/jacoco/jacoco.csv artifacts: when: on_success expire_in: 3 day paths: - target/site/jacoco + - target/*.jar reports: junit: target/surefire-reports/TEST-*.xml - #cobertura: target/site/cobertura/coverage.xml - -package_job: - stage: package - dependencies: - - test_job - script: - - mvn $MAVEN_CLI_OPTS -Dmaven.test.skip=true compile package javadoc:javadoc javadoc:jar - artifacts: - when: on_success - expire_in: 3 day - paths: - - target/*.jar \ No newline at end of file diff --git a/build.xml b/build.xml index f40b9f0..2445436 100644 --- a/build.xml +++ b/build.xml @@ -1,5 +1,9 @@ - + @@ -12,7 +16,7 @@ - + @@ -20,12 +24,20 @@ - - + + + + + + - + + + + + + - - + + + + + + + + + + + + + + + + + + @@ -95,13 +132,6 @@ wget https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core - - - - - - - @@ -121,12 +151,25 @@ wget https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core - - + + + + + + + + + + + + + + + @@ -153,6 +196,39 @@ wget https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -171,53 +247,15 @@ wget https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +