-
Notifications
You must be signed in to change notification settings - Fork 106
76 lines (71 loc) · 2.86 KB
/
build_and_test.yaml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git).
# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst)
name: Build and Test
on:
workflow_dispatch:
pull_request:
push:
branches:
- ros2
jobs:
industrial_ci:
strategy:
fail-fast: false
matrix:
env:
- IMAGE: humble-source
- IMAGE: rolling-source
CLANG_TIDY: true
env:
DOCKER_IMAGE: moveit/moveit2:${{ matrix.env.IMAGE }}
UPSTREAM_WORKSPACE: moveit_visual_tools.repos
AFTER_SETUP_UPSTREAM_WORKSPACE: vcs pull $BASEDIR/upstream_ws/src
AFTER_SETUP_UPSTREAM_WORKSPACE_EMBED: set +u && source ~/ws_moveit/install/setup.bash && set - u
CCACHE_DIR: ${{ github.workspace }}/.ccache
BASEDIR: ${{ github.workspace }}/.work
CACHE_PREFIX: ${{ matrix.env.IMAGE }}
CLANG_TIDY_BASE_REF: ${{ github.base_ref || github.ref }}
name: ${{ matrix.env.IMAGE }}${{ matrix.env.CLANG_TIDY && ' + clang-tidy' || '' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: cache upstream_ws
uses: actions/cache@v4
with:
save-always: true
path: ${{ env.BASEDIR }}/upstream_ws
key: upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('moveit_visual_tools.repos') }}-${{ github.run_id }}
restore-keys: |
upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('moveit_visual_tools.repos') }}
# The target directory cache doesn't include the source directory because
# that comes from the checkout. See "prepare target_ws for cache" task below
- name: cache target_ws
uses: rhaschke/cache@main
with:
path: ${{ env.BASEDIR }}/target_ws
key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }}
restore-keys: |
target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}
env:
GHA_CACHE_SAVE: always
- name: cache ccache
uses: rhaschke/cache@main
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }}
restore-keys: |
ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
ccache-${{ env.CACHE_PREFIX }}
env:
GHA_CACHE_SAVE: always
- name: industrial_ci
uses: ros-industrial/industrial_ci@master
env: ${{ matrix.env }}
- name: prepare target_ws for cache
run: |
du -sh ${{ env.BASEDIR }}/target_ws
sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete
sudo rm -rf ${{ env.BASEDIR }}/target_ws/src
du -sh ${{ env.BASEDIR }}/target_ws