Skip to content

Add ASAN to CI #5180

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
12 changes: 8 additions & 4 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
sanitizer: [undefined, address]
fail-fast: false
steps:
- name: Checkout Yosys
Expand All @@ -57,7 +58,7 @@ jobs:
mkdir build
cd build
make -f ../Makefile config-$CC
echo 'SANITIZER = undefined' >> Makefile.conf
echo 'SANITIZER = ${{ matrix.sanitizer }}' >> Makefile.conf
make -f ../Makefile -j$procs ENABLE_LTO=1

- name: Log yosys-config output
Expand All @@ -73,7 +74,7 @@ jobs:
- name: Store build artifact
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.os }}
name: build-${{ matrix.os }}-${{ matrix.sanitizer }}
path: build.tar
retention-days: 1

Expand All @@ -84,10 +85,12 @@ jobs:
if: needs.pre_job.outputs.should_skip != 'true'
env:
CC: clang
ASAN_OPTIONS: halt_on_error=1
UBSAN_OPTIONS: halt_on_error=1
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
sanitizer: [undefined, address]
fail-fast: false
steps:
- name: Checkout Yosys
Expand Down Expand Up @@ -136,7 +139,7 @@ jobs:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build-${{ matrix.os }}
name: build-${{ matrix.os }}-${{ matrix.sanitizer }}

- name: Uncompress build
shell: bash
Expand Down Expand Up @@ -168,6 +171,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
sanitizer: [undefined, address]
fail-fast: false
steps:
- name: Checkout Yosys
Expand All @@ -181,7 +185,7 @@ jobs:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build-${{ matrix.os }}
name: build-${{ matrix.os }}-${{ matrix.sanitizer }}

- name: Uncompress build
shell: bash
Expand Down
1 change: 1 addition & 0 deletions tests/verific/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
set -eu
source ../gen-tests-makefile.sh
generate_mk --yosys-scripts --bash
sed -i '1i\export ASAN_OPTIONS=halt_on_error=0' run-test.mk
Loading