浏览代码

deploy both Windows 32/64 binaries to build.haxe.org

32-bit -> windows, windows-installer
64-bit -> windows64, windows64-installer
Andy Li 8 年之前
父节点
当前提交
7ff9de3b0a
共有 2 个文件被更改,包括 39 次插入28 次删除
  1. 2 4
      appveyor.yml
  2. 37 24
      tests/RunCi.hx

+ 2 - 4
appveyor.yml

@@ -17,12 +17,10 @@ environment:
           TEST: "neko,python,cs,java,macro"
           DEPLOY_NIGHTLIES: 1
         - ARCH: 64
-          TEST: "php7,php"
-          DEPLOY: 1
-        - ARCH: 64
-          TEST: "cpp"
+          TEST: "php7,php,cpp"
         - ARCH: 32
           TEST: "macro"
+          DEPLOY_NIGHTLIES: 1
 
 services:
     - mysql

+ 37 - 24
tests/RunCi.hx

@@ -784,36 +784,49 @@ class RunCi {
 			Sys.getEnv("HXBUILDS_AWS_SECRET_ACCESS_KEY") != null &&
 			Sys.getEnv("TRAVIS_PULL_REQUEST") != "true"
 		) {
-			if (ci == TravisCI) {
-				if (systemName == 'Linux') {
-					// source
-					for (file in sys.FileSystem.readDirectory('out')) {
-						if (file.startsWith('haxe') && file.endsWith('_src.tar.gz')) {
-							submitToS3("source", 'out/$file');
-							break;
+			switch (ci) {
+				case null:
+					trace('Not deploying nightlies (not in CI)');
+				case TravisCI:
+					if (systemName == 'Linux') {
+						// source
+						for (file in sys.FileSystem.readDirectory('out')) {
+							if (file.startsWith('haxe') && file.endsWith('_src.tar.gz')) {
+								submitToS3("source", 'out/$file');
+								break;
+							}
 						}
 					}
-				}
-				for (file in sys.FileSystem.readDirectory('out')) {
-					if (file.startsWith('haxe')) {
-						if (file.endsWith('_bin.tar.gz')) {
-							var name = systemName == "Linux" ? 'linux64' : 'mac';
-							submitToS3(name, 'out/$file');
-						} else if (file.endsWith('_installer.tar.gz')) {
-							submitToS3('mac-installer', 'out/$file');
+					for (file in sys.FileSystem.readDirectory('out')) {
+						if (file.startsWith('haxe')) {
+							if (file.endsWith('_bin.tar.gz')) {
+								var name = systemName == "Linux" ? 'linux64' : 'mac';
+								submitToS3(name, 'out/$file');
+							} else if (file.endsWith('_installer.tar.gz')) {
+								submitToS3('mac-installer', 'out/$file');
+							}
 						}
 					}
-				}
-			} else {
-				for (file in sys.FileSystem.readDirectory('out')) {
-					if (file.startsWith('haxe')) {
-						if (file.endsWith('_bin.zip')) {
-							submitToS3('windows', 'out/$file');
-						} else if (file.endsWith('_installer.zip')) {
-							submitToS3('windows-installer', 'out/$file');
+				case AppVeyor:
+					var kind = switch (Sys.getEnv("ARCH")) {
+						case null:
+							throw "ARCH is not set";
+						case "32":
+							"windows";
+						case "64":
+							"windows64";
+						case _:
+							throw "unknown ARCH";
+					}
+					for (file in sys.FileSystem.readDirectory('out')) {
+						if (file.startsWith('haxe')) {
+							if (file.endsWith('_bin.zip')) {
+								submitToS3(kind, 'out/$file');
+							} else if (file.endsWith('_installer.zip')) {
+								submitToS3('${kind}-installer', 'out/$file');
+							}
 						}
 					}
-				}
 			}
 		} else {
 			trace('Not deploying nightlies');