Skip to content

Commit

Permalink
ci: Add travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zarubaf committed Apr 15, 2020
1 parent 34567e3 commit d9ac538
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.*
!.travis.yml
!.git*
*.out
*~
Expand All @@ -10,4 +11,4 @@ formal/counter
formal/fall_through_register
*.check
*.vcd
obj_dir/
obj_dir/
64 changes: 64 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
language: cpp
cache:
apt: true
directories:
$VERILATOR_ROOT
timeout: 1000

env:
global:
- VERILATOR_ROOT="/home/travis/verilator-4.014/"

# required packages to install
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
- g++-7
- gperf
- autoconf
- automake
- autotools-dev
- libmpc-dev
- libmpfr-dev
- libgmp-dev
- gawk
- build-essential
- bison
- flex
- texinfo
- python-pexpect
- libusb-1.0-0-dev
- default-jdk
- zlib1g-dev
- valgrind

before_install:
# setup dependent paths
- export PATH=$VERILATOR_ROOT/bin:$PATH
- export C_INCLUDE_PATH=$VERILATOR_ROOT/include
- export CPLUS_INCLUDE_PATH=$VERILATOR_ROOT/include
- mkdir -p tmp

stages:
- compile
- test

jobs:
include:
- stage: compile
name: compile verilator
script:
- ci/install-verilator.sh
- stage: test
name: test encode
script:
- make
- ./obj_dir/Vecc_encode > /dev/zero
- stage: test
name: test decode
script:
- make
- ./obj_dir/Vecc_decode > /dev/zero
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- stream_join: Join multiple Ready/Valid handshakes to one common handshake.
- SECDED (Single Error Correction, Double Error Detection) encoder and decoder
- SECDED Verilator-based testbench
- Travis build for SECDED module

## 1.17.0 - 2020-04-09
### Added
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.com/pulp-platform/common_cells.svg?branch=master)](https://travis-ci.com/pulp-platform/common_cells)

# Common Cells Repository

Maintainer: Florian Zaruba <[email protected]>
Expand Down
24 changes: 24 additions & 0 deletions ci/install-verilator.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -e
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
cd $ROOT/tmp

if [ -z ${NUM_JOBS} ]; then
NUM_JOBS=1
fi

if [ ! -e "$VERILATOR_ROOT/bin/verilator" ]; then
echo "Installing Verilator"
rm -f verilator*.tgz
wget https://www.veripool.org/ftp/verilator-4.014.tgz
tar xzf verilator*.tgz
rm -f verilator*.tgz
cd verilator-4.014
mkdir -p $VERILATOR_ROOT
# copy scripts
autoconf && ./configure --prefix="$VERILATOR_ROOT" && make -j${NUM_JOBS}
cp -r * $VERILATOR_ROOT/
make test
else
echo "Using Verilator from cached directory."
fi

0 comments on commit d9ac538

Please sign in to comment.