Add Travis CI

This commit is contained in:
Todd Strader 2019-10-16 16:55:27 -04:00
parent 3820e84e20
commit 51b8e54ff6
1 changed files with 43 additions and 0 deletions

43
.travis.yml Normal file
View File

@ -0,0 +1,43 @@
language: cpp
cache: ccache
env:
global:
- VERILATOR_CACHE=$HOME/verilator_cache
- VERILATOR_ROOT=$PWD/verilator
- VERILATOR_NUM_JOBS=$((`nproc` + 1))
- OBJCACHE=ccache
- VERILATOR=$VERILATOR_ROOT/bin/verilator
- RV_ROOT=$PWD
cache:
directories:
- $VERILATOR_CACHE
before_install:
- git clone https://github.com/verilator/verilator.git $VERILATOR_ROOT
# This is the first revision with the build_verilator.sh script.
# Once a Verilator release captures this, it would be best to check out
# a release tag instead.
- git -C $VERILATOR_ROOT checkout 46ab907f6afdcacbf848ea090dce66f1334de663
before_script:
- $VERILATOR_ROOT/ci/build_verilator.sh
stages:
- build
- test
jobs:
include:
- stage: build
name: Build Verilator
script: echo "Done building Verilator"
- stage: test
name: Run Tests
script:
- configs/swerv.config -snapshot=mybuild
- make -j 4 -f tools/Makefile verilator snapshot=mybuild
- make -f tools/Makefile verilator-run snapshot=mybuild |& tee sim.log
- grep -q "Hello World from SweRV" sim.log