Przeglądaj źródła

[ci] remove Travis/AppVeyor related CI code (#9525)

README is not updated yet, let's do after the dust settles
Dan Korostelev 5 lat temu
rodzic
commit
fe0b024709

+ 0 - 29
tests/RunCi.hx

@@ -7,17 +7,6 @@ import runci.Deployment.*;
 
 using StringTools;
 
-/**
-	Will be run by CI services, currently TravisCI and AppVeyor.
-
-	TravisCI:
-	Setting file: ".travis.yml".
-	Build result: https://travis-ci.org/HaxeFoundation/haxe
-
-	AppVeyor:
-	Setting file: "appveyor.yml".
-	Build result: https://ci.appveyor.com/project/HaxeFoundation/haxe
-*/
 class RunCi {
 	static function main():Void {
 		Sys.putEnv("OCAMLRUNPARAM", "b");
@@ -39,13 +28,6 @@ class RunCi {
 		}
 
 		for (test in tests) {
-			switch (ci) {
-				case TravisCI:
-					Sys.println('travis_fold:start:test-${test}');
-				case _:
-					//pass
-			}
-
 			switch (systemName) {
 				case "Windows":
 					// change codepage to UTF-8
@@ -66,10 +48,6 @@ class RunCi {
 				var args = switch (ci) {
 					case null:
 						[];
-					case TravisCI:
-						["-D","travis"];
-					case AppVeyor:
-						["-D","appveyor"];
 					case AzurePipelines:
 						["-D","azure"];
 					case GithubActions:
@@ -110,13 +88,6 @@ class RunCi {
 				success = false;
 			}
 
-			switch (ci) {
-				case TravisCI:
-					Sys.println('travis_fold:end:test-${test}');
-				case _:
-					//pass
-			}
-
 			if (success) {
 				successMsg('test ${test} succeeded');
 			} else {

+ 1 - 8
tests/runci/Config.hx

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

+ 1 - 30
tests/runci/Deployment.hx

@@ -14,20 +14,12 @@ class Deployment {
 
 	static function get_gitInfo() return if (gitInfo != null) gitInfo else gitInfo = {
 		repo: switch (ci) {
-			case TravisCI:
-				Sys.getEnv("TRAVIS_REPO_SLUG");
-			case AppVeyor:
-				Sys.getEnv("APPVEYOR_PROJECT_SLUG");
 			case AzurePipelines:
 				Sys.getEnv("AZURE_PIPELINES_REPO_URL");
 			case _:
 				commandResult("git", ["config", "--get", "remote.origin.url"]).stdout.trim();
 		},
 		branch: switch (ci) {
-			case TravisCI:
-				Sys.getEnv("TRAVIS_BRANCH");
-			case AppVeyor:
-				Sys.getEnv("APPVEYOR_REPO_BRANCH");
 			case AzurePipelines:
 				Sys.getEnv("AZURE_PIPELINES_BRANCH");
 			case _:
@@ -87,7 +79,7 @@ class Deployment {
 			Sys.getEnv("DEPLOY_API_DOCS") != null &&
 			(
 				gitInfo.branch == "development" ||
-				switch(Sys.getEnv("TRAVIS_TAG")) {
+				switch(Sys.getEnv("TRAVIS_TAG")) { // TODO: there's no Travis anymore, we might want to change this for GH actions
 					case null, _.trim() => "":
 						false;
 					case tag:
@@ -275,27 +267,6 @@ class Deployment {
 	}
 
 	static public function deploy():Void {
-		switch (ci) {
-			case TravisCI:
-				switch (Sys.getEnv("TRAVIS_PULL_REQUEST")) {
-					case "false", null:
-						// not a PR
-					case _:
-						infoMsg("Not deploying in PR builds.");
-						return;
-				}
-			case AppVeyor:
-				switch (Sys.getEnv("APPVEYOR_PULL_REQUEST_NUMBER")) {
-					case null:
-						// not a PR
-					case _:
-						infoMsg("Not deploying in PR builds.");
-						return;
-				}
-			case _:
-				// pass
-		}
-
 		if (isDeployApiDocsRequired()) {
 			deployApiDoc();
 		} else {

+ 4 - 17
tests/runci/targets/Cs.hx

@@ -23,13 +23,7 @@ class Cs {
 					runCommand("brew", ["install", "mono"], true);
 				runCommand("mono", ["--version"]);
 			case "Windows":
-				switch (ci) {
-					case AppVeyor:
-						addToPATH("C:\\Program Files (x86)\\Mono\\bin");
-						runCommand("mono", ["--version"]);
-					case _:
-						//pass
-				}
+				//pass
 		}
 
 		haxelibInstallGit("HaxeFoundation", "hxcs", true);
@@ -49,26 +43,19 @@ class Cs {
 	static public function run(args:Array<String>) {
 		getCsDependencies();
 
-		var compl = switch [ci, systemName] {
-			case [TravisCI, "Linux"]:
-				"-travis";
-			case _:
-				"";
-		};
-
 		for (fastcast in      [[], ["-D", "fast_cast"]])
 		for (noroot in        [[], ["-D", "no_root"]])
 		for (erasegenerics in [[], ["-D", "erase_generics"]])
 		{
 			var extras = fastcast.concat(erasegenerics).concat(noroot);
-			runCommand("haxe", ['compile-cs$compl.hxml'].concat(extras).concat(args));
+			runCommand("haxe", ['compile-cs.hxml'].concat(extras).concat(args));
 			runCs("bin/cs/bin/TestMain-Debug.exe");
 
-			runCommand("haxe", ['compile-cs-unsafe$compl.hxml'].concat(extras).concat(args));
+			runCommand("haxe", ['compile-cs-unsafe.hxml'].concat(extras).concat(args));
 			runCs("bin/cs_unsafe/bin/TestMain-Debug.exe");
 		}
 
-		runCommand("haxe", ['compile-cs$compl.hxml','-dce','no'].concat(args));
+		runCommand("haxe", ['compile-cs.hxml','-dce','no'].concat(args));
 		runCs("bin/cs/bin/TestMain-Debug.exe");
 
 		changeDirectory(sysDir);

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

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

+ 5 - 12
tests/runci/targets/Php.hx

@@ -28,17 +28,15 @@ class Php {
 			infoMsg('php ${phpVer} has already been installed.');
 			return;
 		}
-		switch [ci, systemName] {
-			case [TravisCI, "Linux"]:
-				runCommand("phpenv", ["global", "7.0"], false, true);
-			case [_, "Linux"]:
+		switch systemName {
+			case "Linux":
 				Linux.requireAptPackages(["php-cli", "php-mbstring"]);
-			case [_, "Mac"]:
+			case "Mac":
 				runCommand("brew", ["install", "php"], true);
-			case [_, "Windows"]:
+			case "Windows":
 				runCommand("cinst", ["php", "-version", "7.1.8", "-y"], true);
 			case _:
-				throw 'unknown combination: $ci, $systemName';
+				throw 'unknown system: $systemName';
 		}
 		runCommand("php", ["-v"]);
 	}
@@ -77,11 +75,6 @@ class Php {
 
 	static function runThroughPhpVersions(fn:(phpCmd:String)->Void) {
 		switch [ci, systemName] {
-			case [TravisCI, "Linux"]:
-				for(version in ['7.0', '7.1'/*, '7.2', '7.3'*/]) { //7.2 and 7.3 are not available on travis Ubuntu trusty
-					runCommand("phpenv", ["global", version]);
-					fn('php');
-				}
 			case [GithubActions, "Linux"]:
 				for(version in ['7.1', '7.2', '7.3', '7.4']) {
 					fn('php$version');

+ 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
-	#if (travis || appveyor || azure || github)
+	#if (azure || github)
 	function testIPC() {
 		// stdin.readLine
 		UnicodeSequences.normalBoth(str -> {

+ 0 - 7
tests/unit/compile-cs-travis.hxml

@@ -1,7 +0,0 @@
-compile-cs.hxml
-
---net-lib cs_drivers/System.Data.dll
---net-lib cs_drivers/System.Xml.dll@std
---net-lib cs_drivers/Mono.Data.Sqlite.dll
-
--D travis

+ 0 - 7
tests/unit/compile-cs-unsafe-travis.hxml

@@ -1,7 +0,0 @@
-compile-cs-unsafe.hxml
-
---net-lib cs_drivers/System.Data.dll
---net-lib cs_drivers/System.Xml.dll@std
---net-lib cs_drivers/Mono.Data.Sqlite.dll
-
--D travis

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

@@ -39,7 +39,7 @@ class RunSauceLabs {
 	}
 
 	static function isEs5(b:Dynamic):Bool {
-		return 
+		return
 			// not IE <= 8
 			!(b.browserName == "internet explorer" && Std.parseInt(b.version) <= 8);
 	}
@@ -136,8 +136,6 @@ class RunSauceLabs {
 		);
 
 		var tags = [];
-		if (Sys.getEnv("TRAVIS") != null)
-			tags.push("TravisCI");
 		if (Sys.getEnv("TF_BUILD") != null)
 			tags.push("AzurePipelines");
 
@@ -149,15 +147,11 @@ class RunSauceLabs {
 			var browserName = caps.hasField("version") ? '${caps.browserName} ${caps.version}' : caps.browserName;
 			console.log('Requesting: ${browserName} on ${caps.platform}');
 
-			caps.setField("name", Sys.getEnv("TRAVIS") != null ? Sys.getEnv("TRAVIS_REPO_SLUG") : "haxe");
+			caps.setField("name", "haxe");
 			caps.setField("tags", tags);
 			caps.setField("maxDuration", maxDuration);
 			caps.setField("commandTimeout", commandTimeout);
 			caps.setField("avoidProxy", true);
-			if (Sys.getEnv("TRAVIS") != null) {
-				caps.setField("tunnel-identifier", Sys.getEnv("TRAVIS_JOB_NUMBER"));
-				caps.setField("build", Sys.getEnv("TRAVIS_BUILD_NUMBER"));
-			}
 			switch (Sys.getEnv("SAUCE_TUNNEL_ID")) {
 				case null:
 					//pass