[TravisCI] some fixes
- use bionic - remove flash test - add Haxe 4.0.3 test - only test C# for Haxe 4+ - add -D php7 for Haxe 3
This commit is contained in:
+7
-13
@@ -4,11 +4,11 @@ os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
sudo: false
|
||||
dist: trusty
|
||||
dist: bionic
|
||||
|
||||
haxe:
|
||||
- "3.4.7"
|
||||
- "4.0.3"
|
||||
- development
|
||||
|
||||
addons:
|
||||
@@ -22,24 +22,16 @@ addons:
|
||||
# C#
|
||||
- mono-devel
|
||||
- mono-mcs
|
||||
# Flash
|
||||
- libglib2.0
|
||||
- libfreetype6
|
||||
|
||||
install:
|
||||
# os-specific config
|
||||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
export DISPLAY=:99.0;
|
||||
export AUDIODEV=null;
|
||||
phpenv global 7.0;
|
||||
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
||||
brew update;
|
||||
brew install mono;
|
||||
brew upgrade python;
|
||||
brew install php;
|
||||
fi
|
||||
# Download and setup a standalone flash player debugger
|
||||
# - haxe flash/install.hxml
|
||||
# Install haxelibs
|
||||
- if [ "${TRAVIS_HAXE_VERSION}" = "development" ]; then
|
||||
haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp.git;
|
||||
@@ -67,8 +59,10 @@ script:
|
||||
- haxe bin/build-neko.hxml && neko bin/Test.n
|
||||
- haxe bin/build-js.hxml && node bin/Test.js
|
||||
- haxe bin/build-java.hxml && java -jar bin/Test.jar
|
||||
# - haxe bin/build-cs.hxml && mono bin/bin/Test.exe
|
||||
# Only test C# for Haxe 4+
|
||||
- if [[ $(haxe -version 2&>1 | head -c 1) > 3 ]]; then
|
||||
haxe bin/build-cs.hxml && mono bin/bin/Test.exe;
|
||||
fi
|
||||
- haxe bin/build-cpp.hxml && ./bin/Test
|
||||
# - haxe bin/build-flash.hxml -D fdb && haxe flash/run.hxml bin/Test.swf
|
||||
- haxe bin/build-php.hxml && php bin/index.php
|
||||
- haxe bin/build-php.hxml -D php7 && php bin/index.php
|
||||
- haxe bin/build-python.hxml && python3 bin/Test.py
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
*.exe
|
||||
*.app
|
||||
flashplayerdebugger
|
||||
LGPL/
|
||||
license.pdf
|
||||
@@ -1,91 +0,0 @@
|
||||
import Sys.*;
|
||||
import sys.FileSystem.*;
|
||||
import sys.io.File.*;
|
||||
import haxe.*;
|
||||
import haxe.io.*;
|
||||
|
||||
class Install {
|
||||
// https://www.adobe.com/support/flashplayer/downloads.html
|
||||
static var fpDownload(default, never) = switch (systemName()) {
|
||||
case "Linux":
|
||||
"http://fpdownload.macromedia.com/pub/flashplayer/updaters/26/flash_player_sa_linux_debug.x86_64.tar.gz";
|
||||
case "Mac":
|
||||
"http://fpdownload.macromedia.com/pub/flashplayer/updaters/26/flashplayer_26_sa_debug.dmg";
|
||||
case "Windows":
|
||||
"http://fpdownload.macromedia.com/pub/flashplayer/updaters/26/flashplayer_26_sa_debug.exe";
|
||||
case _:
|
||||
throw "unsupported system";
|
||||
}
|
||||
// https://helpx.adobe.com/flash-player/kb/configure-debugger-version-flash-player.html
|
||||
static var mmcfg(default, never) = switch (systemName()) {
|
||||
case "Linux":
|
||||
Path.join([getEnv("HOME"), "mm.cfg"]);
|
||||
case "Mac":
|
||||
"/Library/Application Support/Macromedia/mm.cfg";
|
||||
case "Windows":
|
||||
Path.join([getEnv("HOMEDRIVE") + getEnv("HOMEPATH"), "mm.cfg"]);
|
||||
case _:
|
||||
throw "unsupported system";
|
||||
}
|
||||
// http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7c95.html
|
||||
static var fpTrust(default, never) = switch (systemName()) {
|
||||
case "Linux":
|
||||
Path.join([getEnv("HOME"), ".macromedia/Flash_Player/#Security/FlashPlayerTrust"]);
|
||||
case "Mac":
|
||||
"/Library/Application Support/Macromedia/FlashPlayerTrust";
|
||||
case "Windows":
|
||||
Path.join([getEnv("APPDATA"), "Macromedia", "Flash Player", "#Security", "FlashPlayerTrust"]);
|
||||
case _:
|
||||
throw "unsupported system";
|
||||
}
|
||||
static function main() {
|
||||
switch (systemName()) {
|
||||
case "Linux":
|
||||
// Download and unzip flash player
|
||||
if (command("wget", [fpDownload]) != 0)
|
||||
throw "failed to download flash player";
|
||||
if (command("tar", ["-xf", Path.withoutDirectory(fpDownload), "-C", "flash"]) != 0)
|
||||
throw "failed to extract flash player";
|
||||
deleteFile(Path.withoutDirectory(fpDownload));
|
||||
case "Mac":
|
||||
if (command("brew", ["cask", "install", "flash-player-debugger"]) != 0)
|
||||
throw "failed to install flash-player-debugger";
|
||||
case "Windows":
|
||||
// Download flash player
|
||||
download(fpDownload, "flash\\flashplayer.exe");
|
||||
case _:
|
||||
throw "unsupported system";
|
||||
}
|
||||
|
||||
|
||||
// Create a configuration file so the trace log is enabled
|
||||
createDirectory(Path.directory(mmcfg));
|
||||
saveContent(mmcfg, "ErrorReportingEnable=1\nTraceOutputFileEnable=1");
|
||||
|
||||
// Add the current directory as trusted, so exit() can be used
|
||||
createDirectory(fpTrust);
|
||||
saveContent(Path.join([fpTrust, "test.cfg"]), getCwd());
|
||||
}
|
||||
static function download(url:String, saveAs:String):Void {
|
||||
var http = new Http(url);
|
||||
http.onError = function(e) {
|
||||
throw e;
|
||||
};
|
||||
http.customRequest(false, write(saveAs));
|
||||
}
|
||||
static function createDirectory(dir:String):Void {
|
||||
try {
|
||||
sys.FileSystem.createDirectory(dir);
|
||||
} catch(e:Dynamic) {
|
||||
switch (systemName()) {
|
||||
case "Mac", "Linux":
|
||||
if (command("sudo", ["mkdir", "-p", dir]) != 0)
|
||||
throw 'cannot create $dir';
|
||||
if (command("sudo", ["chmod", "a+rw", dir]) != 0)
|
||||
throw 'cannot set permission of $dir';
|
||||
case _:
|
||||
throw 'cannot create $dir: $e';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
import Sys.*;
|
||||
import sys.FileSystem.*;
|
||||
import sys.io.File.*;
|
||||
import haxe.io.*;
|
||||
|
||||
class Run {
|
||||
// https://helpx.adobe.com/flash-player/kb/configure-debugger-version-flash-player.html
|
||||
static var flashlog(default, never) = switch (systemName()) {
|
||||
case "Linux":
|
||||
Path.join([getEnv("HOME"), ".macromedia/Flash_Player/Logs/flashlog.txt"]);
|
||||
case "Mac":
|
||||
Path.join([getEnv("HOME"), "Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt"]);
|
||||
case "Windows":
|
||||
Path.join([getEnv("APPDATA"), "Macromedia", "Flash Player", "Logs", "flashlog.txt"]);
|
||||
case _:
|
||||
throw "unsupported system";
|
||||
}
|
||||
static function main() {
|
||||
var args = args();
|
||||
var swf = args[0];
|
||||
var exitCode = switch (systemName()) {
|
||||
case "Linux":
|
||||
// The flash player has some issues with unexplained crashes,
|
||||
// but if it runs about 16 times, it should succeed one of those...
|
||||
var c = -1;
|
||||
for (i in 0...16) {
|
||||
if ((c = command("xvfb-run", ["-a", "flash/flashplayerdebugger", swf])) == 0)
|
||||
break;
|
||||
println('retry... (${i+1})');
|
||||
sleep(1.5);
|
||||
}
|
||||
c;
|
||||
case "Mac":
|
||||
command("/Applications/Flash Player Debugger.app/Contents/MacOS/Flash Player Debugger", [fullPath(swf)]);
|
||||
case "Windows":
|
||||
command("flash\\flashplayer.exe", [fullPath(swf)]);
|
||||
case _:
|
||||
throw "unsupported platform";
|
||||
}
|
||||
if (exists(flashlog))
|
||||
println(getContent(flashlog));
|
||||
else {
|
||||
println('does not exist: $flashlog');
|
||||
var parts = Path.normalize(flashlog).split("/");
|
||||
println(parts);
|
||||
for (i in 0...parts.length-1) {
|
||||
var path = parts.splice(0, i+1).join("/");
|
||||
println('ls $path');
|
||||
command("ls", [path]);
|
||||
}
|
||||
}
|
||||
exit(exitCode);
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
-cp flash
|
||||
--run Install
|
||||
@@ -1,2 +0,0 @@
|
||||
-cp flash
|
||||
--run Run
|
||||
Reference in New Issue
Block a user