Prechádzať zdrojové kódy

[ci] clean up azure from CI scripts

still gotta figure out and maybe re-enable saucelabs?
Dan Korostelev 4 rokov pred
rodič
commit
9f0340dfe0

+ 0 - 1
README.md

@@ -3,7 +3,6 @@
 </p>
 </p>
 
 
 <p align="center">
 <p align="center">
-	<a href="https://dev.azure.com/HaxeFoundation/GitHubPublic/_build/latest?definitionId=1&branchName=development"><img src="https://dev.azure.com/HaxeFoundation/GitHubPublic/_apis/build/status/HaxeFoundation.haxe?branchName=development" alt="Azure Pipelines Build Status"></a>
 	<a href="https://github.com/HaxeFoundation/haxe/actions"><img src="https://github.com/HaxeFoundation/haxe/workflows/CI/badge.svg" alt="GitHub Build Status"></a>
 	<a href="https://github.com/HaxeFoundation/haxe/actions"><img src="https://github.com/HaxeFoundation/haxe/workflows/CI/badge.svg" alt="GitHub Build Status"></a>
 	<a href="https://saucelabs.com/u/haxe"><img src="https://saucelabs.com/buildstatus/haxe" alt="SauceLabs Test Status"></a>
 	<a href="https://saucelabs.com/u/haxe"><img src="https://saucelabs.com/buildstatus/haxe" alt="SauceLabs Test Status"></a>
 	<a href="https://gitter.im/HaxeFoundation/haxe?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge"><img src="https://badges.gitter.im/Join%20Chat.svg" alt="Gitter"></a>
 	<a href="https://gitter.im/HaxeFoundation/haxe?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge"><img src="https://badges.gitter.im/Join%20Chat.svg" alt="Gitter"></a>

+ 0 - 2
tests/RunCi.hx

