forked from TannerSorensen/SimpleElastix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
45 lines (42 loc) · 2.38 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
general:
branches:
ignore:
- gh-pages
- dashboard
machine:
environment:
CTEST_DASHBOARD_ROOT: ${HOME}
CTEST_SOURCE_DIRECTORY: ${HOME}/${CIRCLE_PROJECT_REPONAME}
CTEST_BINARY_DIRECTORY: ${HOME}/${CIRCLE_PROJECT_REPONAME}-build
DASHBOARD_BRANCH_DIRECTORY: ${HOME}/dashboard
ExternalData_OBJECT_STORES: ${HOME}/.ExternalData
DISTCC_TCP_CORK: "0"
DISTCC_DIR: ${HOME}/.distcc
post:
- sudo apt-get remove cmake && sudo apt-get install libpython-dev distcc lua5.1
- sudo sed -i.bak s/STARTDISTCC=\"false\"/STARTDISTCC=\"true\"/g /etc/default/distcc && sudo /etc/init.d/distcc start
- mkdir -p "${DISTCC_DIR}" && printf -- "--randomize localhost/2 --localslots=1\n" > "${DISTCC_DIR}/hosts" && for ((i=1;i<CIRCLE_NODE_TOTAL;i++)); do printf "ubuntu@node$i/2\n" >> "${DISTCC_DIR}/hosts"; done
- if [ $CIRCLE_NODE_INDEX -eq 0 ]; then mkdir -p .ssh/tmp && printf -- "Host *\nControlMaster auto\nControlPath ~/.ssh/tmp/master-%%r@%%h:%%p\n" >> .ssh/config; for ((i=1;i<CIRCLE_NODE_TOTAL;i++)); do ssh -fMN ubuntu@node$i; done; fi
- sudo sed -i "s/false/true/g" /etc/default/sysstat && sudo sed -i "s/[0-9]*-[0-9]*\/[0-9]*/\*\/2/g" /etc/cron.d/sysstat && sudo service sysstat restart
- mkdir -p "${ExternalData_OBJECT_STORES}"
dependencies:
cache_directories:
- "~/.ExternalData"
pre:
- pip install --upgrade pip
- pip install numpy cmake
- if [ $CIRCLE_NODE_INDEX -eq 0 ]; then for ((i=1;i<CIRCLE_NODE_TOTAL;i++)); do ssh -fMN ubuntu@node$i; done ; fi
- git clone --single-branch https://github.com/SimpleITK/SimpleITK.git -b dashboard ${DASHBOARD_BRANCH_DIRECTORY}
test:
override:
- ctest -V -S "${DASHBOARD_BRANCH_DIRECTORY}/circleci.cmake":
timeout: 1200
environment:
DASHBOARD_MODEL: $( [[ "$CIRCLE_BRANCH" = "master" || "$CIRCLE_BRANCH" = "next" || "$CIRCLE_BRANCH" = "release" ]] && echo Continuous || echo Experimental )
CTEST_CONFIGURATION_TYPE: "Release"
CTEST_BUILD_FLAGS: "-j$(expr $CIRCLE_NODE_TOTAL \\* 2 + 1)"
ITK_GLOBAL_DEFAULT_NUMBER_OF_THREAD: 2
CTEST_OUTPUT_ON_FAILURE: 1
LD_LIBRARY_PATH: ${CTEST_BINARY_DIRECTORY}/ITK-prefix/lib/:${CTEST_BINARY_DIRECTORY}/SimpleITK-build/lib
- sar:
parallel: true