Skip to content

Version 1.3.4

Version 1.3.4 #20

Workflow file for this run

name: Build and Package MacIcns
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build-MacIcns:
strategy:
matrix:
os: [ "macos-latest" ]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up GraalVM JDK 20.0.1
uses: graalvm/setup-graalvm@v1
with:
java-version: '20.0.1'
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
set-java-home: true
cache: 'maven'
components: 'native-image'
- name: Set Up Maven version 3.8.8 # For GUI build issues, maven version 3.8.8 needs to be used
uses: stCarolas/[email protected]
with:
maven-version: 3.8.8
- name: Build platform-specific C object for missing jdk libraries
run: gcc -c config/missing_symbols.c -o config/missing_symbols-${{ matrix.os }}.o
- name: Package MacIcns for ${{ matrix.os }} with GluonFX maven plugin
run: mvn -P build-for-${{ matrix.os }} gluonfx:build gluonfx:package
- name: Create Application Type specific folders
run: |
mkdir App
- name: Categorise build artifacts for macOS
if: ${{ matrix.os == 'macos-latest' }}
run: |
mv target/gluonfx/x86_64-darwin/MacIcns-1.0.0.pkg "target/gluonfx/x86_64-darwin/MacIcns.pkg"
mv "target/gluonfx/x86_64-darwin/MacIcns.pkg" App
mv "target/gluonfx/x86_64-darwin/MacIcns.app" App
- name: Tar build files # To prevent file permission loss
run: tar -cvf ${{ matrix.os }}.tar App
- name: Push generated artifacts for ${{ matrix.os }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-Build-Files
path: ${{ matrix.os }}.tar
generate-metadata:
runs-on: macos-latest
needs: build-MacIcns
steps:
- uses: actions/checkout@v4
- name: Download Build artifacts
uses: actions/download-artifact@v3
- name: Make OS specific build directories
run: |
mkdir macos
- name: Extract build files from tar
run: |
tar -xvf macos-latest-Build-Files/macos-latest.tar -C macos
- name: Get Size of Build Artifacts
run: |
echo "App_MACOS_PKG_SIZE=$(echo `du -h 'macos/App/MacIcns.pkg'` | sed 's/ .*//')" >> "$GITHUB_ENV"
echo "App_MACOS_APP_SIZE=$(echo `du -h 'macos/App/MacIcns.app'` | sed 's/ .*//')" >> "$GITHUB_ENV"
- name: Generate Artifact metadata summary
run: |
echo "# MacIcns Built! :rocket:" >> $GITHUB_STEP_SUMMARY
echo "## Build Artifacts :package: Summary :memo:" >> $GITHUB_STEP_SUMMARY
echo "### Artifacts :package: Generated for macOS :apple:" >> $GITHUB_STEP_SUMMARY
echo "| Application Type | Artifact Name | Size |" >> $GITHUB_STEP_SUMMARY
echo "|------------------|---------------|------|" >> $GITHUB_STEP_SUMMARY
echo "| App | MacIcns.pkg | $App_MACOS_PKG_SIZE |" >> $GITHUB_STEP_SUMMARY
echo "| App | MacIcns.app | $App_MACOS_APP_SIZE |" >> $GITHUB_STEP_SUMMARY