5
5
- cron : 0 0 * * *
6
6
workflow_dispatch :
7
7
8
+ env :
9
+ CC : /usr/lib/ccache/gcc
10
+ CXX : /usr/lib/ccache/g++
11
+
8
12
jobs :
9
13
build-and-test-daily :
10
- runs-on : [self-hosted, linux , X64, gpu ]
14
+ runs-on : [self-hosted, Linux , X64]
11
15
container : ${{ matrix.container }}${{ matrix.container-suffix }}
12
16
strategy :
13
17
fail-fast : false
@@ -30,13 +34,43 @@ jobs:
30
34
- name : Show disk space before the tasks
31
35
run : df -h
32
36
37
+ - name : Show machine specs
38
+ run : lscpu && free -h
39
+
33
40
- name : Remove exec_depend
34
41
uses : autowarefoundation/autoware-github-actions/remove-exec-depend@v1
35
42
36
43
- name : Get self packages
37
44
id : get-self-packages
38
45
uses : autowarefoundation/autoware-github-actions/get-self-packages@v1
39
46
47
+ - name : Create ccache directory
48
+ run : |
49
+ mkdir -p ${CCACHE_DIR}
50
+ du -sh ${CCACHE_DIR} && ccache -s
51
+ shell : bash
52
+
53
+ - name : Attempt to restore ccache
54
+ uses : actions/cache/restore@v4
55
+ with :
56
+ path : |
57
+ /root/.ccache
58
+ key : ccache-main-${{ runner.arch }}-${{ matrix.rosdistro }}-${{ github.sha }}
59
+ restore-keys : |
60
+ ccache-main-${{ runner.arch }}-${{ matrix.rosdistro }}-
61
+
62
+ - name : Limit ccache size
63
+ run : |
64
+ rm -f "${CCACHE_DIR}/ccache.conf"
65
+ echo -e "# Set maximum cache size\nmax_size = 600MB" >> "${CCACHE_DIR}/ccache.conf"
66
+ shell : bash
67
+
68
+ - name : Show ccache stats before build and reset stats
69
+ run : |
70
+ du -sh ${CCACHE_DIR} && ccache -s
71
+ ccache --zero-stats
72
+ shell : bash
73
+
40
74
- name : Export CUDA state as a variable for adding to cache key
41
75
run : |
42
76
build_type_cuda_state=nocuda
56
90
build-depends-repos : ${{ matrix.build-depends-repos }}
57
91
cache-key-element : ${{ env.BUILD_TYPE_CUDA_STATE }}
58
92
93
+ - name : Show ccache stats after build
94
+ run : du -sh ${CCACHE_DIR} && ccache -s
95
+ shell : bash
96
+
59
97
- name : Test
60
98
if : ${{ steps.get-self-packages.outputs.self-packages != '' }}
61
99
id : test
0 commit comments