-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a Dockerfile and Travis CI integration for p4c #251
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Travis CI integration for p4c using Docker. | ||
|
||
services: | ||
- docker | ||
|
||
install: | ||
- docker build -t p4c . | ||
|
||
script: | ||
- docker run -w /p4c/build p4c sh -c 'make check VERBOSE=1 -j8' | ||
# We should enable this once 'make cpplint' comes back clean. | ||
# - docker run -w /p4c/build p4c sh -c 'make cpplint' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM ubuntu:14.04 | ||
MAINTAINER Seth Fowler <seth.fowler@barefootnetworks.com> | ||
|
||
# Install dependencies. | ||
RUN apt-get update && \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know how Docker works, but where are the other dependences for testing, such as the behavioral simulator? Testing will run without it (there is a check in configure), but will test much less. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll be adding bmv2 as a dependence to run the tests. But we need to checkout the source and build it since we don't have ubuntu packages. |
||
apt-get install -y \ | ||
automake \ | ||
bison \ | ||
build-essential \ | ||
flex \ | ||
g++ \ | ||
git \ | ||
libboost-dev \ | ||
libgc-dev \ | ||
libgmp-dev \ | ||
libtool \ | ||
python2.7 \ | ||
python-ipaddr \ | ||
python-scapy \ | ||
tcpdump | ||
|
||
# Copy entire repository. | ||
COPY . /p4c/ | ||
WORKDIR /p4c/ | ||
|
||
# Build. | ||
RUN ./bootstrap.sh && \ | ||
cd build && \ | ||
make -j8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cpplint should always come back clean.