33
33
fail-fast : false
34
34
matrix :
35
35
rosdistro : [humble]
36
- runs_on : [ubuntu-22.04] # macos-14 is added for arm support. See also https://x.com/github/status/1752458943245189120?s=20
36
+ runs_on : [ubuntu-22.04, ubuntu-22.04-arm]
37
37
cmake_build_type : [RelWithDebInfo, Release] # Debug build type is currently unavailable. @TODO Fix problem and add Debug build.
38
38
steps :
39
39
- name : Suppress warnings
@@ -76,26 +76,32 @@ jobs:
76
76
colcon mixin update default
77
77
shell : bash
78
78
79
- - name : Install sonar-scanner and build-wrapper
80
- uses : sonarsource/sonarcloud-github-c-cpp@v3
79
+ - name : Install Build Wrapper
80
+ uses :
SonarSource/sonarqube-scan-action/[email protected]
81
+ id : build_wrapper
81
82
env :
82
83
SONAR_HOST_URL : ${{ secrets.SONAR_HOST_URL }}
83
84
84
85
- name : Build with SonarCloud Build Wrapper
86
+ # Note: `-Wno-error=class-memaccess` is temporary workaround for aarch64 GCC error
87
+ # This should be removed when Eigen is updated in Ubuntu package repository
88
+ # See also: https://gitlab.com/libeigen/eigen/-/issues/2326
85
89
run : |
86
90
source /opt/ros/${{ matrix.rosdistro }}/setup.bash
87
- build-wrapper-linux-x86-64 --out-dir src/scenario_simulator_v2/bw-output \
91
+ ${{ steps.build_wrapper.outputs. build-wrapper-binary }} --out-dir src/scenario_simulator_v2/bw-output \
88
92
colcon build --symlink-install \
89
93
--cmake-args \
90
94
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
91
95
-DBUILD_CPP_MOCK_SCENARIOS=ON \
92
96
-DBUILD_TESTING=true \
93
- -DCMAKE_CXX_FLAGS='-fprofile-arcs -ftest-coverage' \
97
+ -DCMAKE_CXX_FLAGS='-fprofile-arcs -ftest-coverage -Wno-error=class-memaccess ' \
94
98
-DCMAKE_C_FLAGS='-fprofile-arcs -ftest-coverage' \
95
99
--packages-up-to ${{ steps.list_packages.outputs.package_list }}
96
100
shell : bash
97
101
98
102
- name : Colcon test
103
+ # ARM testing is currently broken
104
+ if : matrix.runs_on != 'ubuntu-22.04-arm'
99
105
run : |
100
106
source /opt/ros/${{ matrix.rosdistro }}/setup.bash
101
107
source install/local_setup.bash
@@ -104,6 +110,7 @@ jobs:
104
110
shell : bash
105
111
106
112
- name : generate gcov report for sonarcloud
113
+ if : matrix.runs_on != 'ubuntu-22.04-arm'
107
114
run : gcovr -r src/scenario_simulator_v2 build --sonarqube coverage.xml
108
115
109
116
- name : Show test result
@@ -115,6 +122,7 @@ jobs:
115
122
shell : bash
116
123
117
124
- name : Scenario test
125
+ if : matrix.runs_on != 'ubuntu-22.04-arm'
118
126
run : |
119
127
source install/setup.bash
120
128
source install/local_setup.bash
@@ -123,6 +131,7 @@ jobs:
123
131
124
132
- name : Scenario test (optional)
125
133
id : optional-scenario-test
134
+ if : matrix.runs_on != 'ubuntu-22.04-arm'
126
135
run : |
127
136
source install/setup.bash
128
137
source install/local_setup.bash
@@ -133,7 +142,7 @@ jobs:
133
142
shell : bash
134
143
135
144
- uses : actions/github-script@v7
136
- if : steps.optional-scenario-test.outputs.failure > 0
145
+ if : steps.optional-scenario-test.outputs.failure > 0 && matrix.runs_on != 'ubuntu-22.04-arm'
137
146
with :
138
147
github-token : ${{ secrets.GITHUB_TOKEN }}
139
148
script : |
@@ -151,26 +160,32 @@ jobs:
151
160
152
161
- name : Upload Lcov result
153
162
uses : actions/upload-artifact@v4
163
+ if : matrix.runs_on != 'ubuntu-22.04-arm'
154
164
with :
155
165
name : lcov-${{ matrix.cmake_build_type }}
156
166
path : lcov
157
167
retention-days : 1
158
168
159
169
- name : Upload Gcov result
160
170
uses : actions/upload-artifact@v4
171
+ if : matrix.runs_on != 'ubuntu-22.04-arm'
161
172
with :
162
173
name : coverage${{ matrix.cmake_build_type }}.xml
163
174
path : coverage.xml
164
175
retention-days : 1
165
176
166
- - name : Run SonarCloud scan
177
+ - name : SonarQube Scan
178
+ uses :
SonarSource/[email protected]
179
+ # In ARM build, SonarQube result should be same as x86 build because no test runs
180
+ if : matrix.runs_on != 'ubuntu-22.04-arm'
167
181
env :
168
182
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
169
183
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
170
- SONAR_HOST_URL : https://sonarcloud.io/
171
- working-directory : src/scenario_simulator_v2/
172
- run : sonar-scanner --define sonar.cfamily.compile-commands="bw-output/compile_commands.json"
173
-
184
+ SONAR_HOST_URL : ${{ secrets.SONAR_HOST_URL }}
185
+ with :
186
+ args : >
187
+ --define sonar.cfamily.compile-commands="src/scenario_simulator_v2/bw-output/compile_commands.json"
188
+ projectBaseDir : src/scenario_simulator_v2/
174
189
# - name: Basic test
175
190
# run: |
176
191
# source install/setup.bash
0 commit comments