Skip to content

Commit

Permalink
Merge pull request #1185 from kuzudb/ci-add-asan-ld-preload
Browse files Browse the repository at this point in the history
Add address sanitizer to CI pipeline with `LD_PRELOAD`
  • Loading branch information
mewim committed Jan 17, 2023
2 parents 6a49151 + f54ead2 commit c9653c0
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,47 @@ jobs:
needs: [clang-formatting-check]
runs-on: kuzu-self-hosted-testing
steps:
- uses: actions/checkout@v2
- run: pip install -r tools/python_api/requirements_dev.txt
- uses: actions/checkout@v3
- run: pip install --user -r tools/python_api/requirements_dev.txt

- name: build
run: CC=gcc CXX=g++ make release NUM_THREADS=32

- name: test
run: CC=gcc CXX=g++ make test NUM_THREADS=32

gcc-build-test-with-asan:
name: gcc build & test with asan
needs: [gcc-build-test]
runs-on: kuzu-self-hosted-testing
steps:
- uses: actions/checkout@v3
- run: pip install --user -r tools/python_api/requirements_dev.txt

- name: build debug
run: CC=gcc CXX=g++ make NUM_THREADS=32 alldebug

- name: run test with asan
run: ctest
env:
LD_PRELOAD: '/usr/lib/x86_64-linux-gnu/libasan.so.6'
ASAN_OPTIONS: 'detect_leaks=1:log_path=/tmp/asan.log'
working-directory: ./build/debug/test
continue-on-error: true

- name: cat asan log
run: cat /tmp/asan.log* || true
shell: bash

- name: clean-up asan log
run: rm -rf /tmp/asan.log*

clang-build-test:
name: clang build & test
needs: [clang-formatting-check]
runs-on: kuzu-self-hosted-testing
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: pip3 install --user -r tools/python_api/requirements_dev.txt

- name: build
Expand All @@ -41,8 +67,7 @@ jobs:
name: clang-formatting-check
runs-on: kuzu-self-hosted-testing
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
repository: Sarcasm/run-clang-format
path: run-clang-format
Expand All @@ -54,7 +79,7 @@ jobs:
needs: [gcc-build-test, clang-build-test]
runs-on: kuzu-self-hosted-benchmarking
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: pip3 install --user -r tools/python_api/requirements_dev.txt

- name: build
Expand Down

0 comments on commit c9653c0

Please sign in to comment.