Skip to content

Commit

Permalink
Build artefacts after push to main
Browse files Browse the repository at this point in the history
  • Loading branch information
vzahradnik committed Jan 3, 2025
1 parent 84a403b commit 802a08e
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 6 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build Linux Binary

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build-linux-binary:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up JDK 22
uses: actions/setup-java@v4
with:
java-version: '22'
distribution: 'liberica'
cache: maven

- name: Extract version from Maven cache
id: get-version
run: |
version=$(mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate \
-Dexpression=project.version -q -DforceStdout --file tcMenuGenerator/pom.xml)
echo "version=$version" >> $GITHUB_ENV
- name: Build tcMenuGenerator binary
run: |
mvn -B install -DskipTests -Dgpg.skip=true --file tcMenuJavaApi/pom.xml
mvn -B install -DskipTests -Dgpg.skip=true --file embedCONTROLCore/pom.xml
mvn -B install -DskipTests -Dgpg.skip=true --file tcMenuGenerator/pom.xml
cd tcMenuGenerator/target
cp classes/img/tcMenuDesigner.ico .
jpackage -n tcMenuDesigner \
-p jfx/deps \
--input jfx/app \
--icon ./classes/img/menu-icon.png \
--verbose \
--license-file ../../LICENSE \
--linux-app-category Development \
--linux-menu-group "Development;Utility;" \
--java-options "-Dprism.lcdtext=false -Djava.library.path=$APPDIR/lin" \
--app-version ${{ env.version }} \
--add-modules "jdk.crypto.cryptoki" \
-m com.thecoderscorner.tcmenu.menuEditorUI/com.thecoderscorner.menu.editorui.cli.TcMenuDesignerCmd
- name: Upload DEB artifact
uses: actions/upload-artifact@v3
with:
name: tcmenudesigner_${{ env.version }}_linux_deb-${{ github.sha }}
path: |
tcMenuGenerator/target/tcmenudesigner_${{ env.version }}_amd64.deb
10 changes: 5 additions & 5 deletions .github/workflows/build.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Build
name: Test

on:
push:
pull_request:
branches: [ "main" ]

jobs:
build:
test:

runs-on: ubuntu-latest

Expand All @@ -19,11 +19,11 @@ jobs:
distribution: 'liberica'
cache: maven

- name: Build tcMenuJavaApi
- name: Build and test tcMenuJavaApi
run: mvn -B install -Dgpg.skip=true --file tcMenuJavaApi/pom.xml

- name: Build embedCONTROLCore
- name: Build and test embedCONTROLCore
run: mvn -B install -Dgpg.skip=true --file embedCONTROLCore/pom.xml

- name: Build tcMenuGenerator
- name: Build and test tcMenuGenerator
run: mvn -B install -Dgpg.skip=true --file tcMenuGenerator/pom.xml
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## tcMenu - A menu library and designer for Arduino and mbed with IoT capabilities
[![Java Build](https://github.com/TcMenu/tcMenu/actions/workflows/build.yml/badge.svg)](https://github.com/TcMenu/tcMenu/actions/workflows/build.yml)
[![Java Test](https://github.com/TcMenu/tcMenu/actions/workflows/test.yml/badge.svg)](https://github.com/TcMenu/tcMenu/actions/workflows/test.yml)
[![Linux Build](https://github.com/TcMenu/tcMenu/actions/workflows/build_linux.yml/badge.svg)](https://github.com/TcMenu/tcMenu/actions/workflows/build_linux.yml)
[![License: Apache 2.0](https://img.shields.io/badge/license-Apache--2.0-green.svg)](https://github.com/TcMenu/tcMenu/blob/main/LICENSE)
[![GitHub release](https://img.shields.io/github/release/TcMenu/tcMenu.svg?maxAge=3600)](https://github.com/TcMenu/tcMenu/releases)
[![davetcc](https://img.shields.io/badge/davetcc-dev-blue.svg)](https://github.com/davetcc)
Expand Down

0 comments on commit 802a08e

Please sign in to comment.