69 image based hyperbolic navigator #218
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
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
name: Gradle Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
permissions: | |
contents: write | |
concurrency: | |
group: gradle-${{ github.head_ref || github.ref }} | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
jobs: | |
build-jar: | |
name: jar / ${{ matrix.os }} / ${{ matrix.jdk-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
jdk-version: [ 21 ] | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-13 # Intel OSX | |
- macos-14 # ARM64 OSX | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Up JDK ${{ matrix.jdk-version }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.jdk-version }} | |
distribution: 'temurin' | |
- name: Gradle Build Jar | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
add-job-summary: 'on-failure' | |
arguments: clean assemble -Penv=prod-jar | |
- name: Upload Jar | |
uses: actions/upload-artifact@v4 | |
continue-on-error: true | |
with: | |
name: java-${{ matrix.jdk-version }}-${{ runner.os }}-${{ runner.arch }}-jar | |
path: build/libs/*-fx.jar | |
retention-days: 10 | |
if-no-files-found: error | |
- name: Release Jar | |
if: github.event_name == 'release' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
GH_REPO: ${{ github.repository }} | |
RELEASE_NAME: trinity-${{ runner.os }}-${{ runner.arch }}-java-${{ matrix.jdk-version }} | |
shell: bash | |
run: | | |
mv build/libs/*-no-fx.jar "$RELEASE_NAME-slim.jar" | |
mv build/libs/*-fx.jar "$RELEASE_NAME.jar" | |
if [[ "$RUNNER_OS" == "macOS" ]]; then | |
zip "$RELEASE_NAME-jar.zip" "$RELEASE_NAME.jar" | |
elif [[ "$RUNNER_OS" == "Windows" ]]; then | |
7z a "$RELEASE_NAME-jar.zip" "$RELEASE_NAME.jar" | |
elif [[ "$RUNNER_OS" == "Linux" ]]; then | |
zip "$RELEASE_NAME-jar.zip" "$RELEASE_NAME.jar" | |
zip "trinity-java-${{ matrix.jdk-version }}-slim-jar.zip" "$RELEASE_NAME-slim.jar" | |
gh release upload "${{ github.ref_name }}" "trinity-java-${{ matrix.jdk-version }}-slim-jar.zip" | |
else | |
exit 1 | |
fi | |
gh release upload "${{ github.ref_name }}" "$RELEASE_NAME-jar.zip" | |
build-jlink: | |
name: jlink / ${{ matrix.os }} / ${{ matrix.jdk-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
jdk-version: [ 21 ] | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-13 # Intel OSX | |
- macos-14 # ARM64 OSX | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Up JDK ${{ matrix.jdk-version }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.jdk-version }} | |
distribution: 'temurin' | |
- name: Gradle Build JLink Zip | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
add-job-summary: 'on-failure' | |
arguments: clean jlink -Penv=prod-jlink | |
- name: Upload JLink Zip | |
uses: actions/upload-artifact@v4 | |
continue-on-error: true | |
with: | |
name: java-${{ matrix.jdk-version }}-${{ runner.os }}-${{ runner.arch }}-jlink-zip | |
path: build/image/** | |
retention-days: 10 | |
if-no-files-found: error | |
- name: Release JLink | |
if: github.event_name == 'release' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
GH_REPO: ${{ github.repository }} | |
RELEASE_NAME: trinity-${{ runner.os }}-${{ runner.arch }}-java-${{ matrix.jdk-version }} | |
shell: bash | |
run: | | |
mv "build/image" "build/Trinity" | |
pushd "build" | |
if [[ "$RUNNER_OS" == "macOS" ]]; then | |
zip -r "../$RELEASE_NAME-jlink.zip" "Trinity" | |
elif [[ "$RUNNER_OS" == "Windows" ]]; then | |
7z a "../$RELEASE_NAME-jlink.zip" "Trinity" | |
elif [[ "$RUNNER_OS" == "Linux" ]]; then | |
zip -r ../"$RELEASE_NAME-jlink.zip" "Trinity" | |
else | |
exit 1 | |
fi | |
popd | |
gh release upload "${{ github.ref_name }}" "$RELEASE_NAME-jlink.zip" | |
build-jpackage: | |
name: jpackage / ${{ matrix.os }} / ${{ matrix.jdk-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
jdk-version: [ 21 ] | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-13 # Intel OSX | |
- macos-14 # ARM64 OSX | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Up JDK ${{ matrix.jdk-version }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.jdk-version }} | |
distribution: 'temurin' | |
- name: Gradle Build JPackage | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
add-job-summary: 'on-failure' | |
arguments: clean jpackage -Penv=prod-jlink | |
- name: Upload JPackage | |
uses: actions/upload-artifact@v4 | |
continue-on-error: true | |
with: | |
name: java-${{ matrix.jdk-version }}-${{ runner.os }}-${{ runner.arch }}-jpackage | |
path: build/jpackage/** | |
retention-days: 10 | |
if-no-files-found: error | |
- name: Release JPackage | |
if: github.event_name == 'release' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
GH_REPO: ${{ github.repository }} | |
RELEASE_NAME: trinity-${{ runner.os }}-${{ runner.arch }}-java-${{ matrix.jdk-version }} | |
shell: bash | |
run: | | |
if [[ "$RUNNER_OS" == "macOS" ]]; then | |
mv build/jpackage/Trinity.app "Trinity.app" | |
zip -r "$RELEASE_NAME-jpackage.zip" "Trinity.app" | |
elif [[ "$RUNNER_OS" == "Windows" ]]; then | |
mv build/jpackage/** . | |
7z a "$RELEASE_NAME-jpackage.zip" "Trinity" | |
elif [[ "$RUNNER_OS" == "Linux" ]]; then | |
mv build/jpackage/** . | |
zip -r "$RELEASE_NAME-jpackage.zip" "Trinity/bin" "Trinity/lib" | |
else | |
exit 1 | |
fi | |
gh release upload "${{ github.ref_name }}" "$RELEASE_NAME-jpackage.zip" | |
build-native: | |
name: native / ${{ matrix.os }} / ${{ matrix.jdk-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
jdk-version: [ 21 ] | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-14 # ARM64 OSX | |
# - macos-13 # Intel OSX (TODO Not Supported) | |
steps: | |
- uses: actions/checkout@v4 | |
# https://github.com/gluonhq/substrate | |
- name: Linux Only - Install Additional Dependencies needed by substrate | |
if: runner.os == 'Linux' | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
sudo apt-get update | |
sudo apt-get install --yes --no-install-recommends libasound2-dev libavcodec-dev libavformat-dev libavutil-dev libfreetype6-dev | |
sudo apt-get install --yes --no-install-recommends libgl-dev libglib2.0-dev libgtk-3-dev libpango1.0-dev libx11-dev libxtst-dev zlib1g-dev | |
# Setup CL, msbuild, etc. | |
- name: Windows Only - Enable Windows Developer Command Prompt | |
uses: ilammy/msvc-dev-cmd@v1.13.0 | |
if: runner.os == 'Windows' | |
with: | |
arch: x64 | |
- name: Set Up JDK ${{ matrix.jdk-version }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.jdk-version }} | |
distribution: 'temurin' | |
- name: Set Up GraalVM ${{ matrix.jdk-version }} | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: ${{ matrix.jdk-version }} | |
distribution: 'graalvm' | |
#components: 'native-image' # default | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
native-image-job-reports: 'true' | |
- name: Gradle Build Native | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
add-job-summary: 'on-failure' | |
arguments: clean nativeBuild --stacktrace -Penv=prod-graal | |
- name: Upload Native | |
uses: actions/upload-artifact@v4 | |
continue-on-error: true | |
with: | |
name: java-${{ matrix.jdk-version }}-${{ runner.os }}-${{ runner.arch }}-native | |
path: build/gluonfx/**/trinity* | |
retention-days: 10 | |
if-no-files-found: error | |
- name: Release Native | |
if: github.event_name == 'release' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
GH_REPO: ${{ github.repository }} | |
RELEASE_NAME: trinity-${{ runner.os }}-${{ runner.arch }}-java-${{ matrix.jdk-version }} | |
shell: bash | |
run: | | |
if [[ "$RUNNER_OS" == "macOS" ]]; then | |
mv build/gluonfx/**/trinity* "Trinity.app" | |
zip "$RELEASE_NAME-native.zip" "Trinity.app" | |
elif [[ "$RUNNER_OS" == "Windows" ]]; then | |
mv build/gluonfx/**/trinity*.exe "Trinity.exe" | |
7z a "$RELEASE_NAME-native.zip" "Trinity.exe" | |
elif [[ "$RUNNER_OS" == "Linux" ]]; then | |
mv build/gluonfx/**/trinity* "Trinity.elf" | |
zip "$RELEASE_NAME-native.zip" "Trinity.elf" | |
else | |
exit 1 | |
fi | |
gh release upload "${{ github.ref_name }}" "$RELEASE_NAME-native.zip" |