Skip to content

Commit 8372aa6

Browse files
authored
Clean install and test result bases for stale packages (#2399)
* Install colcon clean extension * Clean install path for packages to rebuild * Clean test result path for packages to retest * Set entrypoint for builder stage to update time stamp used for breaking caches do so at end of builder stage to capture overlay dependencies * Set test-result-base for clean package verb * Reinstate copy test results step * Set default test-result-base for all verbs * Drop copy step for test results * Use parallel executor for testing to print Processing status to stdout and avoid CI timeouts but limit parallel-workers to 1 to be like sequential * Remove entrypoint for builder stage as lockfiles capture installed dependency versions and colcon cache can ensure underlay sourse correspond to ws build thus updates to builder stage layers need not break cache
1 parent 083f321 commit 8372aa6

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

‎.circleci/config.yml‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ _commands:
150150
fi
151151
echo BUILD_PACKAGES: $BUILD_PACKAGES
152152
153+
colcon clean packages --yes \
154+
--packages-select ${BUILD_PACKAGES} \
155+
--base-select install
156+
153157
. << parameters.underlay >>/install/setup.sh
154158
colcon build \
155159
--packages-select ${BUILD_PACKAGES} \
@@ -221,6 +225,10 @@ _commands:
221225
| xargs)
222226
echo TEST_PACKAGES: $TEST_PACKAGES
223227
228+
colcon clean packages --yes \
229+
--packages-select ${TEST_PACKAGES} \
230+
--base-select test_result
231+
224232
. install/setup.sh
225233
set -o xtrace
226234
colcon test \
@@ -242,13 +250,6 @@ _commands:
242250
when: always
243251
- store_artifacts:
244252
path: << parameters.workspace >>/log/test
245-
- run:
246-
name: Copy Test Results
247-
working_directory: << parameters.workspace >>
248-
command: |
249-
mkdir test_results/
250-
cp -rH build/*/test_results/* test_results
251-
when: always
252253
- store_test_results:
253254
path: << parameters.workspace >>/test_results
254255
- store_artifacts:

‎.circleci/defaults.yaml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1+
_common: &common
2+
"test-result-base": "test_results"
3+
4+
"clean.packages":
5+
<<: *common
16
"build":
7+
<<: *common
28
"executor": "parallel"
39
"parallel-workers": 2
410
"symlink-install": true
11+
"test":
12+
<<: *common
13+
"executor": "parallel"
14+
"parallel-workers": 1
15+
"test-result":
16+
<<: *common

‎Dockerfile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ RUN apt-get update && \
5858
&& pip3 install \
5959
fastcov \
6060
git+https://github.com/ruffsl/colcon-cache.git@c1cedadc1ac6131fe825d075526ed4ae8e1b473c \
61+
git+https://github.com/ruffsl/colcon-clean.git@87dee2dd1e47c2b97ac6d8300f76e3f607d19ef6 \
6162
&& rosdep update \
6263
&& rm -rf /var/lib/apt/lists/*
6364

0 commit comments

Comments
 (0)