Skip to content

Commit

Permalink
Travis: add remaining implementations.
Browse files Browse the repository at this point in the history
- new impls: awk, crystal, elixir, erlang, es6, fsharp, groovy, guile
  (disabled), rpython (disabled)
  • Loading branch information
kanaka committed Oct 8, 2015
1 parent 5abaa3d commit fc4c788
Show file tree
Hide file tree
Showing 15 changed files with 319 additions and 18 deletions.
23 changes: 17 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,23 @@ services:
- docker

env:
- IMPL=awk
- IMPL=bash
- IMPL=c
- IMPL=cpp
#- IMPL=coffee # step5 hangs
- IMPL=coffee # step5 hangs
- IMPL=cs
- IMPL=clojure
#- IMPL=factor # stepA optional failures
- IMPL=crystal
- IMPL=elixir
- IMPL=erlang
- IMPL=es6
- IMPL=factor # stepA optional failures
- IMPL=forth
- IMPL=fsharp
- IMPL=go
- IMPL=groovy
#- IMPL=guile # docker build issues
- IMPL=haskell
- IMPL=java
- IMPL=js
Expand All @@ -23,22 +31,25 @@ env:
- IMPL=make
- IMPL=mal
#- IMPL=matlab # licensed (until port to Octave)
#- IMPL=miniMAL # repl/string slice bug
- IMPL=miniMAL # repl/string slice bug
- IMPL=nim
- IMPL=ocaml
- IMPL=perl
- IMPL=php
- IMPL=ps
- IMPL=python
- IMPL=r
#- IMPL=racket # stepA optional failures
- IMPL=racket # stepA optional failures
#- IMPL=rpython # very long build
- IMPL=ruby
#- IMPL=rust # compilation issues
- IMPL=rust # compilation issues
- IMPL=scala
#- IMPL=swift # OS X, need travis-ci multi-language support
- IMPL=vb

script:
- docker pull kanaka/mal-test-${IMPL,,}
- docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${IMPL,,} make -C $IMPL
- docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${IMPL,,} make test^${IMPL}
- docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${IMPL,,} make TEST_OPTS="--log-file run.out" test^${IMPL}
- cat run.out
#- docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${IMPL,,} make perf^${IMPL}
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ EXCLUDE_TESTS += test^erlang^step5 # erlang is TCO, test passes
EXCLUDE_TESTS += test^elixir^step5 # elixir is TCO, test passes
EXCLUDE_TESTS += test^fsharp^step5 # completes at 10,000, fatal stack overflow at 100,000
EXCLUDE_TESTS += test^haskell^step5 # test completes
EXCLUDE_TESTS += test^julia^step5 # hangs test
EXCLUDE_TESTS += test^make^step5 # no TCO capability/step
EXCLUDE_TESTS += test^mal^step5 # no TCO capability/step
EXCLUDE_TESTS += test^miniMAL^step5 # strange error with runtest.py
Expand Down Expand Up @@ -147,6 +148,8 @@ vb_RUNSTEP = mono ../$(2) --raw $(3)
guile_RUNSTEP = guile -L ../guile ../$(2) $(3)

# Extra options to pass to runtest.py
TEST_OPTS =
# Extra implementation specific options to pass to runtest.py
mal_TEST_OPTS = --start-timeout 60 --test-timeout 120


Expand Down Expand Up @@ -190,8 +193,8 @@ $(ALL_TESTS): $$(call $$(word 2,$$(subst ^, ,$$(@)))_STEP_TO_PROG,$$(word 3,$$(s
$(foreach test,$(call STEP_TEST_FILES,$(impl),$(step)),\
echo '----------------------------------------------'; \
echo 'Testing $@, step file: $+, test file: $(test)'; \
echo 'Running: ../runtest.py $(call $(impl)_TEST_OPTS) ../$(test) -- $(call $(impl)_RUNSTEP,$(step),$(+))'; \
../runtest.py $(call $(impl)_TEST_OPTS) ../$(test) -- $(call $(impl)_RUNSTEP,$(step),$(+));)))
echo 'Running: ../runtest.py $(TEST_OPTS) $(call $(impl)_TEST_OPTS) ../$(test) -- $(call $(impl)_RUNSTEP,$(step),$(+))'; \
../runtest.py $(TEST_OPTS) $(call $(impl)_TEST_OPTS) ../$(test) -- $(call $(impl)_RUNSTEP,$(step),$(+));)))

test: $(ALL_TESTS)
tests: $(ALL_TESTS)
Expand Down
25 changes: 25 additions & 0 deletions awk/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM ubuntu:vivid
MAINTAINER Joel Martin <[email protected]>

##########################################################
# 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
##########################################################

# GNU Awk
RUN apt-get -y install gawk
1 change: 1 addition & 0 deletions awk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SOURCES_BASE = types.awk reader.awk printer.awk
SOURCES_LISP = env.awk core.awk stepA_mal.awk
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)

all:

.PHONY: stats tests $(TESTS)

Expand Down
29 changes: 29 additions & 0 deletions crystal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM ubuntu:vivid
MAINTAINER Joel Martin <[email protected]>

##########################################################
# 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++ for any C/C++ based implementations
RUN apt-get -y install g++

# Crystal
RUN curl http://dist.crystal-lang.org/apt/setup.sh | bash
RUN apt-get -y install crystal
29 changes: 29 additions & 0 deletions elixir/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM ubuntu:vivid
MAINTAINER Joel Martin <[email protected]>

##########################################################
# 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
##########################################################

# Elixir
RUN curl -O https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb \
&& dpkg -i erlang-solutions_1.0_all.deb
RUN apt-get -y update
RUN apt-get -y install elixir

