Skip to content

Commit 5ad22b7

Browse files
committed
handle mac14
1 parent 6c9bb9a commit 5ad22b7

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,12 +550,19 @@ jobs:
550550
opam config exec -- make -s -j`sysctl -n hw.ncpu` STATICLINK=1 "LIB_PARAMS=/usr/local/lib/libz.a /usr/local/lib/libpcre2-8.a /usr/local/lib/libmbedtls.a /usr/local/lib/libmbedcrypto.a /usr/local/lib/libmbedx509.a -cclib '-framework Security -framework CoreFoundation'" PLUGIN=ecso plugin
551551
make -s package_unix package_installer_mac
552552
mkdir ./plugins/ecso/cmxs/hx-4.3.7
553-
mv ./plugins/ecso/cmxs/Mac ./plugins/ecso/cmxs/hx-4.3.7
554-
otool -L ./plugins/ecso/cmxs/hx-4.3.7/Mac/plugin.cmxs
553+
mv ./plugins/ecso/cmxs/Mac${{ matrix.os == 'macos-14' && '-arm64' || '' }} ./plugins/ecso/cmxs/hx-4.3.7
554+
otool -L ./plugins/ecso/cmxs/hx-4.3.7/Mac${{ matrix.os == 'macos-14' && '-arm64' || '' }}/plugin.cmxs
555555
ls -l out
556556
otool -L ./haxe
557557
otool -L ./haxelib
558558
559+
- name: Upload Ecso
560+
uses: actions/upload-artifact@v4
561+
with:
562+
name: ecso
563+
path: plugins/ecso/**/*.cmxs
564+
if-no-files-found: error
565+
559566
- name: Upload artifact (x64)
560567
if: runner.arch == 'X64'
561568
uses: actions/upload-artifact@v4
@@ -889,6 +896,7 @@ jobs:
889896

890897
mac-test-4-3-7:
891898
name: Haxe 4.3.7 / mac-test
899+
needs: mac-build-4-3-7
892900
runs-on: macos-latest
893901
continue-on-error: ${{matrix.target == 'jvm'}}
894902
env:

.github/workflows/release.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,17 @@ jobs:
509509
opam config exec -- make -s -j`sysctl -n hw.ncpu` STATICLINK=1 "LIB_PARAMS=/usr/local/lib/libz.a /usr/local/lib/libpcre2-8.a /usr/local/lib/libmbedtls.a /usr/local/lib/libmbedcrypto.a /usr/local/lib/libmbedx509.a -cclib '-framework Security -framework CoreFoundation'" PLUGIN=ecso plugin
510510
mkdir ./out
511511
mkdir ./plugins/ecso/cmxs/hx-4.3.7
512-
mv ./plugins/ecso/cmxs/Mac ./plugins/ecso/cmxs/hx-4.3.7
513-
otool -L ./plugins/ecso/cmxs/hx-4.3.7/Mac/plugin.cmxs
512+
mv ./plugins/ecso/cmxs/Mac${{ matrix.os == 'macos-14' && '-arm64' || '' }} ./plugins/ecso/cmxs/hx-4.3.7
513+
otool -L ./plugins/ecso/cmxs/hx-4.3.7/Mac${{ matrix.os == 'macos-14' && '-arm64' || '' }}/plugin.cmxs
514514
ls -l out
515515
516+
- name: Upload Ecso
517+
uses: actions/upload-artifact@v4
518+
with:
519+
name: ecso
520+
path: plugins/ecso/**/*.cmxs
521+
if-no-files-found: error
522+
516523
- name: Upload artifact (x64)
517524
if: runner.arch == 'X64'
518525
uses: actions/upload-artifact@v4
@@ -870,7 +877,7 @@ jobs:
870877

871878
mac-test-4-3-7:
872879
name: Haxe 4.3.7 / mac-test
873-
needs: mac-build-universal
880+
needs: mac-build-4-3-7
874881
runs-on: macos-14.7.5
875882
env:
876883
PLATFORM: mac

hx/ecso/_core/Plugin.macro.hx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class Plugin {
3939
'Haxe 32-bit is not yet supported, make sure to use an official 64-bit version of Haxe from https://haxe.org/download/.';
4040
case "Linux":
4141
'On Linux distributions, the installed Haxe package may not be supported by Ecso, make sure to use the official Linux Haxe Binaries from https://haxe.org/download/.';
42+
case "Mac":
43+
tryArm = true;
44+
if (sys.FileSystem.exists(getPluginPath()))
45+
return get_plugin();
4246
case _:
4347
null;
4448
}
@@ -51,6 +55,7 @@ class Plugin {
5155
}
5256
}
5357
static var try32 = false;
58+
static var tryArm = false;
5459
static function getPluginPath():String {
5560
final here = ((?p:PosInfos) -> p.fileName)();
5661
final src = here.directory().directory().directory().directory();
@@ -61,6 +66,8 @@ class Plugin {
6166
return switch Sys.systemName() {
6267
case "Windows":
6368
'Windows${try32 ? "32" : "64"}';
69+
case "Mac":
70+
'Mac${tryArm ? "-arm64" : ""}';
6471
case s:
6572
s;
6673
}

0 commit comments

Comments
 (0)