forked from flashpixx/RRD-ANTLR4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
77 lines (65 loc) · 3.03 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
general:
branches:
only:
- master
ignore:
- developing
- /hotfix-.*/
- /release-.*/
- /support-.*/
- /dev-.*/
- /gh-.*/
- /jar-.*/
machine:
timezone:
Europe/Berlin
java:
version: oraclejdk8
dependencies:
pre:
- sudo apt-get install graphviz xsltproc
- wget -O /tmp/doxygen.tar.gz http://ftp.stack.nl/pub/users/dimitri/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz && tar xf /tmp/doxygen.tar.gz -C /tmp
- git clone https://github.com/LightJason/AgentSpeak.git && cd AgentSpeak && mvn -B -DskipTests install
checkout:
post:
- git clean -xdf
- git fetch -p
- git gc --prune=now
- mvn -B -DreResolve=false -DactTransitively=true clean dependency:purge-local-repository
test:
override:
- mvn -B -Dbuild.number=${CIRCLE_BUILD_NUM} -Dcoverall.token=${COVERALL_TOKEN} -Dbuild.commit=${CIRCLE_SHA1} -DperformRelease=false -DskipTests=true
post:
# documentation and test build
- mvn -B -Dbuild.number=${CIRCLE_BUILD_NUM} -Dbuild.commit=${CIRCLE_SHA1} -Dcoverall.token=${COVERALL_TOKEN} site coveralls:report
# create CircleCI reports
- mkdir -p ${CIRCLE_TEST_REPORTS}/junit/
- find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ${CIRCLE_TEST_REPORTS}/junit/ \;
deployment:
production:
branch: master
commands:
- export FILENAME=$(mvn -B help:evaluate -Dexpression=project.build.finalName | grep -vi info) && mv -f target/${FILENAME}.jar /tmp && mv -f target/${FILENAME}-sources.jar /tmp
- mv -f target/site /tmp
# binary deployment to binary
- export FILENAME=$(mvn -B help:evaluate -Dexpression=project.build.finalName | grep -vi info) && rm -Rf * && mv -f /tmp/${FILENAME}.jar . && mv -f /tmp/${FILENAME}-sources.jar .
- git push origin :jar-${CIRCLE_BRANCH} || true
- git brach -D jar-${CIRCLE_BRANCH} || true
- git checkout --orphan jar-${CIRCLE_BRANCH}
- echo -e "# "${CIRCLE_PROJECT_REPONAME} > readme.md
- echo -e 'general:\n branches:\n ignore:\n - /.*/\n' > circle.yml
- echo -e '*.*\n!.gitignore\n!circle.yml\n!*.jar\n' > .gitignore
- git add --all .
- git commit -m "current binary"
- git push origin jar-${CIRCLE_BRANCH}
# documentation deployment to gh-pages
- rm -Rf *
- git push origin :gh-pages || true
- git branch -D gh-pages || true
- git checkout --orphan gh-pages
- mv -f /tmp/site/* .
- echo -e 'general:\n branches:\n ignore:\n - /.*/\n' > circle.yml
- echo -e '*.*\n!.gitignore\n!circle.yml\n!*.htm*\n!*.css\n!*.js\n!*.png\n!*.gif\n!*.svg\n!*.json\n' > .gitignore
- git add --all .
- git commit -m "current documentation"
- git push origin gh-pages