Skip to content

Commit

Permalink
Use gcc instead of clang for Yosys install
Browse files Browse the repository at this point in the history
Run build workflow on all push/pull
  • Loading branch information
aman-goel committed Feb 24, 2024
1 parent 279c298 commit 63b95c0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# This is a basic workflow to help you get started with Actions

name: build avr
name: Build AVR on Ubuntu

# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
on: [push, pull_request, workflow_dispatch]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down
18 changes: 8 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
#!/bin/bash
set -e

# Prerequisites: git autoconf gperf libgmp3-dev curl cmake
# Prerequisites (yosys): build-essential clang bison flex libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot pkg-config python3 libboost-system-dev libboost-python-dev libboost-filesystem-dev zlib1g-dev

if [[ $(uname) == "Linux" ]]; then
if [ -n "$(uname -a | grep Ubuntu)" ]; then
sudo apt update
sudo apt install -y git autoconf gperf libgmp3-dev curl cmake
sudo apt install -y build-essential clang bison flex libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot pkg-config python3 libboost-system-dev libboost-python-dev libboost-filesystem-dev zlib1g-dev
sudo apt install -y build-essential bison flex libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot pkg-config python3 libboost-system-dev libboost-python-dev libboost-filesystem-dev zlib1g-dev
else
sudo yum install -y git autoconf gperf gmp-devel curl cmake glibc-static
sudo yum install -y clang bison flex readline-devel gawk tcl-devel libffi-devel graphviz python3 boost-devel boost-python-devel zlib-devel
sudo yum install -y bison flex readline-devel gawk tcl-devel libffi-devel graphviz python3 boost-devel boost-python-devel zlib-devel
fi
else
echo "Currently, installing on Linux (Ubuntu/Centos/AL2) is only supported."
Expand All @@ -30,17 +27,18 @@ popd
# Build AVR source
pushd .
cd src
make all
make -j$(nproc) all
cd ..
popd


# Test AVR

python avr.py -n test_vmt examples/vmt/counter.smt2
python avr.py -n test_vmt2 examples/vmt/simple.c.vmt
python avr.py -n test_btor2 examples/btor2/counter.btor2
python avr.py -n test_verilog examples/verilog/counter.v # requires yosys
python avr.py -n test_vmt examples/vmt/counter.smt2
python avr.py -n test_vmt2 examples/vmt/simple.c.vmt
python avr.py -n test_btor2 examples/btor2/counter.btor2
python avr.py -n test_verilog examples/verilog/counter.v # requires yosys
python avr.py -n test_verilog_aig examples/verilog/counter.v --aig # requires yosys


RETURN="$?"
Expand Down
1 change: 1 addition & 0 deletions deps/build_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ pushd .
echo " Installing Yosys (custom version) from https://github.com/aman-goel/yosys ..."
git clone https://github.com/aman-goel/yosys.git
cd yosys
make config-gcc
make -j$(nproc) PREFIX="$PWD"
echo " Done!"
popd
Expand Down

0 comments on commit 63b95c0

Please sign in to comment.