@@ -40,98 +40,44 @@ jobs:
40
40
shell : bash
41
41
42
42
build-and-test-differential :
43
+ if : ${{ always() }}
43
44
needs :
44
45
- require-label
45
46
uses : ./.github/workflows/build-and-test-differential.yaml
46
47
with :
47
48
container : ghcr.io/autowarefoundation/autoware:universe-devel
49
+ run-condition : ${{ needs.require-label.outputs.result == 'true' }}
48
50
secrets :
49
51
codecov-token : ${{ secrets.CODECOV_TOKEN }}
50
52
51
53
build-and-test-differential-cuda :
54
+ if : ${{ always() }}
52
55
needs : check-if-cuda-job-is-needed
53
- if : ${{ needs.check-if-cuda-job-is-needed.outputs.cuda_job_is_needed == 'true' }}
54
56
uses : ./.github/workflows/build-and-test-differential.yaml
55
57
with :
56
58
container : ghcr.io/autowarefoundation/autoware:universe-devel
57
59
container-suffix : -cuda
60
+ run-condition : ${{ needs.check-if-cuda-job-is-needed.outputs.cuda_job_is_needed == 'true' }}
58
61
secrets :
59
62
codecov-token : ${{ secrets.CODECOV_TOKEN }}
60
63
61
- build-test-pr :
62
- needs :
63
- - build-and-test-differential
64
- - build-and-test-differential-cuda
65
- if : ${{ always() }}
66
- runs-on : ubuntu-latest
67
- steps :
68
- - uses : actions/checkout@v4
69
-
70
- - name : Initialize Summary
71
- run : echo "### Build Test PR Results" > $GITHUB_STEP_SUMMARY
72
- shell : bash
73
-
74
- - name : Evaluate build-and-test-differential
75
- uses : ./.github/actions/evaluate-job-result
76
- with :
77
- job_result : ${{ needs.build-and-test-differential.result }}
78
- job_name : build-and-test-differential
79
- expected_results : success
80
-
81
- - name : Evaluate build-and-test-differential-cuda
82
- if : ${{ always() }}
83
- uses : ./.github/actions/evaluate-job-result
84
- with :
85
- job_result : ${{ needs.build-and-test-differential-cuda.result }}
86
- job_name : build-and-test-differential-cuda
87
- expected_results : success,skipped
88
-
89
64
clang-tidy-differential :
65
+ if : ${{ always() }} # always run to provide report for status check
90
66
needs :
91
67
- check-if-cuda-job-is-needed
92
68
- build-and-test-differential
93
- if : ${{ needs.check-if-cuda-job-is-needed.outputs.cuda_job_is_needed == 'false' }}
94
69
uses : ./.github/workflows/clang-tidy-differential.yaml
95
70
with :
96
71
container : ghcr.io/autowarefoundation/autoware:universe-devel
72
+ run-condition : ${{ needs.check-if-cuda-job-is-needed.outputs.cuda_job_is_needed == 'false' && needs.build-and-test-differential.result == 'success' }}
97
73
98
74
clang-tidy-differential-cuda :
75
+ if : ${{ always() }} # always run to provide report for status check
99
76
needs :
77
+ - check-if-cuda-job-is-needed
100
78
- build-and-test-differential-cuda
101
79
uses : ./.github/workflows/clang-tidy-differential.yaml
102
80
with :
103
81
container : ghcr.io/autowarefoundation/autoware:universe-devel
104
82
container-suffix : -cuda
105
-
106
- clang-tidy-pr :
107
- needs :
108
- - clang-tidy-differential
109
- - clang-tidy-differential-cuda
110
- if : ${{ always() }}
111
- runs-on : ubuntu-latest
112
- steps :
113
- - name : Initialize Summary
114
- run : echo "### Clang Tidy PR Results" > $GITHUB_STEP_SUMMARY
115
- shell : bash
116
-
117
- - name : Check clang-tidy success
118
- if : ${{ needs.clang-tidy-differential.result == 'success' || needs.clang-tidy-differential-cuda.result == 'success' }}
119
- run : |
120
- echo "✅ Either one of the following has succeeded:" >> $GITHUB_STEP_SUMMARY
121
-
122
- - name : Fail if conditions not met
123
- if : ${{ !(needs.clang-tidy-differential.result == 'success' || needs.clang-tidy-differential-cuda.result == 'success') }}
124
- run : |
125
- echo "::error::❌ Either one of the following should have succeeded:"
126
- echo "::error::clang-tidy-differential: ${{ needs.clang-tidy-differential.result }}"
127
- echo "::error::clang-tidy-differential-cuda: ${{ needs.clang-tidy-differential-cuda.result }}"
128
-
129
- echo "❌ Either one of the following should have succeeded:" >> $GITHUB_STEP_SUMMARY
130
-
131
- exit 1
132
-
133
- - name : Print the results
134
- if : ${{ always() }}
135
- run : |
136
- echo "- **clang-tidy-differential:** ${{ needs.clang-tidy-differential.result }}" >> $GITHUB_STEP_SUMMARY
137
- echo "- **clang-tidy-differential-cuda:** ${{ needs.clang-tidy-differential-cuda.result }}" >> $GITHUB_STEP_SUMMARY
83
+ run-condition : ${{ needs.check-if-cuda-job-is-needed.outputs.cuda_job_is_needed == 'true' && needs.build-and-test-differential-cuda.result == 'success' }}
0 commit comments