travis: add bash, c, make to test matrix.
authorJoel Martin <github@martintribe.org>
Mon, 5 Oct 2015 23:55:00 +0000 (18:55 -0500)
committerJoel Martin <github@martintribe.org>
Mon, 5 Oct 2015 23:55:00 +0000 (18:55 -0500)
.travis.yml
bash/Dockerfile [new file with mode: 0644]
bash/Makefile
c/Dockerfile [new file with mode: 0644]
js/Dockerfile
make/Dockerfile [new file with mode: 0644]
python/Dockerfile
python/Makefile

index 01578a5..77e4244 100644 (file)
@@ -6,7 +6,10 @@ services:
     - docker
 
 env:
+    - IMPL=bash
+    - IMPL=c
     - IMPL=js
+    - IMPL=make
     - IMPL=python
 
 script:
diff --git a/bash/Dockerfile b/bash/Dockerfile
new file mode 100644 (file)
index 0000000..71720eb
--- /dev/null
@@ -0,0 +1,24 @@
+FROM ubuntu:vivid
+MAINTAINER Joel Martin <github@martintribe.org>
+
+##########################################################
+# General requirements for testing or common across many
+# implementations
+##########################################################
+
+RUN apt-get -y update
+
+# Required for running tests
+RUN apt-get -y install make python
+
+# Some typical implementation and test requirements
+RUN apt-get -y install curl libreadline-dev libedit-dev
+
+RUN mkdir -p /mal
+WORKDIR /mal
+
+##########################################################
+# Specific implementation requirements
+##########################################################
+
+# Nothing additional needed for bash
index dc1d1ad..42e91ac 100644 (file)
@@ -5,7 +5,6 @@ SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
 all: mal.sh
 
 mal.sh: $(SOURCES)
-       cat $+ > $@
        echo "#!/usr/bin/env bash" > $@
        cat $+ | grep -v "^source " >> $@
        chmod +x $@
diff --git a/c/Dockerfile b/c/Dockerfile
new file mode 100644 (file)
index 0000000..3322e5d
--- /dev/null
@@ -0,0 +1,28 @@
+FROM ubuntu:vivid
+MAINTAINER Joel Martin <github@martintribe.org>
+
+##########################################################
+# General requirements for testing or common across many
+# implementations
+##########################################################
+
+RUN apt-get -y update
+
+# Required for running tests
+RUN apt-get -y install make python
+
+# Some typical implementation and test requirements
+RUN apt-get -y install curl libreadline-dev libedit-dev
+
+RUN mkdir -p /mal
+WORKDIR /mal
+
+##########################################################
+# Specific implementation requirements
+##########################################################
+
+# Install g++ so that it's common with C++ Dockerfile
+RUN apt-get -y install g++
+
+# Libraries needed for the C impl
+RUN apt-get -y install libglib2.0 libglib2.0-dev libffi-dev
index c7d9040..0559f7a 100644 (file)
@@ -12,7 +12,7 @@ RUN apt-get -y update
 RUN apt-get -y install make python
 
 # Some typical implementation and test requirements
-RUN apt-get -y install curl libreadline6-dev
+RUN apt-get -y install curl libreadline-dev libedit-dev
 
 RUN mkdir -p /mal
 WORKDIR /mal
@@ -21,6 +21,9 @@ WORKDIR /mal
 # Specific implementation requirements
 ##########################################################
 
+# For building node modules
+RUN apt-get -y install g++
+
 # Add nodesource apt repo config for 0.12 stable
 RUN curl -sL https://deb.nodesource.com/setup_0.12 | bash -
 
@@ -32,5 +35,3 @@ RUN ln -sf nodejs /usr/bin/node
 
 ENV NPM_CONFIG_CACHE /mal/.npm
 
-# For building modules
-RUN apt-get -y install g++
diff --git a/make/Dockerfile b/make/Dockerfile
new file mode 100644 (file)
index 0000000..5f61062
--- /dev/null
@@ -0,0 +1,24 @@
+FROM ubuntu:vivid
+MAINTAINER Joel Martin <github@martintribe.org>
+
+##########################################################
+# General requirements for testing or common across many
+# implementations
+##########################################################
+
+RUN apt-get -y update
+
+# Required for running tests
+RUN apt-get -y install make python
+
+# Some typical implementation and test requirements
+RUN apt-get -y install curl libreadline-dev libedit-dev
+
+RUN mkdir -p /mal
+WORKDIR /mal
+
+##########################################################
+# Specific implementation requirements
+##########################################################
+
+# Nothing additional needed for make
index f296cc3..d101d2e 100644 (file)
@@ -12,7 +12,7 @@ RUN apt-get -y update
 RUN apt-get -y install make python
 
 # Some typical implementation and test requirements
-RUN apt-get -y install curl libreadline6-dev
+RUN apt-get -y install curl libreadline-dev libedit-dev
 
 RUN mkdir -p /mal
 WORKDIR /mal
index f3406b5..0adea10 100644 (file)
@@ -6,19 +6,16 @@ SOURCES_BASE = mal_readline.py mal_types.py reader.py printer.py
 SOURCES_LISP = env.py core.py stepA_mal.py
 SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
 
-all:
+all: mal.py
        true
 
-#all: mal.sh
-#
-#mal.sh: $(SOURCES)
-#      cat $+ > $@
-#      echo "#!/bin/bash" > $@
-#      cat $+ | grep -v "^source " >> $@
-#      chmod +x $@
-#
-#clean:
-#      rm -f mal.sh
+mal.py: stepA_mal.py
+       echo "#!/usr/bin/env python" > $@
+       cat $+ >> $@
+       chmod +x $@
+
+clean:
+       rm -f mal.py
 
 .PHONY: stats tests $(TESTS)