Skip to content

Commit

Permalink
feat: Add native build for osx aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
jagodevreede committed Nov 11, 2024
1 parent 3ef1977 commit eeb7eb0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/assemble-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos-13, windows-latest ]
os: [ macos-13, macos-latest, windows-latest ]
jdk_arch: [ x86_64, aarch64 ]
exclude:
- os: macos-13
jdk_arch: aarch64
- os: windows-latest
jdk_arch: aarch64
- os: macos-latest
jdk_arch: x86_64
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -65,7 +67,7 @@ jobs:
- name: Remove windows lib
if: startsWith(matrix.os, 'windows') != true
# TODO remove this for oll other os as well
run: rm sdkman-ui/target/gluonfx/x86_64-darwin/gvm/lib/libjnidispatch.a
run: rm -f sdkman-ui/target/gluonfx/${{ matrix.jdk_arch }}-darwin/gvm/lib/libjnidispatch.a
- name: Link native
run: ./mvnw -B gluonfx:link -f sdkman-ui
- name: Assemble zip
Expand Down
6 changes: 3 additions & 3 deletions sdkman-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@
<version>${maven-assembly-plugin.version}</version>
<executions>
<execution>
<id>make-zip-x86_64</id>
<id>make-zip-${os.arch}</id>
<configuration>
<finalName>sdkman-ui-osx_x86_64-${project.version}</finalName>
<finalName>sdkman-ui-osx_${os.arch}-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/zip-osx-x86_64.xml</descriptor>
<descriptor>src/main/assembly/zip-osx-${os.arch}.xml</descriptor>
</descriptors>
</configuration>
</execution>
Expand Down
17 changes: 17 additions & 0 deletions sdkman-ui/src/main/assembly/zip-osx-aarch64.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>zip</id>
<includeBaseDirectory>false</includeBaseDirectory>

<formats>
<format>zip</format>
</formats>
<files>
<file>
<source>${project.build.directory}/gluonfx/aarch64-darwin/sdkman-ui</source>
<outputDirectory>/</outputDirectory>
<destName>sdkman-ui</destName>
</file>
</files>
</assembly>

0 comments on commit eeb7eb0

Please sign in to comment.