Skip to content

Commit

Permalink
Add Travis CI setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavin Norman authored and nemanja-boric-sociomantic committed Aug 2, 2017
1 parent b5f4cd4 commit 5e6d6a6
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!docker/
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# We will use docker to set up out environment, so don't use any particular
# language in Travis itself
language: generic

# Enable docker
sudo: required
services:
- docker

# Disable automatic submodule fetching (it's done recursively)
git:
submodules: false

# Do a shallow submodule fetch
before_install: git submodule update --init

env:
global:
# Make sure beaver is in the PATH
- PATH="$(git config -f .gitmodules submodule.beaver.path)/bin:$PATH"
matrix:
- DC=dmd1 DIST=trusty F=production
- DC=dmd1 DIST=trusty F=devel
- DC=dmd1 DIST=xenial F=production AFTER_SCRIPT=1
- DC=dmd1 DIST=xenial F=devel
- DC=dmd-transitional DIST=trusty F=production
- DC=dmd-transitional DIST=trusty F=devel
- DC=dmd-transitional DIST=xenial F=production
- DC=dmd-transitional DIST=xenial F=devel

install: beaver install

script: BEAVER_DOCKER_VARS="DC" beaver run ci/run.sh

3 changes: 3 additions & 0 deletions Dockerfile.trusty
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM sociomantictsunami/dlang:trusty-v2
COPY docker/build /
RUN /build && rm /build
3 changes: 3 additions & 0 deletions Dockerfile.xenial
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM sociomantictsunami/dlang:xenial-v2
COPY docker/build /
RUN /build && rm /build
16 changes: 16 additions & 0 deletions ci/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
set -xe

DVER=1
if test "$DC" != dmd1; then
DVER=2
fi

export DC DVER

if test "$DC" != dmd1; then
make -r d2conv
fi

make -r all
make -r test
8 changes: 6 additions & 2 deletions docker/Dockerfile → docker/build
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
FROM sociomantic/dlang
RUN apt-get update && apt-get install -y \
#!/bin/sh
set -xe

# Install dependencies
apt-get update
apt-get install -y \
liblzo2-dev \
libebtree6-dev \
libpcre3-dev \
Expand Down

0 comments on commit 5e6d6a6

Please sign in to comment.