@@ -48,8 +48,6 @@ class RunCi {
 				var args = switch (ci) {
 				var args = switch (ci) {
 					case null:
 					case null:
 						[];
 						[];
-					case AzurePipelines:
-						["-D","azure"];
 					case GithubActions:
 					case GithubActions:
 						["-D","github"];
 						["-D","github"];
 				}
 				}

+ 1 - 5
tests/runci/Config.hx

@@ -3,7 +3,6 @@ package runci;
 import sys.FileSystem;
 import sys.FileSystem;
 
 
 enum Ci {
 enum Ci {
-	AzurePipelines;
 	GithubActions;
 	GithubActions;
 }
 }
 
 
@@ -22,9 +21,7 @@ class Config {
 	static public final threadsDir = cwd + "threads/";
 	static public final threadsDir = cwd + "threads/";
 
 
 	static public final ci:Null<Ci> =
 	static public final ci:Null<Ci> =
-		if (Sys.getEnv("TF_BUILD") == "True")
-			AzurePipelines;
-		else if (Sys.getEnv("GITHUB_WORKSPACE") != null)
+		if (Sys.getEnv("GITHUB_WORKSPACE") != null)
 			GithubActions;
 			GithubActions;
 		else
 		else
 			null;
 			null;
@@ -34,7 +31,6 @@ class Config {
 	}
 	}
 
 
 	static public final colorSupported = switch [ci, systemName] {
 	static public final colorSupported = switch [ci, systemName] {
-		case [AzurePipelines, _]: true; // not sure
 		case [GithubActions, _]: true;
 		case [GithubActions, _]: true;
 		case [_, "Linux" | "Mac"]: true;
 		case [_, "Linux" | "Mac"]: true;
 		case [_, "Windows"]: false;
 		case [_, "Windows"]: false;

+ 2 - 12
tests/runci/Deployment.hx

@@ -13,18 +13,8 @@ class Deployment {
 	static var gitInfo(get, null):{repo:String, branch:String, commit:String, timestamp:Float, date:String};
 	static var gitInfo(get, null):{repo:String, branch:String, commit:String, timestamp:Float, date:String};
 
 
 	static function get_gitInfo() return if (gitInfo != null) gitInfo else gitInfo = {
 	static function get_gitInfo() return if (gitInfo != null) gitInfo else gitInfo = {
-		repo: switch (ci) {
-			case AzurePipelines:
-				Sys.getEnv("AZURE_PIPELINES_REPO_URL");
-			case _:
-				commandResult("git", ["config", "--get", "remote.origin.url"]).stdout.trim();
-		},
-		branch: switch (ci) {
-			case AzurePipelines:
-				Sys.getEnv("AZURE_PIPELINES_BRANCH");
-			case _:
-				commandResult("git", ["rev-parse", "--abbrev-ref", "HEAD"]).stdout.trim();
-		},
+		repo: commandResult("git", ["config", "--get", "remote.origin.url"]).stdout.trim(),
+		branch: commandResult("git", ["rev-parse", "--abbrev-ref", "HEAD"]).stdout.trim(),
 		commit: commandResult("git", ["rev-parse", "HEAD"]).stdout.trim(),
 		commit: commandResult("git", ["rev-parse", "HEAD"]).stdout.trim(),
 		timestamp: Std.parseFloat(commandResult("git", ["show", "-s", "--format=%ct", "HEAD"]).stdout),
 		timestamp: Std.parseFloat(commandResult("git", ["show", "-s", "--format=%ct", "HEAD"]).stdout),
 		date: {
 		date: {

+ 2 - 2
tests/runci/targets/Flash.hx

@@ -67,7 +67,7 @@ class Flash {
 					File.saveContent(mmcfgPath, "ErrorReportingEnable=1\nTraceOutputFileEnable=1");
 					File.saveContent(mmcfgPath, "ErrorReportingEnable=1\nTraceOutputFileEnable=1");
 				}
 				}
 				switch (ci) {
 				switch (ci) {
-					case AzurePipelines | GithubActions:
+					case GithubActions:
 						runCommand("xvfb-run", ["-a", playerCmd, "-v"]);
 						runCommand("xvfb-run", ["-a", playerCmd, "-v"]);
 					case _:
 					case _:
 						runCommand(playerCmd, ["-v"]);
 						runCommand(playerCmd, ["-v"]);
@@ -108,7 +108,7 @@ class Flash {
 		switch (systemName) {
 		switch (systemName) {
 			case "Linux":
 			case "Linux":
 				switch (ci) {
 				switch (ci) {
-					case AzurePipelines | GithubActions:
+					case GithubActions:
 						new Process("xvfb-run", ["-a", playerCmd, swf]);
 						new Process("xvfb-run", ["-a", playerCmd, swf]);
 					case _:
 					case _:
 						new Process(playerCmd, [swf]);
 						new Process(playerCmd, [swf]);

+ 4 - 4
tests/runci/targets/Hl.hx

@@ -7,19 +7,19 @@ import runci.Config.*;
 
 
 class Hl {
 class Hl {
     static var hlSrc = switch [ci, systemName] {
     static var hlSrc = switch [ci, systemName] {
-      case [AzurePipelines | GithubActions, "Windows"]: "C:\\hashlink";
+      case [GithubActions, "Windows"]: "C:\\hashlink";
       case _: Path.join([Sys.getEnv("HOME"), "hashlink"]);
       case _: Path.join([Sys.getEnv("HOME"), "hashlink"]);
     };
     };
     static var hlBuild = switch [ci, systemName] {
     static var hlBuild = switch [ci, systemName] {
-      case [AzurePipelines | GithubActions, "Windows"]: "C:\\hashlink_build";
+      case [GithubActions, "Windows"]: "C:\\hashlink_build";
       case _: Path.join([Sys.getEnv("HOME"), "hashlink_build"]);
       case _: Path.join([Sys.getEnv("HOME"), "hashlink_build"]);
     };
     };
     static var hlBinDir = switch [ci, systemName] {
     static var hlBinDir = switch [ci, systemName] {
-      case [AzurePipelines | GithubActions, "Windows"]: "C:\\hashlink_build\\bin";
+      case [GithubActions, "Windows"]: "C:\\hashlink_build\\bin";
       case _: Path.join([Sys.getEnv("HOME"), "hashlink_build", "bin"]);
       case _: Path.join([Sys.getEnv("HOME"), "hashlink_build", "bin"]);
     };
     };
     static var hlBinary = switch [ci, systemName] {
     static var hlBinary = switch [ci, systemName] {
-      case [AzurePipelines | GithubActions, "Windows"]: "C:\\hashlink_build\\bin\\hl.exe";
+      case [GithubActions, "Windows"]: "C:\\hashlink_build\\bin\\hl.exe";
       case _: Path.join([Sys.getEnv("HOME"), "hashlink_build", "bin", "hl"]);
       case _: Path.join([Sys.getEnv("HOME"), "hashlink_build", "bin", "hl"]);
     };
     };
 
 

+ 16 - 19
tests/runci/targets/Js.hx

@@ -17,10 +17,6 @@ class Js {
 				} else {
 				} else {
 					Linux.requireAptPackages(["nodejs"]);
 					Linux.requireAptPackages(["nodejs"]);
 				}
 				}
-			case [AzurePipelines, "Mac"]:
-				runCommand("brew", ["install", "node"], true);
-				// runCommand("brew", ["install", "node@10"], true);
-				// runCommand("brew", ["link", "--overwrite", "--force", "node@10"]);
 			case _:
 			case _:
 				//pass
 				//pass
 		}
 		}
@@ -69,21 +65,22 @@ class Js {
 			env.exists("SAUCE_ACCESS_KEY")
 			env.exists("SAUCE_ACCESS_KEY")
 		) {
 		) {
 			var sc = switch (ci) {
 			var sc = switch (ci) {
-				case AzurePipelines:
-					var scVersion = "sc-4.5.3-linux";
-					runCommand("wget", ["-q", 'https://saucelabs.com/downloads/${scVersion}.tar.gz'], true);
-					runCommand("tar", ["-xf", '${scVersion}.tar.gz']);
-
-					//start sauce-connect
-					var scReadyFile = "sauce-connect-ready-" + Std.random(100);
-					var p = new Process('${scVersion}/bin/sc', [
-						"-i", Sys.getEnv("SAUCE_TUNNEL_ID"),
-						"-f", scReadyFile
-					]);
-					while(!FileSystem.exists(scReadyFile)) {
-						Sys.sleep(0.5);
-					}
-					p;
+				// TODO: figure out SauceConnect for GitHub Actions
+				// case AzurePipelines:
+				// 	var scVersion = "sc-4.5.3-linux";
+				// 	runCommand("wget", ["-q", 'https://saucelabs.com/downloads/${scVersion}.tar.gz'], true);
+				// 	runCommand("tar", ["-xf", '${scVersion}.tar.gz']);
+
+				// 	//start sauce-connect
+				// 	var scReadyFile = "sauce-connect-ready-" + Std.random(100);
+				// 	var p = new Process('${scVersion}/bin/sc', [
+				// 		"-i", Sys.getEnv("SAUCE_TUNNEL_ID"),
+				// 		"-f", scReadyFile
+				// 	]);
+				// 	while(!FileSystem.exists(scReadyFile)) {
+				// 		Sys.sleep(0.5);
+				// 	}
+				// 	p;
 				case _:
 				case _:
 					// sauce-connect should have been started
 					// sauce-connect should have been started
 					null;
 					null;

+ 1 - 1
tests/sys/src/TestUnicode.hx

@@ -291,7 +291,7 @@ class TestUnicode extends utest.Test {
 	}
 	}
 
 
 	// Temporary disabled for local run because of https://github.com/HaxeFoundation/haxe/issues/8380
 	// Temporary disabled for local run because of https://github.com/HaxeFoundation/haxe/issues/8380
-	#if (azure || github)
+	#if github
 	function testIPC() {
 	function testIPC() {
 		// stdin.readLine
 		// stdin.readLine
 		UnicodeSequences.normalBoth(str -> {
 		UnicodeSequences.normalBoth(str -> {

+ 3 - 2
tests/unit/src/RunSauceLabs.hx

@@ -136,8 +136,9 @@ class RunSauceLabs {
 		);
 		);
 
 
 		var tags = [];
 		var tags = [];
-		if (Sys.getEnv("TF_BUILD") != null)
-			tags.push("AzurePipelines");
+		// TODO: figure out SauceLabs for Github Actions
+		// if (Sys.getEnv("TF_BUILD") != null)
+		// 	tags.push("AzurePipelines");
 
 
 		var maxDuration = 60 * 5; //5 min
 		var maxDuration = 60 * 5; //5 min
 		var commandTimeout = 60;  //60s
 		var commandTimeout = 60;  //60s

+ 3 - 3
tests/unit/src/unit/TestHttp.hx

@@ -13,7 +13,7 @@ class TestHttp extends Test {
 
 
 	function run(async:Async, test:()->Void) {
 	function run(async:Async, test:()->Void) {
 		// { comment this out to run http tests locally
 		// { comment this out to run http tests locally
-		#if (!(azure || github) || ((azure || github) && js && !nodejs)) //also don't run on sauce labs
+		#if (!github || (github && js && !nodejs)) //also don't run on sauce labs
 		noAssert();
 		noAssert();
 		async.done();
 		async.done();
 		return;
 		return;
@@ -27,7 +27,7 @@ class TestHttp extends Test {
 			return;
 			return;
 		}
 		}
 		test();
 		test();
-		#elseif ((azure || github) && (hl || java || (flash && (Linux || Mac)) || (cs && Windows)))
+		#elseif (github && (hl || java || (flash && (Linux || Mac)) || (cs && Windows)))
 		noAssert();
 		noAssert();
 		async.done();
 		async.done();
 		return;
 		return;
@@ -35,7 +35,7 @@ class TestHttp extends Test {
 		test();
 		test();
 		#end
 		#end
 	}
 	}
-#if !((azure || github) && hl)
+#if !(github && hl)
 	@:timeout(1000)
 	@:timeout(1000)
 	public function testPostData(async:Async) run(async, () -> {
 	public function testPostData(async:Async) run(async, () -> {
 		var srcStr = 'hello, world';
 		var srcStr = 'hello, world';

+ 1 - 1
tests/unit/src/unit/TestMain.hx

@@ -74,7 +74,7 @@ function main() {
 		new TestNull(),
 		new TestNull(),
 		new TestNumericCasts(),
 		new TestNumericCasts(),
 		new TestHashMap(),
 		new TestHashMap(),
-		#if (!no_http && (!(azure || github) || !(php && Windows)))
+		#if (!no_http && (!github || !(php && Windows)))
 		new TestHttp(),
 		new TestHttp(),
 		#end
 		#end
 		#if !no_pattern_matching
 		#if !no_pattern_matching

+ 4 - 4
tests/unit/src/unitstd/Date.unit.hx

@@ -32,14 +32,14 @@ date.getUTCDay() == 3;
 // timezone issues
 // timezone issues
 var date1 = Date.fromTime(1455555555 * 1000.); // 15 Feb 2016 16:59:15 GMT
 var date1 = Date.fromTime(1455555555 * 1000.); // 15 Feb 2016 16:59:15 GMT
 var date2 = new Date(2016, 1, 15, 16, 59, 15);
 var date2 = new Date(2016, 1, 15, 16, 59, 15);
-#if azure
-date1.getTime() == date2.getTime(); // depends on Azure timezone setting!
+#if github
+date1.getTime() == date2.getTime(); // depends on GitHub timezone setting!
 #end
 #end
 
 
 var referenceDate = new Date(1970, 0, 12, 2, 0, 0);
 var referenceDate = new Date(1970, 0, 12, 2, 0, 0);
 referenceDate.toString() == "1970-01-12 02:00:00";
 referenceDate.toString() == "1970-01-12 02:00:00";
-#if azure
-referenceDate.getTime() == 957600000.; // depends on Azure timezone setting!
+#if github
+referenceDate.getTime() == 957600000.; // depends on GitHub timezone setting!
 #end
 #end
 
 
 var date = new Date(1970, 0, 12, 1, 59, 59);
 var date = new Date(1970, 0, 12, 1, 59, 59);