Skip to content
New issue

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

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

Already on GitHub? # to your account

build: Add workflow for M1 and bump versions #567

Merged
merged 3 commits into from
Sep 27, 2022
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
118 changes: 118 additions & 0 deletions .github/workflows/bundles-mac_aarch64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: MacOs Bundles

on:
workflow_call:
inputs:
app-version:
required: true
type: string
project-version:
required: true
type: string
java-version:
default: '19'
required: false
type: string
javafx-version:
default: '19'
required: false
type: string
test:
default: false
required: false
type: boolean
secrets:
CERTIFICATES_FILE_BASE64:
required: true
CERTIFICATES_PASSWORD:
required: true
NOTARIZATION_USERNAME:
required: true
NOTARIZATION_PASSWORD:
required: true
MACSIGN_USER:
required: true
MACSIGN_PREFIX:
required: true
jobs:
build:
name: macOS on M1
runs-on: [macOS, ARM64]
steps:
- uses: actions/checkout@v2

- name: Setup Java
uses: oracle-actions/setup-java@v1
with:
website: jdk.java.net
release: ${{ inputs.java-version }}

- uses: Apple-Actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.CERTIFICATES_FILE_BASE64 }}
p12-password: ${{ secrets.CERTIFICATES_PASSWORD }}

- name: Setup JavaFX
run: |
wget -P /tmp https://download2.gluonhq.com/openjfx/${{ inputs.javafx-version }}/openjfx-${{ inputs.javafx-version }}_osx-aarch64_bin-jmods.zip
unzip /tmp/openjfx-${{ inputs.javafx-version }}_osx-aarch64_bin-jmods.zip -d /tmp

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Run Tests
if: ${{ inputs.test }}
run: |
mvn -B -ntp clean verify checkstyle:checkstyle --no-transfer-progress

- name: Build and package JAR
run: |
mvn -B -ntp -q versions:set -DnewVersion=${{ env.APP_VERSION }} -DgenerateBackupPoms=false
mvn -B -ntp -q clean package -Dmaven.test.skip=true
env:
APP_VERSION: ${{ inputs.app-version }}

- name: Create Bundle using JPackage
id: outputfile
run: |
.github/scripts/jpackage.sh \
--icon app/assets/osx/icon-mac.icns \
--java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \
--type dmg \
--mac-package-identifier com.gluonhq.scenebuilder \
--mac-package-name 'Scene Builder' \
--mac-package-signing-prefix "${{ env.MACSIGN_PREFIX }}" \
--mac-signing-key-user-name "${{ env.MACSIGN_USER }}" \
--mac-sign
mv ${{ env.INSTALL_DIR }}/SceneBuilder-${{ env.APP_VERSION }}.dmg ${{ env.INSTALL_DIR }}/SceneBuilder-${{ env.PROJECT_VERSION }}.dmg
ls ${{ env.INSTALL_DIR }}
echo ::set-output name=path::${{ env.INSTALL_DIR }}/SceneBuilder-${{ env.PROJECT_VERSION }}.dmg
env:
MAIN_CLASS: com.oracle.javafx.scenebuilder.app.SceneBuilderApp
JAVAFX_HOME: /tmp/javafx-jmods-${{ inputs.javafx-version }}/
JPACKAGE_HOME: ${{ env.JAVA_HOME }}
MACSIGN_PREFIX: ${{ secrets.MACSIGN_PREFIX }}
MACSIGN_USER: ${{ secrets.MACSIGN_USER }}
PROJECT_VERSION: ${{ inputs.project-version }}
APP_VERSION: ${{ inputs.app-version }}
INSTALL_DIR: app/target/install

- name: Notarize Release Build
uses: erwin1/xcode-notarize@main
with:
product-path: ${{ steps.outputfile.outputs.path }}
appstore-connect-username: ${{ secrets.NOTARIZATION_USERNAME }}
appstore-connect-password: ${{ secrets.NOTARIZATION_PASSWORD }}
primary-bundle-id: com.gluonhq.scenebuilder
asc-provider: ${{ secrets.MACSIGN_PREFIX }}
verbose: true

- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: artifacts
path: ${{ steps.outputfile.outputs.path }}
19 changes: 18 additions & 1 deletion .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,23 @@ jobs:
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }}
test: true

