Browse Source

[ci] Update flex sdk link (#10987)

* [ci] Update flex sdk link

* Update playerglobal.swc location

* Clean up

* Restore missing linux flash tests

* Fix typo
tobil4sk 2 years ago
parent
commit
ed1622ad47

+ 7 - 1
.github/workflows/main.yml

@@ -348,7 +348,7 @@ jobs:
     strategy:
     strategy:
       fail-fast: false
       fail-fast: false
       matrix:
       matrix:
-        target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, neko]
+        target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, flash9, neko]
         include:
         include:
           - target: hl
           - target: hl
             APT_PACKAGES: cmake ninja-build libturbojpeg-dev
             APT_PACKAGES: cmake ninja-build libturbojpeg-dev
@@ -356,6 +356,8 @@ jobs:
             APT_PACKAGES: gcc-multilib g++-multilib
             APT_PACKAGES: gcc-multilib g++-multilib
           - target: lua
           - target: lua
             APT_PACKAGES: ncurses-dev
             APT_PACKAGES: ncurses-dev
+          - target: flash9
+            APT_PACKAGES: libglib2.0-0 libfreetype6 xvfb
     steps:
     steps:
       - uses: actions/checkout@main
       - uses: actions/checkout@main
         with:
         with:
@@ -410,6 +412,10 @@ jobs:
           sudo apt update -qqy
           sudo apt update -qqy
           sudo apt install -qqy ${{matrix.APT_PACKAGES}}
           sudo apt install -qqy ${{matrix.APT_PACKAGES}}
 
 
+      - name: Flash setup
+        if: matrix.target == 'flash9'
+        run: export DISPLAY=:99.0
+
       - name: Test
       - name: Test
         run: haxe RunCi.hxml
         run: haxe RunCi.hxml
         working-directory: ${{github.workspace}}/tests
         working-directory: ${{github.workspace}}/tests

+ 7 - 1
extra/github-actions/workflows/main.yml

@@ -161,7 +161,7 @@ jobs:
     strategy:
     strategy:
       fail-fast: false
       fail-fast: false
       matrix:
       matrix:
-        target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, neko]
+        target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, flash9, neko]
         include:
         include:
           - target: hl
           - target: hl
             APT_PACKAGES: cmake ninja-build libturbojpeg-dev
             APT_PACKAGES: cmake ninja-build libturbojpeg-dev
@@ -169,6 +169,8 @@ jobs:
             APT_PACKAGES: gcc-multilib g++-multilib
             APT_PACKAGES: gcc-multilib g++-multilib
           - target: lua
           - target: lua
             APT_PACKAGES: ncurses-dev
             APT_PACKAGES: ncurses-dev
+          - target: flash9
+            APT_PACKAGES: libglib2.0-0 libfreetype6 xvfb
     steps:
     steps:
       - uses: actions/checkout@main
       - uses: actions/checkout@main
         with:
         with:
@@ -207,6 +209,10 @@ jobs:
           sudo apt update -qqy
           sudo apt update -qqy
           sudo apt install -qqy ${{matrix.APT_PACKAGES}}
           sudo apt install -qqy ${{matrix.APT_PACKAGES}}
 
 
+      - name: Flash setup
+        if: matrix.target == 'flash9'
+        run: export DISPLAY=:99.0
+
       - name: Test
       - name: Test
         run: haxe RunCi.hxml
         run: haxe RunCi.hxml
         working-directory: ${{github.workspace}}/tests
         working-directory: ${{github.workspace}}/tests

+ 7 - 6
tests/runci/targets/Flash.hx

@@ -52,7 +52,7 @@ class Flash {
 			return;
 			return;
 		}
 		}
 		// download flex sdk
 		// download flex sdk
-		final flexVersion = "4.16.0";
+		final flexVersion = "4.16.1";
 		final flexSdkPath = Path.normalize(getInstallPath() + '/apache-flex-sdk-${flexVersion}-bin');
 		final flexSdkPath = Path.normalize(getInstallPath() + '/apache-flex-sdk-${flexVersion}-bin');
 
 
 		if (FileSystem.exists(flexSdkPath)) {
 		if (FileSystem.exists(flexSdkPath)) {
@@ -64,14 +64,15 @@ class Flash {
 
 
 		// download playerglobal.swc
 		// download playerglobal.swc
 		final playerGlobalSwcFolder = flexSdkPath + "/player";
 		final playerGlobalSwcFolder = flexSdkPath + "/player";
-		FileSystem.createDirectory(playerGlobalSwcFolder + "/11.1");
-		final flashVersion = getLatestFPVersion();
+		final playerGlobalSwcSubFolder = playerGlobalSwcFolder + "/27.0";
+		FileSystem.createDirectory(playerGlobalSwcSubFolder);
 
 
-		final playerGlobalSwcPath = playerGlobalSwcFolder + "/11.1/playerglobal.swc";
+		final playerGlobalSwcPath = '$playerGlobalSwcSubFolder/playerglobal.swc';
 
 
 		if (FileSystem.exists(playerGlobalSwcPath)) {
 		if (FileSystem.exists(playerGlobalSwcPath)) {
 			infoMsg('playerglobal.swc found at $playerGlobalSwcPath');
 			infoMsg('playerglobal.swc found at $playerGlobalSwcPath');
 		} else {
 		} else {
+			final flashVersion = getLatestFPVersion();
 			runNetworkCommand("wget", [
 			runNetworkCommand("wget", [
 				"-nv",
 				"-nv",
 				'https://fpdownload.macromedia.com/get/flashplayer/updaters/${flashVersion[0]}/playerglobal${flashVersion[0]}_${flashVersion[1]}.swc',
 				'https://fpdownload.macromedia.com/get/flashplayer/updaters/${flashVersion[0]}/playerglobal${flashVersion[0]}_${flashVersion[1]}.swc',
@@ -259,8 +260,8 @@ class Flash {
 	static public function run(args:Array<String>) {
 	static public function run(args:Array<String>) {
 		setupFlashPlayerDebugger();
 		setupFlashPlayerDebugger();
 		setupFlexSdk();
 		setupFlexSdk();
-		for (argsVariant in [[], ["--swf-version", "32"]]) {
-			runCommand("haxe", ["compile-flash9.hxml", "-D", "fdb", "-D", "dump", "-D", "dump_ignore_var_ids"].concat(args).concat(argsVariant));
+		for (flashVersion in ["11", "32"]) {
+			runCommand("haxe", ["compile-flash9.hxml", "-D", "fdb", "-D", "dump", "-D", "dump_ignore_var_ids", "--swf-version", flashVersion].concat(args));
 			runFlash("bin/unit9.swf");
 			runFlash("bin/unit9.swf");
 		}
 		}
 
 

+ 1 - 2
tests/unit/compile-flash9.hxml

@@ -4,7 +4,6 @@
 
 
 compile-each.hxml
 compile-each.hxml
 --main unit.TestMain
 --main unit.TestMain
---swf-version 11
 -swf bin/unit9.swf
 -swf bin/unit9.swf
 -swf-lib native_swf/lib.swc
 -swf-lib native_swf/lib.swc
--D network-sandbox
+-D network-sandbox