Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions add for building Apple Silicon #106

Merged
merged 5 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,17 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
platform: [ubuntu-latest, windows-latest, macos-latest, macos-14]
include:
- platform: ubuntu-latest
jar_file_name: sparcd-ubuntu-latest.jar
- platform: windows-latest
jar_file_name: sparcd-windows-latest.jar
- platform: macos-latest
jar_file_name: macos-latest.jar
- platform: macos-14
jar_file_name: sparcd-AppleSilicon.jar
extra_maven_flags: -Denv=AppleSilicon

runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -27,15 +37,15 @@ jobs:
java-version: 21

- name: Build with Maven
run: cd "Sanimal FX" && mvn -U compile package && mv target/SanimalFX-1.0-SNAPSHOT-jar-with-dependencies.jar ../sparcd-${{ matrix.platform }}.jar
run: cd "Sanimal FX" && mvn -U ${{ matrix.extra_maven_flags }} compile package && mv target/SanimalFX-1.0-SNAPSHOT-jar-with-dependencies.jar ../${{ matrix.jar_file_name }}

- name: Upload prerelease assets
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Prerelease Build
files: sparcd-${{ matrix.platform }}.jar
files: ${{ matrix.jar_file_name }}
draft: true
prerelease: true
fail_on_unmatched_files: true
16 changes: 13 additions & 3 deletions .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,17 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
platform: [ubuntu-latest, windows-latest, macos-latest, macos-14]
include:
- platform: ubuntu-latest
jar_file_name: sparcd-ubuntu-latest.jar
- platform: windows-latest
jar_file_name: sparcd-windows-latest.jar
- platform: macos-latest
jar_file_name: macos-latest.jar
- platform: macos-14
jar_file_name: sparcd-AppleSilicon.jar
extra_maven_flags: -Denv=AppleSilicon

runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -26,7 +36,7 @@ jobs:
java-version: 21

- name: Build with Maven
run: cd "Sanimal FX" && mvn -U compile package && mv target/SanimalFX-1.0-SNAPSHOT-jar-with-dependencies.jar ../sparcd-${{ matrix.platform }}.jar
run: cd "Sanimal FX" && mvn -U ${{ matrix.extra_maven_flags }} compile package && mv target/SanimalFX-1.0-SNAPSHOT-jar-with-dependencies.jar ../${{ matrix.jar_file_name }}

- name: set date env var
if: ${{ matrix.platform != 'windows-latest' }}
Expand All @@ -42,7 +52,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release Build ${{ env.NOW }}
files: sparcd-${{ matrix.platform }}.jar
files: ${{ matrix.jar_file_name }}
draft: false
prerelease: false
fail_on_unmatched_files: true
Expand Down
39 changes: 34 additions & 5 deletions Sanimal FX/pom.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,36 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<!-- Profiles to support different versions dependencies -->
<profiles>
<profile>
<id>Default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<javafx-controls.version>16</javafx-controls.version>
<javafx-fxml.version>16</javafx-fxml.version>
<javafx-graphics.version>16</javafx-graphics.version>
</properties>
</profile>
<profile>
<!-- Enable by using "-Denv=AppleSilicon" on Maven command line -->
<id>AppleSilicon</id>
<activation>
<property>
<name>env</name>
<value>AppleSilicon</value>
</property>
</activation>
<properties>
<javafx-controls.version>17.0.2</javafx-controls.version>
<javafx-fxml.version>17.0.2</javafx-fxml.version>
<javafx-graphics.version>17.0.2</javafx-graphics.version>
</properties>
</profile>
</profiles>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -82,19 +112,18 @@
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>16</version>
<version>${javafx-controls.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.openjfx/javafx-fxml -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>16</version>
<version>${javafx-fxml.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics </artifactId>
<version>16</version>
<classifier>mac</classifier>
<artifactId>javafx-graphics</artifactId>
<version>${javafx-graphics.version}</version>
</dependency>
<!-- JFXtras to get a time picker -->
<dependency>
Expand Down
Loading