1+ version : 2
2+ general :
3+ artifacts :
4+
5+ do_steps : &do_steps
6+ steps :
7+ - restore_cache :
8+ key : code-tree-shallow
9+ - restore_cache :
10+ key : bake-tree-cache
11+ - run :
12+ name : checkout build tree
13+ command : |
14+ mkdir -p ~/.ssh/
15+ ssh-keyscan -H github.com >> ~/.ssh/known_hosts
16+ if ! [ -d .git ]; then
17+ git clone $CIRCLE_REPOSITORY_URL .;
18+ fi
19+ if [[ $CIRCLE_BRANCH == pull/* ]]; then
20+ git fetch origin $CIRCLE_BRANCH/head;
21+ else
22+ git fetch origin $CIRCLE_BRANCH;
23+ fi
24+ git reset --hard $CIRCLE_SHA1
25+
26+ - run :
27+ name : download bake and codes
28+ command : |
29+ # we clone a fork of bake
30+ cd "$HOME" && git clone --single-branch git://github.com/thehajime/bake.git ./bake
31+ cd "$HOME" && ./bake/bake.py configure -e dce-umip-dev -e dce-linux-dev
32+ cd "$HOME" && ./bake/bake.py download -vvv
33+
34+ - save_cache :
35+ key : code-tree-shallow-{{ epoch }}
36+ paths :
37+ - /home/ns3dce/project/.git
38+
39+ - save_cache :
40+ key : bake-tree-cache-{{ epoch }}
41+ paths :
42+ - /home/ns3dce/source
43+
44+ - run : mkdir -p /home/ns3dce/.ccache
45+ - restore_cache :
46+ key : compiler-cache-{{ .Environment.CIRCLE_JOB }}
47+ - run : ccache -M 5.0G
48+ - run :
49+ name : build dce
50+ command : |
51+ # bake installs the master branch hence DCE will be install $CIRCLE_BRANCH
52+ cd ${HOME}/source/ns-3-dce && git remote add local "$HOME/project" && \
53+ git fetch local -a && git reset --hard $CIRCLE_SHA1
54+ cd "$HOME" && ./bake/bake.py build -j1 -vvv
55+
56+ - save_cache :
57+ paths :
58+ - /home/ns3dce/.ccache
59+ key : compiler-cache-{{ .Environment.CIRCLE_JOB }}-{{ epoch }}
60+ - run : cd ${HOME}/source/ns-3-dce && ./test.py -r
61+ - run :
62+ name : save test results
63+ environment :
64+ TERM : dumb
65+ command : |
66+ mkdir -p ~/junit/
67+ find ~/source -type f -name results.xml -exec cp {} ~/junit/ \;
68+ find ~/source -type f -name xml2junit.xsl -exec cp {} ~/junit/ \;
69+ cp -rpf ~/source/ns-3-dce/testpy-output ~/
70+ saxonb-xslt ~/junit/results.xml ~/junit/xml2junit.xsl > ~/junit/junit-results.xml
71+ when : always
72+ - store_test_results :
73+ path : ~/junit
74+ - store_artifacts :
75+ path : ~/junit
76+ path : ~/testpy-output
77+
78+ # # Customize the test machine
79+ jobs :
80+ ubuntu14.04 :
81+ docker :
82+ - image : ns3dce/ubuntu14.04:0.1
83+ environment :
84+ << : *do_steps
85+
86+ ubuntu16.04 :
87+ docker :
88+ - image : ns3dce/ubuntu16.04:0.1
89+ environment :
90+ << : *do_steps
91+
92+ ubuntu17.04 :
93+ docker :
94+ - image : ns3dce/ubuntu17.04:0.1
95+ environment :
96+ << : *do_steps
97+
98+ fedora26 :
99+ docker :
100+ - image : ns3dce/fedora26:0.1
101+ environment :
102+ << : *do_steps
103+
104+ fedora27 :
105+ docker :
106+ - image : ns3dce/fedora27:0.1
107+ environment :
108+ << : *do_steps
109+
110+ # not yet released (171228)
111+ fedora28 :
112+ docker :
113+ - image : ns3dce/fedora28:0.1
114+ environment :
115+ << : *do_steps
116+
117+
118+ workflows :
119+ version : 2
120+ build :
121+ jobs :
122+ - ubuntu14.04
123+ - ubuntu16.04
124+ - ubuntu17.04
125+ - fedora26
126+ - fedora27
127+ nightly_workflow :
128+ triggers :
129+ - schedule :
130+ cron : " 0 1 * * *" # run at 1am UTC
131+ filters :
132+ branches :
133+ only :
134+ - fix-valgrind-test
135+ jobs :
136+ - ubuntu14.04_valgrind
0 commit comments