Skip to content

ci: add asan clang linux job #972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
latest-factors: |
msvc Optimized-Debug
gcc UBSan Coverage
clang UBSan
clang UBSan ASan
apple-clang UBSan ASan
factors: ''
runs-on: |
Expand Down Expand Up @@ -76,9 +76,11 @@ jobs:
llvm-root: ../third-party/llvm-project/install
llvm-archive-extension: {{#if (ieq os 'windows') }}7z{{else}}tar.bz2{{/if}}
llvm-archive-filename: {{{ llvm-archive-basename }}}.{{{ llvm-archive-extension }}}
llvm-sanitizer-config: {{#if (or (ne compiler 'clang') (ne compiler 'apple-clang'))}}{{else if ubsan}}Undefined{{else if asan}}Address{{/if}}
mrdocs-ccflags: {{{ ccflags }}} {{#if (and (eq compiler 'gcc') (not asan)) }}-static{{/if}}
mrdocs-cxxflags: {{{ cxxflags }}} {{#if (and (eq compiler 'gcc') (not asan)) }}-static{{/if}}
llvm-sanitizer-config: {{#if (and (ne compiler 'clang') (ne compiler 'apple-clang'))}}{{else if ubsan}}Undefined{{else if asan}}Address{{else if msan}}MemoryWithOrigins{{/if}}
mrdocs-flags: {{#if (and (eq compiler 'gcc') (not asan)) }}-static{{/if}}{{#if (and (eq compiler 'clang') msan) }}-fsanitize-memory-track-origins{{/if}}
mrdocs-ccflags: {{{ ccflags }}} {{{ mrdocs-flags }}}
mrdocs-cxxflags: {{{ cxxflags }}} {{{ mrdocs-flags }}}
mrdocs-linkflags: {{#if asan }}-fsanitize=address{{/if}}
mrdocs-package-generators: {{#if (ieq os 'windows') }}7Z ZIP WIX{{else}}TGZ TXZ{{/if}}
mrdocs-release-package-artifact: release-packages-{{{ lowercase os }}}
output-file: matrix.json
Expand Down Expand Up @@ -260,6 +262,7 @@ jobs:
fi

- name: Install LLVM
id: install_llvm
uses: alandefreitas/cpp-actions/[email protected]
if: steps.llvm-cache.outputs.cache-hit != 'true' && steps.llvm-download.outputs.found != 'true'
with:
Expand All @@ -279,12 +282,19 @@ jobs:
-DLLVM_USE_SANITIZER=${{ matrix.llvm-sanitizer-config }}
cc: ${{ steps.setup-cpp.outputs.cc }}
cxx: ${{ steps.setup-cpp.outputs.cxx }}
ccflags: -gz=zstd
cxxflags: -gz=zstd
generator: Ninja
install: true
install-prefix: ${sourceDir}/../install
run-tests: false
trace-commands: true

- name: Remove LLVM build-dir
if: steps.install_llvm.outcome == 'success'
run: |
rm -r ../third-party/llvm-project/llvm/llvm/build

- name: Install Duktape
uses: alandefreitas/cpp-actions/[email protected]
with:
Expand Down Expand Up @@ -378,6 +388,7 @@ jobs:
install-prefix: .local
extra-args: |
-D MRDOCS_BUILD_DOCS=OFF
-D CMAKE_EXE_LINKER_FLAGS=${{ matrix.mrdocs-linkflags }}
-D LLVM_ROOT=${{ steps.resolve-third-party-dir.outputs.third-party-dir }}/llvm-project/install
-D Clang_ROOT=${{ steps.resolve-third-party-dir.outputs.third-party-dir }}/llvm-project/install
-D duktape_ROOT=${{ steps.resolve-third-party-dir.outputs.third-party-dir }}/duktape/install
Expand Down
Loading