mac_aarch64-bundles:
needs: [precheck]
uses: gluonhq/scenebuilder/.github/workflows/bundles-mac_aarch64.yml@master
secrets:
CERTIFICATES_FILE_BASE64: ${{ secrets.CERTIFICATES_FILE_BASE64 }}
CERTIFICATES_PASSWORD: ${{ secrets.CERTIFICATES_PASSWORD }}
NOTARIZATION_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }}
NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }}
MACSIGN_USER: ${{ secrets.GLUON_MACSIGN_USER }}
MACSIGN_PREFIX: ${{ secrets.GLUON_MACSIGN_PREFIX }}
with:
javafx-version: ${{ needs.precheck.outputs.JAVAFX_VERSION }}
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }}
app-version: ${{ needs.precheck.outputs.APP_VERSION }}
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }}
test: true

kit-bundles:
needs: [precheck]
uses: gluonhq/scenebuilder/.github/workflows/bundles-kit.yml@master
Expand All @@ -93,7 +110,7 @@ jobs:
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }}

early-access:
needs: [precheck, linux-bundles, windows-bundles, mac-bundles, kit-bundles]
needs: [precheck, linux-bundles, windows-bundles, mac-bundles, mac_aarch64-bundles, kit-bundles]
if: endsWith(${{ needs.precheck.outputs.PROJECT_VERSION }}, '-SNAPSHOT')
runs-on: ubuntu-20.04
steps:
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,23 @@ jobs:
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }}
test: true

mac_aarch64-bundles:
needs: [precheck]
uses: gluonhq/scenebuilder/.github/workflows/bundles-mac_aarch64.yml@master
secrets:
CERTIFICATES_FILE_BASE64: ${{ secrets.CERTIFICATES_FILE_BASE64 }}
CERTIFICATES_PASSWORD: ${{ secrets.CERTIFICATES_PASSWORD }}
NOTARIZATION_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }}
NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }}
MACSIGN_USER: ${{ secrets.GLUON_MACSIGN_USER }}
MACSIGN_PREFIX: ${{ secrets.GLUON_MACSIGN_PREFIX }}
with:
javafx-version: ${{ needs.precheck.outputs.JAVAFX_VERSION }}
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }}
app-version: ${{ needs.precheck.outputs.APP_VERSION }}
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }}
test: true

kit-bundles:
needs: [precheck]
uses: gluonhq/scenebuilder/.github/workflows/bundles-kit.yml@master
Expand All @@ -98,7 +115,7 @@ jobs:
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }}

release:
needs: [precheck, linux-bundles, windows-bundles, mac-bundles, kit-bundles]
needs: [precheck, linux-bundles, windows-bundles, mac-bundles, mac_aarch64-bundles, kit-bundles]
runs-on: ubuntu-20.04
steps:
- name: Check out repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ about.build.date = Date: {0}
about.build.java.version = Java Version: {0}
about.build.javafx.version = JavaFX Version: {0}
about.copyright = Copyright \u00a9 2012, 2014, Oracle and/or its affiliates. All rights reserved.\n\nThis software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.\n\nThe information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.\n\nIf this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:\n\nU.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are \"commercial computer software\" or \"commercial technical data\" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.\n\nThis software is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications which may create a risk of personal injury. If you use this software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use of this software. Oracle and its affiliates disclaim any liability for any damages caused by use of this software in dangerous applications.\n\nOracle is a registered trademark of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.\n\nThis software and documentation may provide access to or information on content, products, and services from third parties. Oracle and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.
about.copyright.open = Copyright (c) 2015-2021, Gluon.\nAll rights reserved. Use is subject to license terms.\n\nThis file is available and licensed under the following license:\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n - Neither the name of Gluon nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
about.copyright.open = Copyright (c) 2016-2022, Gluon.\nAll rights reserved. Use is subject to license terms.\n\nThis file is available and licensed under the following license:\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n - Neither the name of Gluon nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the original 2015-2021, should it be 2015-2022 or is 2016 the correct start year?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am just following the copyright of the repo license. Checking the licenses of some old SB repos, while Gluon copyright always starts on 2016, it is likely that the about.copyright.open message was initially wrong (in fact the file header uses 2016).

# Hardware acceleration is a boolean: its value depends on the FX toolkit and pipeline in use.
about.fx.hardware.acceleration = Hardware acceleration
about.fx.hardware.acceleration.enabled = ENABLED
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>${java.version}</maven.compiler.release>
<javafx.version>18</javafx.version>
<javafx.version>19</javafx.version>
<aether.version>1.1.0</aether.version>
<charm.glisten.version>6.1.0</charm.glisten.version>
<gluon.attach.version>4.0.13</gluon.attach.version>
<charm.glisten.version>6.2.0</charm.glisten.version>
<gluon.attach.version>4.0.15</gluon.attach.version>
<junit.jupiter.version>5.8.2</junit.jupiter.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.github.repository>gluonhq/scenebuilder</project.github.repository>
Expand Down