Skip to content

Commit 977a087

Browse files
code review changes
Signed-off-by: Pratik Mankawde <[email protected]>
1 parent e95299d commit 977a087

File tree

7 files changed

+49
-35
lines changed

7 files changed

+49
-35
lines changed

.github/actions/build-deps/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ runs:
3737
BUILD_OPTION: ${{ inputs.force_build == 'true' && '*' || 'missing' }}
3838
BUILD_TYPE: ${{ inputs.build_type }}
3939
LOG_VERBOSITY: ${{ inputs.log_verbosity }}
40-
CMAKE_SANITIZERS: ${{ inputs.sanitizers }}
40+
SANITIZERS: ${{ inputs.sanitizers }}
4141
run: |
4242
echo 'Installing dependencies.'
4343
mkdir -p "${BUILD_DIR}"

.github/scripts/strategy-matrix/generate.py

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,6 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
125125
if build_type == 'Release':
126126
cmake_args = f'{cmake_args} -Dassert=ON'
127127

128-
if os['distro_version'] == 'bookworm':
129-
if sanitizers == 'Address':
130-
cmake_args += ' -fsanitize=address,undefined,float-divide-by-zero,unsigned-integer-overflow'
131-
elif sanitizers == 'Thread':
132-
cmake_args += ' -fsanitize=thread,undefined,float-divide-by-zero,unsigned-integer-overflow'
133-
134128
# We skip all RHEL on arm64 due to a build failure that needs further
135129
# investigation.
136130
if os['distro_name'] == 'rhel' and architecture['platform'] == 'linux/arm64':
@@ -163,17 +157,39 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
163157

164158
# Add the configuration to the list, with the most unique fields first,
165159
# so that they are easier to identify in the GitHub Actions UI, as long
166-
# names get truncated.
167-
configurations.append({
168-
'config_name': config_name,
169-
'cmake_args': cmake_args,
170-
'cmake_target': cmake_target,
171-
'build_only': build_only,
172-
'build_type': build_type,
173-
'os': os,
174-
'architecture': architecture,
175-
'sanitizers': sanitizers
176-
})
160+
# names get truncated. Add Address and Thread (both coupled with UB) sanitizers when the distro is bookworm.
161+
if os['distro_version'] == 'bookworm':
162+
configurations.append({
163+
'config_name': config_name,
164+
'cmake_args': cmake_args,
165+
'cmake_target': cmake_target,
166+
'build_only': build_only,
167+
'build_type': build_type,
168+
'os': os,
169+
'architecture': architecture,
170+
'sanitizers': "Address"
171+
})
172+
configurations.append({
173+
'config_name': config_name,
174+
'cmake_args': cmake_args,
175+
'cmake_target': cmake_target,
176+
'build_only': build_only,
177+
'build_type': build_type,
178+
'os': os,
179+
'architecture': architecture,
180+
'sanitizers': "Thread"
181+
})
182+
else:
183+
configurations.append({
184+
'config_name': config_name,
185+
'cmake_args': cmake_args,
186+
'cmake_target': cmake_target,
187+
'build_only': build_only,
188+
'build_type': build_type,
189+
'os': os,
190+
'architecture': architecture,
191+
'sanitizers': "None"
192+
})
177193

178194
return configurations
179195

.github/scripts/strategy-matrix/linux.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,5 @@
180180
}
181181
],
182182
"build_type": ["Debug", "Release"],
183-
"cmake_args": ["-Dunity=OFF", "-Dunity=ON"],
184-
"sanitizers": ["None", "Address", "Thread"]
183+
"cmake_args": ["-Dunity=OFF", "-Dunity=ON"]
185184
}

.github/scripts/strategy-matrix/macos.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@
1818
"cmake_args": [
1919
"-Dunity=OFF -DCMAKE_POLICY_VERSION_MINIMUM=3.5",
2020
"-Dunity=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5"
21-
],
22-
"sanitizers": ["None", "Address", "Thread"]
21+
]
2322
}

.github/scripts/strategy-matrix/windows.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@
1515
}
1616
],
1717
"build_type": ["Debug", "Release"],
18-
"cmake_args": ["-Dunity=OFF", "-Dunity=ON"],
19-
"sanitizers": ["None", "Address", "Thread"]
18+
"cmake_args": ["-Dunity=OFF", "-Dunity=ON"]
2019
}

conan/profiles/ci

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1 @@
1-
include(./default)
2-
3-
[settings]
4-
{% set sanitizers = os.getenv("CMAKE_SANITIZERS") %}
5-
6-
[conf]
7-
{% if sanitizers == "Address" %}
8-
tools.build:cxxflags+=['-fsanitize=address,undefined,float-divide-by-zero,unsigned-integer-overflow']
9-
{% elif sanitizers == "Thread" %}
10-
tools.build:cxxflags+=['-fsanitize=thread,undefined,float-divide-by-zero,unsigned-integer-overflow']
11-
{% endif %}
1+
include(./incsanitizers)

conan/profiles/incsanitizers

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
include(./default)
2+
3+
[settings]
4+
{% set sanitizers = os.getenv("SANITIZERS") %}
5+
6+
[conf]
7+
{% if sanitizers == "Address" %}
8+
tools.build:cxxflags+=['-fsanitize=address,undefined,float-divide-by-zero,unsigned-integer-overflow']
9+
{% elif sanitizers == "Thread" %}
10+
tools.build:cxxflags+=['-fsanitize=thread,undefined,float-divide-by-zero,unsigned-integer-overflow']
11+
{% endif %}

0 commit comments

Comments
 (0)