From 770d7be2089c29bdb15c26a4e984751bbfcf93fd Mon Sep 17 00:00:00 2001 From: Christopher Schnick Date: Thu, 10 Mar 2022 19:38:57 +0100 Subject: [PATCH] Prepare workflows --- .github/workflows/api-build.yml | 31 +++++++++++++++++++ .github/workflows/api-publish.yml | 28 +++++++++++++++++ .github/workflows/core-build.yml | 31 +++++++++++++++++++ README.md | 1 + api/README.md | 3 ++ beacon/README.md | 4 +++ .../java/io/xpipe/beacon/BeaconServer.java | 1 - core/README.md | 5 +++ deps | 2 +- extension/README.md | 4 +++ extension/build.gradle | 2 +- samples/sample_program/build.gradle | 5 +++ 12 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/api-build.yml create mode 100644 .github/workflows/api-publish.yml create mode 100644 .github/workflows/core-build.yml create mode 100644 api/README.md diff --git a/.github/workflows/api-build.yml b/.github/workflows/api-build.yml new file mode 100644 index 00000000..78256665 --- /dev/null +++ b/.github/workflows/api-build.yml @@ -0,0 +1,31 @@ +name: Build + +on: [] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ + ubuntu-20.04, + # macos-10.15, + windows-2022 + ] + fail-fast: false + name: ${{ matrix.os }} + steps: + - name: Git checkout + uses: actions/checkout@v2 + + - name: Set up GraalVM + uses: graalvm/setup-graalvm@v1 + with: + version: '21.3.0' + java-version: '17' + + - name: Verify Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + + - name: Execute build + run: ./gradlew :api:clean :api:build diff --git a/.github/workflows/api-publish.yml b/.github/workflows/api-publish.yml new file mode 100644 index 00000000..4b3846e5 --- /dev/null +++ b/.github/workflows/api-publish.yml @@ -0,0 +1,28 @@ +name: Build + +on: [] + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Git checkout + uses: actions/checkout@v2 + + - name: Set up GraalVM + uses: graalvm/setup-graalvm@v1 + with: + version: '21.3.0' + java-version: '17' + + - name: Verify Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + + - name: Execute build + run: ./gradlew :api:clean :api:build + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: api + path: build/libs diff --git a/.github/workflows/core-build.yml b/.github/workflows/core-build.yml new file mode 100644 index 00000000..27993f10 --- /dev/null +++ b/.github/workflows/core-build.yml @@ -0,0 +1,31 @@ +name: Build + +on: [push, pull_request] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ + ubuntu-20.04, + # macos-10.15, + windows-2022 + ] + fail-fast: false + name: ${{ matrix.os }} + steps: + - name: Git checkout + uses: actions/checkout@v2 + + - name: Set up GraalVM + uses: graalvm/setup-graalvm@v1 + with: + version: '21.3.0' + java-version: '17' + + - name: Verify Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + + - name: Execute build + run: ./gradlew :core:clean :core:build diff --git a/README.md b/README.md index 74aa608b..3789f434 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,4 @@ repository, which is shared between all components and integrated as a git submo Some unit tests depend on a connection to an X-Pipe daemon to properly function. To launch the installed daemon, it is required that the `XPIPE_HOME` environment variable is set or the `xpipe` / `xpipe.exe` CLI executable is added to the `PATH` variable. + diff --git a/api/README.md b/api/README.md new file mode 100644 index 00000000..023ebb02 --- /dev/null +++ b/api/README.md @@ -0,0 +1,3 @@ +[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.xpipe/api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.xpipe/api) +[![javadoc](https://javadoc.io/badge2/io.xpipe/api/javadoc.svg)](https://javadoc.io/doc/io.xpipe/api) +[![Build Status](https://github.com/xpipe-io/xpipe_java/actions/workflows/api-build.yml/badge.svg)](https://github.com/xpipe-io/xpipe_java/actions/workflows/api-build.yml) diff --git a/beacon/README.md b/beacon/README.md index 67c68af5..5ec54b13 100644 --- a/beacon/README.md +++ b/beacon/README.md @@ -1,3 +1,7 @@ +[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.xpipe/beacon/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.xpipe/beacon) +[![javadoc](https://javadoc.io/badge2/io.xpipe/beacon/javadoc.svg)](https://javadoc.io/doc/io.xpipe/beacon) +[![Build Status](https://github.com/xpipe-io/xpipe_java/actions/workflows/beacon.yml/badge.svg)](https://github.com/xpipe-io/xpipe_java/actions/workflows/beacon.yml) + ## X-Pipe Beacon The X-Pipe beacon component is responsible for handling all communications between the X-Pipe daemon diff --git a/beacon/src/main/java/io/xpipe/beacon/BeaconServer.java b/beacon/src/main/java/io/xpipe/beacon/BeaconServer.java index 07549214..be1c15b9 100644 --- a/beacon/src/main/java/io/xpipe/beacon/BeaconServer.java +++ b/beacon/src/main/java/io/xpipe/beacon/BeaconServer.java @@ -36,7 +36,6 @@ public class BeaconServer { if (print) { System.out.println("Executing custom daemon launch command: " + custom); } - System.out.println(System.getenv()); var proc = Runtime.getRuntime().exec(custom); new Thread(null, () -> { try { diff --git a/core/README.md b/core/README.md index fb792a01..9d107cf9 100644 --- a/core/README.md +++ b/core/README.md @@ -1,3 +1,8 @@ +[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.xpipe/core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.xpipe/core) +[![javadoc](https://javadoc.io/badge2/io.xpipe/core/javadoc.svg)](https://javadoc.io/doc/io.xpipe/core) +[![Build Status](https://github.com/xpipe-io/xpipe_java/actions/workflows/core-build.yml/badge.svg)](https://github.com/xpipe-io/xpipe_java/actions/workflows/core-build.yml) + + ## X-Pipe Core The X-Pipe core component contains all the shared core classes used by the API, beacon, and daemon. diff --git a/deps b/deps index 49a1ad06..d098dfde 160000 --- a/deps +++ b/deps @@ -1 +1 @@ -Subproject commit 49a1ad06bc6872f72c1d20ea864d24f3df59b7c5 +Subproject commit d098dfdee861175ff5b1d5af9e6cbf68e649ade5 diff --git a/extension/README.md b/extension/README.md index 8238cfe8..2f964437 100644 --- a/extension/README.md +++ b/extension/README.md @@ -1,3 +1,7 @@ +[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.xpipe/extension/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.xpipe/extension) +[![javadoc](https://javadoc.io/badge2/io.xpipe/extension/javadoc.svg)](https://javadoc.io/doc/io.xpipe/extension) +[![Build Status](https://github.com/xpipe-io/xpipe_java/actions/workflows/extension.yml/badge.svg)](https://github.com/xpipe-io/xpipe_java/actions/workflows/extension.yml) + ## X-Pipe Extension API The X-Pipe extension API allows you to create extensions of any kind for X-Pipe. diff --git a/extension/build.gradle b/extension/build.gradle index 3a3cacce..68e99dec 100644 --- a/extension/build.gradle +++ b/extension/build.gradle @@ -27,8 +27,8 @@ repositories { dependencies { implementation project(':core') - implementation project(':fxcomps') + implementation 'io.xpipe:fxcomps:0.1' implementation 'com.google.code.gson:gson:2.9.0' implementation 'org.controlsfx:controlsfx:11.1.1' } diff --git a/samples/sample_program/build.gradle b/samples/sample_program/build.gradle index dcd74490..37d3166f 100644 --- a/samples/sample_program/build.gradle +++ b/samples/sample_program/build.gradle @@ -12,6 +12,11 @@ repositories { mavenCentral() } +// The used X-Pipe API version. +// In your case, you have to fix this value to the target API version, +// which you can find at https://search.maven.org/artifact/io.xpipe/api/ +def apiVersion = file('../../version').text + dependencies { implementation project(':core') implementation project(':api')