Skip to content

Commit

Permalink
ci: reduce dist sizes and build MacOS ARM dist
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Nov 7, 2024
1 parent f245348 commit b23e14d
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 50 deletions.
39 changes: 35 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,40 @@ jobs:
${{ github.event.inputs.additional_maven_args }} \
clean verify
python product/fix_exec_flag_in_archives.py
mv product/target/products/org.haxe4e.studio-win32.win32.x86_64.zip \
product/target/products/org.haxe4e.studio-win.x86_64.zip
cd product/target/products
# remove unused dynamic libs
rm -rf \
org.haxe4e.studio/linux/gtk/x86_64/plugins/com.sun.jna_*/com/sun/jna/{aix,darwin,freebsd,linux-a,linux-l,linux-m,linux-p,linux-r,linux-s,openbsd,sunos,win32}* \
org.haxe4e.studio/macosx/cocoa/x86_64/Eclipse.app/Contents/Eclipse/plugins/com.sun.jna_*/com/sun/jna/{aix,freebsd,linux,openbsd,sunos,win32}* \
org.haxe4e.studio/win32/win32/x86_64/plugins/com.sun.jna_*/com/sun/jna/{aix,darwin,freebsd,linux,openbsd,sunos}*
# generate linux x86_64 archive
(
cd org.haxe4e.studio/linux/gtk/x86_64;
tar -cf ../../../../org.haxe4e.studio-linux.gtk.x86_64.tar --exclude='HaxeStudio' --exclude='plugins/org.eclipse.justj.*/jre/bin' *;
tar --mode='+x' --append -f ../../../../org.haxe4e.studio-linux.gtk.x86_64.tar HaxeStudio plugins/org.eclipse.justj.*/jre/bin/*
)
gzip -9 org.haxe4e.studio-linux.gtk.x86_64.tar
# generate macos aarch64 archive
(
cd org.haxe4e.studio/macosx/cocoa/aarch64;
tar -cf ../../../../org.haxe4e.studio-macosx.cocoa.aarch64.tar --exclude='Eclipse.app/Contents/MacOS/HaxeStudio' --exclude='Eclipse.app/Contents/Eclipse/plugins/org.eclipse.justj.*/jre/bin' *;
tar --mode='+x' --append -f ../../../../org.haxe4e.studio-macosx.cocoa.aarch64.tar Eclipse.app/Contents/MacOS/HaxeStudio Eclipse.app/Contents/Eclipse/plugins/org.eclipse.justj.*/jre/bin/*
)
gzip -9 org.haxe4e.studio-macosx.cocoa.aarch64.tar
# generate macos x86_64 archive
(
cd org.haxe4e.studio/macosx/cocoa/x86_64;
tar -cf ../../../../org.haxe4e.studio-macosx.cocoa.x86_64.tar --exclude='Eclipse.app/Contents/MacOS/HaxeStudio' --exclude='Eclipse.app/Contents/Eclipse/plugins/org.eclipse.justj.*/jre/bin' *;
tar --mode='+x' --append -f ../../../../org.haxe4e.studio-macosx.cocoa.x86_64.tar Eclipse.app/Contents/MacOS/HaxeStudio Eclipse.app/Contents/Eclipse/plugins/org.eclipse.justj.*/jre/bin/*
)
gzip -9 org.haxe4e.studio-macosx.cocoa.x86_64.tar
# generate windows x86_64 archive
7z a -mx9 -tzip org.haxe4e.studio-win.x86_64.zip ./org.haxe4e.studio/win32/win32/x86_64/*
- name: Generate PortableApps archive
Expand Down Expand Up @@ -184,6 +214,7 @@ jobs:
--notes "$COMMIT_MSG" \
--target "${{ github.sha }}" \
product/target/products/org.haxe4e.studio-linux.gtk.x86_64.tar.gz \
product/target/products/org.haxe4e.studio-macosx.cocoa.aarch64.tar.gz \
product/target/products/org.haxe4e.studio-macosx.cocoa.x86_64.tar.gz \
product/target/products/org.haxe4e.studio-win.x86_64.zip \
product/target/HaxeStudioPortable.paf.exe
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,11 @@
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>aarch64</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
Expand Down
43 changes: 0 additions & 43 deletions product/fix_exec_flag_in_archives.py

This file was deleted.

9 changes: 6 additions & 3 deletions product/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
<id>create-product-distributions</id>
<goals>
<goal>materialize-products</goal>
<goal>archive-products</goal>
<!--
we create the archives in the GHA workflow
<goal>archive-products</goal>
-->
</goals>
</execution>
</executions>
Expand All @@ -41,11 +44,11 @@
<id>org.haxe4e.studio</id>
</product>
</products>
<formats>
<!--<formats>
<macosx>tar.gz</macosx>
<linux>tar.gz</linux>
<win32>zip</win32>
</formats>
</formats>-->
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit b23e14d

Please sign in to comment.