Travis: fix/activate miniMAL. Simplify .travis*
authorJoel Martin <github@martintribe.org>
Sat, 10 Oct 2015 03:45:48 +0000 (22:45 -0500)
committerJoel Martin <github@martintribe.org>
Sat, 10 Oct 2015 03:45:48 +0000 (22:45 -0500)
.travis.yml
.travis_build.sh
.travis_test.sh
miniMAL/miniMAL-core.json
miniMAL/package.json

index a712022..916f1dc 100644 (file)
@@ -11,86 +11,47 @@ services:
 matrix:
   include:
     - env: IMPL=awk
-      os: linux
     - env: IMPL=bash
-      os: linux
     - env: IMPL=c
-      os: linux
     - env: IMPL=cpp
-      os: linux
     - env: IMPL=coffee
-      os: linux
     - env: IMPL=cs
-      os: linux
     - env: IMPL=clojure
-      os: linux
     - env: IMPL=crystal
-      os: linux
     - env: IMPL=elixir
-      os: linux
     - env: IMPL=erlang
-      os: linux
     - env: IMPL=es6
-      os: linux
     - env: IMPL=factor
-      os: linux
     - env: IMPL=forth
-      os: linux
     - env: IMPL=fsharp
-      os: linux
     - env: IMPL=go
-      os: linux
     - env: IMPL=groovy
-      os: linux
     - env: IMPL=guile
-      os: linux
     - env: IMPL=haskell
-      os: linux
     - env: IMPL=java
-      os: linux
     - env: IMPL=js
-      os: linux
     - env: IMPL=julia
-      os: linux
     - env: IMPL=lua
-      os: linux
     - env: IMPL=make
-      os: linux
     - env: IMPL=mal BUILD_IMPL=js
-      os: linux
     #- env: IMPL=matlab  # licensed (until port to Octave)
-    #  os: linux
-    #- env: IMPL=miniMAL  # repl/string slice bug
-    #  os: linux
+    - env: IMPL=miniMAL
     - env: IMPL=nim
-      os: linux
     - env: IMPL=ocaml
-      os: linux
     - env: IMPL=perl
-      os: linux
     - env: IMPL=php
-      os: linux
     - env: IMPL=ps
-      os: linux
     - env: IMPL=python
-      os: linux
     - env: IMPL=r
-      os: linux
     - env: IMPL=racket
-      os: linux
     - env: IMPL=rpython
-      os: linux
     - env: IMPL=ruby
-      os: linux
     - env: IMPL=rust
-      os: linux
     - env: IMPL=scala
-      os: linux
-    - env: IMPL=swift
+    - env: IMPL=swift NO_DOCKER=1
       os: osx
       osx_image: xcode7
     - env: IMPL=vb
-      os: linux
 
 script:
   - ./.travis_build.sh
index 3364be3..c448366 100755 (executable)
@@ -2,8 +2,9 @@
 
 set -ex
 
-case ${TRAVIS_OS_NAME} in
-linux)
+# If NO_DOCKER is blank then launch use a docker image, otherwise
+# use the Travis image/tools directly.
+if [ -z "${NO_DOCKER}" ]; then
     BUILD_IMPL=${BUILD_IMPL:-${IMPL}}
     impl=$(echo "${IMPL}" | tr '[:upper:]' '[:lower:]')
     build_impl=$(echo "${BUILD_IMPL}" | tr '[:upper:]' '[:lower:]')
@@ -13,8 +14,6 @@ linux)
         docker pull kanaka/mal-test-${build_impl}
     fi
     docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${build_impl} make -C ${BUILD_IMPL}
-    ;;
-osx)
+else
     make -C ${IMPL}
-    ;;
-esac
+fi
index 8566677..716eeed 100755 (executable)
@@ -2,15 +2,14 @@
 
 set -ex
 
-case ${TRAVIS_OS_NAME} in
-linux)
+# If NO_DOCKER is blank then launch use a docker image, otherwise
+# use the Travis image/tools directly.
+if [ -z "${NO_DOCKER}" ]; then
     impl=$(echo "${IMPL}" | tr '[:upper:]' '[:lower:]')
 
     docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${impl} make TEST_OPTS="--soft --log-file ../test.out" test^${IMPL}
     #docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${IMPL,,} make perf^${IMPL}
-    ;;
-osx)
+else
     make TEST_OPTS="--soft --log-file ../test.out" test^${IMPL}
     #make TEST_OPTS="--soft --log-file ../perf" perf^${IMPL}
-    ;;
-esac
+fi
index 25ee914..6717968 100644 (file)
 
 
 ["def", "repl", ["fn",["prompt", "rep"],
-  ["let", ["r", ["require", ["`", "repl"]],
-           "evl", ["fn", ["l", "c", "f", "cb"],
-                    ["let", ["line", ["slice", "l", 1, ["-", [".-", "l", ["`", "length"]], 2]]],
-                      ["do",
-                        ["println", ["rep", "line"]],
-                        ["cb"]]]],
-           "opts", {"ignoreUndefined": true,
-                    "terminal": false}],
+  ["let", ["readline", ["require", ["`", "readline"]],
+           "opts", ["new", ["fn", [], null]],
+           "_", ["set", "opts", ["`", "input"], [".-", "process", ["`", "stdin"]]],
+           "_", ["set", "opts", ["`", "output"], [".-", "process", ["`", "stdout"]]],
+           "_", ["set", "opts", ["`", "terminal"], false],
+           "rl", [".", "readline", ["`", "createInterface"], "opts"],
+           "evl", ["fn", ["line"],
+                    ["do",
+                      ["println", ["rep", "line"]],
+                      [".", "rl", ["`", "prompt"]]]]],
     ["do",
-      [".-", "opts", ["`", "prompt"], "prompt"],
-      [".-", "opts", ["`", "eval"], "evl"],
-      [".", "r", ["`", "start"], "opts"]]]]],
+      [".", "rl", ["`", "setPrompt"], "prompt"],
+      [".", "rl", ["`", "prompt"]],
+      [".", "rl", ["`", "on"], ["`", "line"], "evl"]]]]],
 
 null
 ]
index 24d7a03..b8ffc84 100644 (file)
@@ -3,6 +3,6 @@
     "version": "0.0.1",
     "description": "Make a Lisp (mal) language implemented in miniMAL",
     "dependencies": {
-        "minimal-lisp": "0.0.3"
+        "minimal-lisp": "0.0.6"
     }
 }