@@ -2,32 +2,44 @@ name: build-and-test-differential
2
2
3
3
on :
4
4
pull_request :
5
+ types :
6
+ - opened
7
+ - synchronize
8
+ - reopened
9
+ - labeled
5
10
6
11
jobs :
12
+ make-sure-label-is-present :
13
+ uses : autowarefoundation/autoware-github-actions/.github/workflows/make-sure-label-is-present.yaml@v1
14
+ with :
15
+ label : tag:run-build-and-test-differential
16
+
7
17
build-and-test-differential :
18
+ needs : make-sure-label-is-present
19
+ if : ${{ needs.make-sure-label-is-present.outputs.result == 'true' }}
8
20
runs-on : ubuntu-latest
9
21
container : ${{ matrix.container }}
10
22
strategy :
11
23
fail-fast : false
12
24
matrix :
13
25
rosdistro :
14
- - galactic
15
26
- humble
16
27
include :
17
- - rosdistro : galactic
18
- container : ros:galactic
19
- build-depends-repos : build_depends.repos
20
28
- rosdistro : humble
21
29
container : ros:humble
22
30
build-depends-repos : build_depends.repos
23
31
steps :
24
- - name : Cancel previous runs
25
-
32
+ - name : Set PR fetch depth
33
+ run : echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
26
34
27
- - name : Check out repository
28
- uses : actions/checkout@v3
35
+ - name : Checkout PR branch and all PR commits
36
+ uses : actions/checkout@v4
29
37
with :
30
- fetch-depth : 0
38
+ ref : ${{ github.event.pull_request.head.sha }}
39
+ fetch-depth : ${{ env.PR_FETCH_DEPTH }}
40
+
41
+ - name : Show disk space before the tasks
42
+ run : df -h
31
43
32
44
- name : Remove exec_depend
33
45
uses : autowarefoundation/autoware-github-actions/remove-exec-depend@v1
@@ -55,35 +67,12 @@ jobs:
55
67
56
68
- name : Upload coverage to CodeCov
57
69
if : ${{ steps.test.outputs.coverage-report-files != '' }}
58
- uses : codecov/codecov-action@v3
70
+ uses : codecov/codecov-action@v4
59
71
with :
60
72
files : ${{ steps.test.outputs.coverage-report-files }}
61
73
fail_ci_if_error : false
62
74
verbose : true
63
75
flags : differential
64
76
65
- clang-tidy-differential :
66
- runs-on : ubuntu-latest
67
- container : ros:galactic
68
- needs : build-and-test-differential
69
- steps :
70
- - name : Check out repository
71
- uses : actions/checkout@v3
72
- with :
73
- fetch-depth : 0
74
-
75
- - name : Remove exec_depend
76
- uses : autowarefoundation/autoware-github-actions/remove-exec-depend@v1
77
-
78
- - name : Get modified packages
79
- id : get-modified-packages
80
- uses : autowarefoundation/autoware-github-actions/get-modified-packages@v1
81
-
82
- - name : Run clang-tidy
83
- if : ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
84
- uses : autowarefoundation/autoware-github-actions/clang-tidy@v1
85
- with :
86
- rosdistro : galactic
87
- target-packages : ${{ steps.get-modified-packages.outputs.modified-packages }}
88
- clang-tidy-config-url : https://raw.githubusercontent.com/autowarefoundation/autoware/main/.clang-tidy
89
- build-depends-repos : build_depends.repos
77
+ - name : Show disk space after the tasks
78
+ run : df -h
0 commit comments