Skip to content

Commit 841acb9

Browse files
jeplerdpgeorge
authored andcommitted
github/workflows: Add sanitize_undefined workflow to unix port CI.
gcc's "undefined behavior" sanitizer can catch a range of misbehaviors at runtime that normally go unnoticed. These include integer and pointer operations that are "undefined" per the relevant C specification. This commit enables undefined behavior detection during a new unix coverage-like build. Signed-off-by: Jeff Epler <[email protected]>
1 parent 268264f commit 841acb9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/ports_unix.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,23 @@ jobs:
262262
- name: Print failures
263263
if: failure()
264264
run: tests/run-tests.py --print-failures
265+
266+
sanitize_undefined:
267+
runs-on: ubuntu-latest
268+
steps:
269+
- uses: actions/checkout@v4
270+
- name: Install packages
271+
run: source tools/ci.sh && ci_unix_coverage_setup
272+
- name: Build
273+
run: source tools/ci.sh && ci_unix_sanitize_undefined_build
274+
- name: Run main test suite
275+
run: source tools/ci.sh && ci_unix_sanitize_undefined_run_tests
276+
- name: Test merging .mpy files
277+
run: source tools/ci.sh && ci_unix_coverage_run_mpy_merge_tests
278+
- name: Build native mpy modules
279+
run: source tools/ci.sh && ci_native_mpy_modules_build
280+
- name: Test importing .mpy generated by mpy_ld.py
281+
run: source tools/ci.sh && ci_unix_coverage_run_native_mpy_tests
282+
- name: Print failures
283+
if: failure()
284+
run: tests/run-tests.py --print-failures

0 commit comments

Comments
 (0)