summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml7
-rwxr-xr-xdist/travis-ci.sh44
2 files changed, 28 insertions, 23 deletions
diff --git a/.travis.yml b/.travis.yml
index 75131c9..c33cdb4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,11 @@
language: c
sudo: required
dist: trusty
+env:
+ - BLD=mcode
+ - BLD=llvm
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y gnat-4.8 zlib1g-dev
- - sudo apt-get install -y llvm-3.5-dev llvm-3.5-tools
-script: ./dist/travis-ci.sh
+ - sudo apt-get install -y llvm-3.5-dev llvm-3.5-tools libedit-dev
+script: ./dist/travis-ci.sh $BLD
diff --git a/dist/travis-ci.sh b/dist/travis-ci.sh
index 5187e47..cc0bbc3 100755
--- a/dist/travis-ci.sh
+++ b/dist/travis-ci.sh
@@ -6,33 +6,35 @@ set -e
CDIR=$PWD
-# Build mcode64
-mkdir build-mcode64
-mkdir install-mcode64
-cd build-mcode64
-../configure --prefix=$CDIR/install-mcode64
-make
-make install
-cd ..
+# Prepare
+mkdir build-$1
+mkdir install-$1
+cd build-$1
-# Test mcode64
-export GHDL=$CDIR/install-mcode64/bin/ghdl
-cd testsuite
-gnatmake get_entities
-./testsuite.sh
-cd ..
+# Configure
+case "$1" in
+ mcode)
+ ../configure --prefix=$CDIR/install-mcode64
+ ;;
+
+ llvm)
+ ../configure --prefix=$CDIR/install-llvm --with-llvm-config=llvm-config-3.5
+ ;;
-# build for llvm
-mkdir build-llvm
-mkdir install-llvm
-cd build-llvm
-../configure --prefix=$CDIR/install-llvm --with-llvm-config=llvm-config-3.5
+ *)
+ echo "unknown build $1"
+ exit 1
+ ;;
+esac
+
+# Build
make
make install
cd ..
-# Test llvm
-export GHDL=$CDIR/install-llvm/bin/ghdl
+# Test
+export GHDL=$CDIR/install-$1/bin/ghdl
cd testsuite
+gnatmake get_entities
./testsuite.sh
cd ..