浏览代码

wip on hl

Dan Korostelev 7 年之前
父节点
当前提交
92983e0d8a
共有 3 个文件被更改,包括 35 次插入1 次删除
  1. 22 0
      .travis.yml
  2. 1 1
      tests/RunCi.hx
  3. 12 0
      tests/runci/targets/Hl.hx

+ 22 - 0
.travis.yml

@@ -3,6 +3,7 @@ cache:
   directories:
     - $HOME/.opam
     - $HOME/neko
+    - $HOME/hashlink
     - $HOME/apt-cache
     - $HOME/hxcache
     - $HOME/lua_env
@@ -75,6 +76,27 @@ install_linux: &install_linux
       sudo ninja install;
       popd;
     fi
+  # install hashlink
+  - if [ ! -d "$HOME/hashlink" ]; then
+      mkdir $HOME/hashlink;
+      pushd $HOME/hashlink;
+      git clone https://github.com/HaxeFoundation/hashlink.git .;
+      git submodule update --init --recursive;
+    else
+      pushd $HOME/hashlink;
+      if [ ! -d "$HOME/hashlink/.git" ]; then
+        git clone https://github.com/HaxeFoundation/hashlink.git .;
+        git submodule update --init --recursive;
+      else
+        git fetch --all;
+        git reset --hard origin/master;
+        git submodule update --init --recursive;
+      fi;
+    fi;
+    cmake . -G Ninja || (git clean -dfx && cmake . -G Ninja);
+    ninja -j 4;
+    sudo ninja install;
+    popd;
   # Setup JDK
   - jdk_switcher use oraclejdk7
   - java -version

+ 1 - 1
tests/RunCi.hx

@@ -79,7 +79,7 @@ class RunCi {
 					case As3:
 						runci.targets.As3.run(args);
 					case Hl:
-						runCommand("haxe", ["compile-hl.hxml"]);
+						runci.targets.Hl.run(args);
 					case t:
 						throw "unknown target: " + t;
 				}

+ 12 - 0
tests/runci/targets/Hl.hx

@@ -0,0 +1,12 @@
+package runci.targets;
+
+import sys.FileSystem;
+import runci.System.*;
+import runci.Config.*;
+
+class Hl {
+	static public function run(args:Array<String>) {
+		runCommand("haxe", ["compile-hl.hxml", "-D", "dump", "-D", "dump_ignore_var_ids"].concat(args));
+		runCommand("hl", ["bin/unit.hl"]);
+	}
+}