35 changes: 35 additions & 0 deletions erlang/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM ubuntu:vivid
MAINTAINER Joel Martin <[email protected]>

##########################################################
# 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
##########################################################

# Erlang R17 (so I can use maps)
RUN apt-get -y install build-essential libncurses5-dev libssl-dev
RUN cd /tmp && curl -O http://www.erlang.org/download/otp_src_17.5.tar.gz \
&& tar -C /tmp -zxf /tmp/otp_src_17.5.tar.gz \
&& cd /tmp/otp_src_17.5 && ./configure && make && make install \
&& rm -rf /tmp/otp_src_17.5 /tmp/otp_src_17.5.tar.gz
# Rebar for building the Erlang implementation
RUN apt-get -y install git sudo
RUN cd /tmp/ && git clone -q https://github.com/rebar/rebar.git \
&& cd /tmp/rebar && ./bootstrap && cp rebar /usr/local/bin \
&& rm -rf /tmp/rebar

10 changes: 4 additions & 6 deletions erlang/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#####################

SOURCES_BASE = src/step0_repl.erl src/step1_read_print.erl src/step2_eval.erl src/step3_env.erl \
src/step4_if_fn_do.erl src/step5_tco.erl src/step6_file.erl src/step7_quote.erl \
src/step8_macros.erl src/step9_try.erl src/stepA_mal.erl
SOURCES_LISP = src/atom.erl src/core.erl src/env.erl src/printer.erl src/reader.erl src/types.erl
SOURCES = $(SOURCES_BASE) $(word $(words $(SOURCES_LISP)),${SOURCES_LISP})
SOURCES_BASE = src/atom.erl src/printer.erl src/reader.erl
SOURCES_LISP = src/core.erl src/env.erl src/types.erl src/stepA_mal.erl
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)

#####################

Expand All @@ -23,7 +21,7 @@ mal: $(word $(words $(BINS)),$(BINS))

define dep_template
.PHONY: $(1)
$(1): $(SOURCES_BASE) src/$(1).erl
$(1): src/$(1).erl
MAL_STEP=$(1) rebar compile escriptize
endef

Expand Down
39 changes: 39 additions & 0 deletions es6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM ubuntu:vivid
MAINTAINER Joel Martin <[email protected]>

##########################################################
# 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
##########################################################

# 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 -

# Install nodejs
RUN apt-get -y install nodejs

# Link common name
RUN ln -sf nodejs /usr/bin/node

ENV NPM_CONFIG_CACHE /mal/.npm

# ES6
RUN npm install -g babel
27 changes: 27 additions & 0 deletions fsharp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ubuntu:vivid
MAINTAINER Joel Martin <[email protected]>

##########################################################
# 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
##########################################################

# Deps for Mono-based languages (C#, VB.Net)
RUN apt-get -y install mono-runtime mono-mcs mono-vbnc

RUN apt-get -y install fsharp
9 changes: 5 additions & 4 deletions fsharp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ DEBUG =
TESTS =

SOURCES_BASE = types.fs error.fs node.fs printer.fs tokenizer.fs reader.fs \
core.fs env.fs readline.fs
SOURCES_LISP =
readline.fs
SOURCES_LISP = core.fs env.fs stepA_mal.fs
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)

TERMINAL_SOURCES = terminal.cs
Expand All @@ -16,6 +16,7 @@ TERMINAL_SOURCES = terminal.cs
SRCS = step0_repl.fs step1_read_print.fs step2_eval.fs step3_env.fs \
step4_if_fn_do.fs step5_tco.fs step6_file.fs step7_quote.fs \
step8_macros.fs step9_try.fs stepA_mal.fs
DLL_SOURCES = $(filter-out stepA_mal.fs,$(SOURCES))

FSFLAGS = $(if $(strip $(DEBUG)),--debug+,--debug- --optimize+ --tailcalls+)
CSFLAGS = $(if $(strip $(DEBUG)),-debug+,)
Expand All @@ -26,8 +27,8 @@ all: $(patsubst %.fs,%.exe,$(SRCS))
Mono.Terminal.dll: $(TERMINAL_SOURCES)
mcs $(CSFLAGS) -target:library $+ -out:$@

mal.dll: $(SOURCES) Mono.Terminal.dll
fsharpc $(FSFLAGS) -o $@ -r Mono.Terminal.dll -a $(SOURCES)
mal.dll: $(DLL_SOURCES) Mono.Terminal.dll
fsharpc $(FSFLAGS) -o $@ -r Mono.Terminal.dll -a $(DLL_SOURCES)

%.exe: %.fs mal.dll
fsharpc $(FSFLAGS) -o $@ -r mal.dll $<
Expand Down
29 changes: 29 additions & 0 deletions groovy/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM ubuntu:vivid
MAINTAINER Joel Martin <[email protected]>

##########################################################
# 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
##########################################################

# Java and Groovy
RUN apt-get -y install openjdk-7-jdk
#RUN apt-get -y install maven2
#ENV MAVEN_OPTS -Duser.home=/mal
RUN apt-get -y install groovy

33 changes: 33 additions & 0 deletions guile/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ubuntu:vivid
MAINTAINER Joel Martin <[email protected]>

##########################################################
# 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
##########################################################

# Guile
RUN apt-get -y install libunistring-dev libgc-dev autoconf libtool flex gettext texinfo libgmp-dev
RUN apt-get -y install git pkg-config libffi-dev
# TODO: remove /tmp/guile in same command
RUN git clone git://git.sv.gnu.org/guile.git /tmp/guile \
&& cd /tmp/guile && ./autogen.sh && ./configure && make && make install
RUN ldconfig
# TODO: move this up with other deps
RUN apt-get -y install libpcre3 libpcre3-dev

Loading

0 comments on commit fc4c788

Please sign in to comment.