-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6a0928
commit 3ea8878
Showing
12 changed files
with
160 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Assemble | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
project-version: | ||
required: true | ||
type: string | ||
|
||
env: | ||
gluon_version: 22.1.0.1-Final | ||
|
||
jobs: | ||
assemble: | ||
name: 'Assemble ${{ matrix.os }} ${{ matrix.jdk_arch }}' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ macos-13, windows-latest ] | ||
jdk_arch: [ x86_64, aarch64 ] | ||
exclude: | ||
- os: macos-13 | ||
jdk_arch: aarch64 | ||
- os: windows-latest | ||
jdk_arch: aarch64 | ||
# 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: | ||
- name: "[Windows only] Add msbuild to PATH" | ||
if: startsWith(matrix.os, 'windows') | ||
uses: microsoft/[email protected] | ||
- name: "[Windows only] Visual Studio shell" | ||
if: startsWith(matrix.os, 'windows') | ||
uses: egor-tensin/vs-shell@v1 | ||
- name: "[macOS only] Setup Xcode" | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
if: startsWith(matrix.os, 'macos') | ||
with: | ||
xcode-version: 'latest-stable' | ||
- name: "Setup Gluon's GraalVM" | ||
uses: gluonhq/setup-graalvm@master | ||
with: | ||
graalvm: ${{ env.gluon_version }} | ||
jdk: 'java17' | ||
arch: ${{ matrix.jdk_arch }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache local Maven repository | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
~/.gluon | ||
~/.openjfx | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
|
||
- name: Build with Maven | ||
run: ./mvnw -B clean install -DskipTests | ||
- name: Compile native | ||
run: ./mvnw -B gluonfx:compile -f sdkman-ui | ||
- 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 | ||
- name: Link native | ||
run: ./mvnw -B gluonfx:link -f sdkman-ui | ||
- name: Assemble zip | ||
run: ./mvnw -B org.apache.maven.plugins:maven-assembly-plugin:single@make-zip-${{ matrix.jdk_arch }} -f sdkman-ui | ||
|
||
- name: Upload workspace on failure only | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
retention-days: 1 | ||
name: workspace-files-${{ matrix.os }}-${{ matrix.jdk_arch }} | ||
path: "**/*" | ||
|
||
- name: Upload package | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
retention-days: 1 | ||
name: artifacts-${{ runner.os }}-${{ matrix.jdk_arch }} | ||
path: | | ||
sdkman-ui/target/sdkman-ui-*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,34 +27,33 @@ jobs: | |
path: | | ||
~/.m2/repository | ||
~/.gluon | ||
save-always: true | ||
~/.openjfx | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
|
||
- name: Add msbuild to PATH | ||
if: matrix.os == 'windows-latest' | ||
uses: microsoft/[email protected] | ||
- name: Visual Studio shell | ||
if: matrix.os == 'windows-latest' | ||
uses: egor-tensin/vs-shell@v1 | ||
- uses: robinraju/[email protected] | ||
- name: Setup Gluon's GraalVM | ||
uses: gluonhq/setup-graalvm@master | ||
with: | ||
repository: "gluonhq/graal" | ||
tag: "gluon-${{ env.gluon_version }}" | ||
fileName: "*java17-windows-gluon-*.zip" | ||
- name: Extract JDK | ||
run: | | ||
unzip graalvm-svm-java17-windows-gluon-${{ env.gluon_version }}.zip | ||
Rename-Item -path "graalvm-svm-java17-windows-gluon-${{ env.gluon_version }}" jdk | ||
- name: Set env for JAVA_HOME | ||
run: echo "JAVA_HOME=D:\a\sdkman-ui\sdkman-ui\jdk" | Out-File -FilePath $env:GITHUB_ENV -Append | ||
- name: Set env for GRAALVM_HOME | ||
run: echo "GRAALVM_HOME=D:\a\sdkman-ui\sdkman-ui\jdk" | Out-File -FilePath $env:GITHUB_ENV -Append | ||
graalvm: '22.1.0.1-Final' | ||
jdk: 'java17' | ||
arch: 'x86_64' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build with Maven | ||
run: ./mvnw -B clean install -DskipTests | ||
- name: Build native | ||
run: ./mvnw gluonfx:build -f sdkman-ui | ||
- name: Compile native | ||
run: ./mvnw -B gluonfx:compile -f sdkman-ui | ||
- name: Link native | ||
run: ./mvnw -B gluonfx:link -f sdkman-ui | ||
- name: Assamble zip | ||
run: | | ||
./mvnw org.apache.maven.plugins:maven-assembly-plugin:single@assemble-windows -f sdkman-ui | ||
./mvnw -B org.apache.maven.plugins:maven-assembly-plugin:single@assemble-windows -f sdkman-ui | ||
- name: Upload package | ||
uses: actions/upload-artifact@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.