Skip to content

Commit

Permalink
Use only two make jobs on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
sethfowler committed Jan 24, 2017
1 parent d7ba540 commit 91993e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ services:
- docker

install:
- docker build -t p4c .
- docker build --build-arg MAKEFLAGS=-j2 -t p4c .

script:
- docker run -w /p4c/build p4c sh -c 'make check VERBOSE=1 -j8'
- docker run -w /p4c/build p4c sh -c 'make cpplint'
- docker run -w /p4c/build p4c make check VERBOSE=1
- docker run -w /p4c/build p4c make cpplint
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ RUN apt-get update && \
python-scapy \
tcpdump

# Default to using 8 make jobs, which is appropriate for local builds. On CI
# infrastructure it will often be best to override this.
ARG MAKEFLAGS
ENV MAKEFLAGS ${MAKEFLAGS:-j8}

# Clone and build behavioral-model, which is needed by some tests.
ENV BEHAVIORAL_MODEL_REPO https://github.com/sethfowler/behavioral-model.git
ENV BEHAVIORAL_MODEL_TAG 4f85ec95da24
Expand All @@ -29,7 +34,7 @@ RUN git clone --recursive $BEHAVIORAL_MODEL_REPO /behavioral-model && \
./install_deps.sh && \
./autogen.sh && \
./configure && \
make -j8 && \
make && \
make install && \
ldconfig

Expand All @@ -40,4 +45,4 @@ WORKDIR /p4c/
# Build.
RUN ./bootstrap.sh && \
cd build && \
make -j8
make

0 comments on commit 91993e5

Please sign in to comment.