diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..2fdd27701 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +services: + - docker + +before_install: + - docker build -t verilator . + +script: + - docker run --rm -e PACKAGE_VERSION=${TRAVIS_TAG:-0.0UNTAGGED} -v $PWD:/usr/src/app verilator ./build-deb.sh + +deploy: + provider: releases + api_key: + secure: ltStIEenLA7CgOv5Y48614kqf48d3zyPxsRDeT78dFSb/obmnMarafaYVjCWpn/1/NI3YLcEHkmrenousB/oU9d8GNIAK81pElBzzIEj0ZvFvpV/fS0+Dwk6N8EjWKbECkkeka2jL7B7ycGkkcHgd8VoCGsuMjNVFXetmxC5q1GRaXQ3Yh3xDXDmcQh402w3p/AR2sEo6cjZFUIfjHtVyTILKkMk1LQp5kdcHoAOJrFE5KNnCOJFutT51jJc+tp9IWNuqjNOcekMCgdYZ4i1BMGtBb2nqA1m4oZyECgnBD7HoB2swaRv9ro4HjHBnnuaaaOX03UTcGwY5i1ccQB0JDwjQruFR8LehqSoVHBUu+dvJ40XuhCIkAAQ/O9e27289p4Y2Zrsxd2W5fFIxUFCFMYqVG+LjKEpwYq0V+TTPTPx58pT749h2wAAuJH7YKVbbbIorzkmqcHuDr86PQ+60gfPbH76iUUcem39WDvEnVNywDPhNEOxgxJx6pVAHsJD15YAWChH+TbDQkXm4M5L+fghuoywoyESzO1JkckTjSYkGZd1ouhtNFKY8wKYPVXGBLXs0Agi6tF+gwKZfyi3gqDIXXD0eKqW4K2RvEtJQh1xt5s8zh826CdBxBEygOO0iIIuheDjOep/jl34NOi0WvfzxLbDaibGUhg52LCkgMQ= + file: verilator_${TRAVIS_TAG}_amd64.deb + skip_cleanup: true + on: + repo: sifive/verilator + tags: true diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..4132f1417 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM ubuntu:16.04 +RUN apt-get update && apt-get install -y \ + autoconf \ + bison \ + flex \ + g++ \ + make +WORKDIR /usr/src/app diff --git a/README.pod b/README.pod index b0089df7f..a633daeb7 100644 --- a/README.pod +++ b/README.pod @@ -3,6 +3,14 @@ =pod +=head1 FORK NOTES + +This is a fork of the Verilator project which adds some steps for automatically +creating a .deb package from a release. Travis is configured to automatically +run a build and upload a release to GitHub whenever a tag is created. You can +simply cherry-pick the latest commit on top of a real Verilator release and +create a tag from that. + =head1 NAME This is the Verilator package README file. diff --git a/build-deb.sh b/build-deb.sh new file mode 100755 index 000000000..7c765535b --- /dev/null +++ b/build-deb.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -eux + +pkg_arch=amd64 +pkg_dir=$(realpath ./verilator_${PACKAGE_VERSION}_${pkg_arch}) + +autoconf +./configure +make +make test +make install DESTDIR=$pkg_dir + +mkdir $pkg_dir/DEBIAN +cat << EOF > $pkg_dir/DEBIAN/control +Package: verilator +Version: ${PACKAGE_VERSION} +Architecture: ${pkg_arch} +Maintainer: Richard Xia +Depends: perl (>= 5.22.1) +Description: fast free Verilog simulator +EOF + +dpkg-deb --build $pkg_dir