3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-20 07:36:39 +00:00

Add matrix build with santizers

This commit is contained in:
Miodrag Milanovic 2021-06-16 09:55:51 +02:00
parent c6681508f1
commit d309bb6237

56
.github/workflows/sanitizers.yml vendored Normal file
View file

@ -0,0 +1,56 @@
name: Build sanitizers
on: [push, pull_request]
jobs:
sanitizers:
strategy:
matrix:
include:
- sanitizer: address
- sanitizer: memory
- sanitizer: undefined
- sanitizer: cfi
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install g++ gperf build-essential bison flex libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot pkg-config python python3 libboost-system-dev libboost-python-dev libboost-filesystem-dev zlib1g-dev
- name: Setup environment
run: |
echo "procs=$(nproc)" >> $GITHUB_ENV
- name: Get iverilog
run: |
git clone git://github.com/steveicarus/iverilog.git
- name: Cache iverilog
id: cache-iverilog
uses: actions/cache@v2
with:
path: iverilog-bin
key: ${{ hashFiles('iverilog/.git/refs/heads/master') }}
- name: Build iverilog
if: steps.cache-iverilog.outputs.cache-hit != 'true'
run: |
mkdir iverilog-bin
cd iverilog
autoconf
CC=gcc CXX=g++ ./configure --prefix=$PWD/../iverilog-bin
make -j${{ env.procs }}
make install
- name: Build yosys
run: |
make config-clang
make -j${{ env.procs }} SANITIZER=${{ matrix.sanitizer }}
- name: Run tests with sanitizers
run: |
PATH=$PWD/iverilog-bin/bin:$PATH make -j${{ env.procs }} test