Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: CircleCI use ccache and cache external data #34

Merged
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
27 changes: 26 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,30 @@ jobs:
steps:
- checkout:
path : ~/ITK
- restore_cache:
keys:
- external-data
- restore_cache:
keys:
- ccache-{{ arch }}-{{ .Branch }}
- ccache-{{ arch }}-master
- run:
name: Cloning dashboard branch
command: |
git clone --single-branch ${CIRCLE_REPOSITORY_URL} -b dashboard ${DASHBOARD_BRANCH_DIRECTORY}
- run:
name: Dependencies
command: |
sudo apt-get install -y rsync ninja-build
sudo apt-get install -y rsync ninja-build ccache
sudo pip install --upgrade pip
sudo pip install scikit-ci-addons
ci_addons circle/install_cmake.py 3.7.2
- run:
name: CCache initialization
command: |
ccache --show-stats
ccache --zero-stats
ccache --max-size=2.0G
- run: echo 'export DASHBOARD_MODEL=$( [[ "$CIRCLE_BRANCH" = "master" ]] && echo Continuous || echo Experimental )' >> $BASH_ENV
- run:
name: Build and Testing with CTest
Expand All @@ -41,8 +54,14 @@ jobs:
PARALLEL_LEVEL: 4
CTEST_CMAKE_GENERATOR: "Ninja"
command: |
export PATH=/usr/lib/ccache:${PATH}
mkdir -p ${CTEST_BINARY_DIRECTORY}
ctest -V -Ddashboard_no_clean:BOOL=1 -S "${DASHBOARD_BRANCH_DIRECTORY}/circleci.cmake"
- run:
name: ccache stats
when: always
command: |
ccache --show-stats
- run:
name: Formatting CTest for JUnit
when: always
Expand All @@ -53,3 +72,9 @@ jobs:
- store_test_results:
path: /tmp/test-results
destination: ctest
- save_cache:
key: 'ccache-{{ arch }}-{{ .Branch }}-{{ epoch }}'
paths: [ "/home/circleci/.ccache" ]
- save_cache:
key: 'external-data'
paths: [ "/home/circleci/.ExternalData" ]