diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7e9965862..cbadb5a89 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,6 +16,7 @@ jobs: CXX: g++-9 CCACHE_DIR: "/root/yosys-uhdm-plugin-integration/yosys-uhdm-plugin-integration/.cache/" DEBIAN_FRONTEND: noninteractive + PLUGIN_ASAN: 1 steps: @@ -235,6 +236,56 @@ jobs: path: | **/plot_*.svg + tests-yosys-valgrind: + runs-on: [self-hosted, Linux, X64] + container: ubuntu:bionic + needs: [build-binaries, generate-matrix-yosys] + strategy: + matrix: + TEST_CASE_YOSYS: ${{ fromJson(needs.generate-matrix-yosys.outputs.matrix) }} + fail-fast: + false + env: + CC: gcc-9 + CXX: g++-9 + GIT_HTTP_LOW_SPEED_LIMIT: 1 + GIT_HTTP_LOW_SPEED_TIME: 600 + DEBIAN_FRONTEND: noninteractive + GHA_MACHINE_TYPE: "n2-standard-2" + PARSER: surelog + + steps: + - name: Install dependencies + run: | + apt-get update -qq + apt install -y software-properties-common + add-apt-repository ppa:ubuntu-toolchain-r/test + apt-get update -qq + apt install -y g++-9 build-essential cmake tclsh ant default-jre swig google-perftools libgoogle-perftools-dev python3 python3-dev uuid uuid-dev tcl-dev flex libfl-dev valgrind + + - uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 1 + + - name: Download binaries + uses: actions/download-artifact@v2 + with: + name: binaries + + # See https://github.com/actions/upload-artifact/issues/38 + - name: Extract + run: tar -xf binaries.tar + + - name: Build & Test (yosys) + run: | + ./UHDM-integration-tests/.github/ci.sh + cat UHDM-integration-tests/build/valgrind.out + env: + TEST_CASE: ${{ matrix.TEST_CASE_YOSYS }} + TARGET: uhdm/yosys/test-ast + USE_VALGRIND: 1 + tests-vcddiff: runs-on: [self-hosted, Linux, X64] container: ubuntu:bionic @@ -314,7 +365,7 @@ jobs: apt install -y software-properties-common add-apt-repository ppa:ubuntu-toolchain-r/test apt-get update -qq - apt install -y gcc-9 g++-9 build-essential cmake tclsh ant default-jre swig google-perftools libgoogle-perftools-dev python3 python3-dev uuid uuid-dev tcl-dev flex libfl-dev git python3-pip + apt install -y gcc-9 g++-9 build-essential cmake tclsh ant default-jre swig google-perftools libgoogle-perftools-dev python3 python3-dev uuid uuid-dev tcl-dev flex libfl-dev git python3-pip valgrind update-alternatives --install /usr/bin/python python /usr/bin/python3 1 update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 @@ -338,9 +389,11 @@ jobs: enable_vivado 2017.2 pip install virtualenv ./UHDM-integration-tests/.github/ci.sh + cat UHDM-integration-tests/build/valgrind.out env: TARGET: uhdm/yosys/synth-ibex-build TEST_CASE: tests/ibex + USE_VALGRIND: 1 - uses: actions/upload-artifact@v2 with: diff --git a/UHDM-integration-tests b/UHDM-integration-tests index 8dc491bb5..6de355289 160000 --- a/UHDM-integration-tests +++ b/UHDM-integration-tests @@ -1 +1 @@ -Subproject commit 8dc491bb51384418a41a7d2f9c30ac8e576f4619 +Subproject commit 6de355289f27291a5bf5db14cb32da1a0048a528 diff --git a/build_binaries.sh b/build_binaries.sh index 5f21849d1..50ed23427 100755 --- a/build_binaries.sh +++ b/build_binaries.sh @@ -41,8 +41,11 @@ make CONFIG=gcc PREFIX=$INSTALL_PATH install -j $(nproc) cd .. fi #UHDM plugin +if [ "$PLUGIN_ASAN" -eq "1" ]; then + PLUGIN_LDFLAGS="-fsanitize=address -fcheck-new -fno-omit-frame-pointer -static-libasan" +fi export PATH=$INSTALL_PATH/bin:${PATH} -UHDM_INSTALL_DIR=$INSTALL_PATH make -C $PWD/yosys-symbiflow-plugins/ install -j$(nproc) +UHDM_INSTALL_DIR=$INSTALL_PATH LDFLAGS=$PLUGIN_LDFLAGS make -C $PWD/yosys-symbiflow-plugins/ install -j$(nproc) #sv2v if [ "$BUILD_SV2V" -eq "1" ]; then wget -qO- https://get.haskellstack.org/ | sh -s - -f -d $INSTALL_PATH/bin