Skip to content

Commit 0c428c2

Browse files
committed
try caching whole workspaces
1 parent 0af3986 commit 0c428c2

File tree

3 files changed

+31
-14
lines changed

3 files changed

+31
-14
lines changed

.github/workflows/industrial_ci_action.yml

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,52 @@ jobs:
1111
matrix:
1212
env:
1313
- {
14-
ROS_DISTRO: foxy, ROS_REPO: main, CCOV_UPLOAD: true,
14+
ROS_DISTRO: foxy,
15+
ROS_REPO: main,
16+
CCOV_UPLOAD: true,
1517
CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage' -DCMAKE_CXX_FLAGS='--coverage'",
1618
AFTER_RUN_TARGET_TEST: './.ci.prepare_codecov',
17-
ADDITIONAL_DEBS: 'curl lcov grep'
19+
ADDITIONAL_DEBS: 'lcov'
20+
}
21+
- {
22+
ROS_DISTRO: foxy,
23+
ROS_REPO: testing,
24+
CCOV_UPLOAD: false
1825
}
19-
- {ROS_DISTRO: foxy, ROS_REPO: testing, CCOV_UPLOAD: false}
2026
env:
21-
UPSTREAM_WORKSPACE: warehouse_ros_mongo.repos
22-
CCACHE_DIR: /home/runner/.ccache
23-
BASEDIR: .base
27+
UPSTREAM_WORKSPACE: upstream.repos
28+
AFTER_SETUP_UPSTREAM_WORKSPACE: 'vcs pull $BASEDIR/upstream_ws/src'
29+
CCACHE_DIR: "${{ github.workspace }}/.ccache"
30+
BASEDIR: ${{ github.workspace }}/.work
31+
CACHE_PREFIX: "${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}${{ matrix.CCOV_UPLOAD && '-ccov' || '' }}"
2432
runs-on: ubuntu-latest
2533
steps:
2634
- uses: actions/checkout@v2
27-
- uses: actions/cache@v2
35+
- name: cache upstream_ws
36+
uses: pat-s/always-upload-cache@v2.1.3
37+
with:
38+
path: ${{ env.BASEDIR }}/upstream_ws
39+
key: upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('upstream.repos') }}-${{ github.run_id }}
40+
restore-keys: |
41+
upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('upstream.repos') }}
42+
- name: cache ccache
43+
uses: pat-s/always-upload-cache@v2.1.3
2844
with:
2945
path: ${{ env.CCACHE_DIR }}
30-
key: ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}-${{ github.sha }}
46+
key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
3147
restore-keys: |
32-
ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}
33-
- uses: 'ros-industrial/industrial_ci@master'
48+
ccache-${{ env.CACHE_PREFIX }}
49+
- name: industrial_ci
50+
uses: 'ros-industrial/industrial_ci@master'
3451
env: ${{ matrix.env }}
35-
- uses: actions/upload-artifact@v2
52+
- name: upload test artifacts (on failure)
53+
uses: actions/upload-artifact@v2
3654
if: failure()
3755
with:
3856
name: test-results
3957
path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
40-
- uses: codecov/codecov-action@v1
58+
- name: upload codecov report
59+
uses: codecov/codecov-action@v1
4160
if: ${{ matrix.env.CCOV_UPLOAD }}
4261
with:
4362
files: ${{ env.BASEDIR }}/coverage.info

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ Code for persisting ROS message data using MongoDB. Contains C++ and Python lib
66

77
[![Format](https://github.com/ros-planning/warehouse_ros_mongo/actions/workflows/format.yml/badge.svg?branch=ros2)](https://github.com/ros-planning/warehouse_ros_mongo/actions/workflows/format.yml?branch=ros2) [![BuildAndTest](https://github.com/ros-planning/warehouse_ros_mongo/actions/workflows/industrial_ci_action.yml/badge.svg?branch=ros2)](https://github.com/ros-planning/warehouse_ros_mongo/actions/workflows/industrial_ci_action.yml?branch=ros2) [![codecov](https://codecov.io/gh/ros-planning/warehouse_ros_mongo/branch/ros2/graph/badge.svg?token=W7uHKcY0ly)](https://codecov.io/gh/ros-planning/warehouse_ros_mongo)
88

9-
[![Code Coverage Grid](https://codecov.io/gh/ros-planning/warehouse_ros_mongo/branch/ros2/graphs/tree.svg)](https://codecov.io/gh/ros-planning/warehouse_ros_mongo/branch/ros2/graphs/tree.svg)
10-
119
## Building from source
1210

1311
### ROS Jade / Kinetic

0 commit comments

Comments
 (0)