From d48bfd80b778404afe8387765a27c3803a69266e Mon Sep 17 00:00:00 2001 From: rattatwinko Date: Sun, 11 May 2025 16:06:48 +0200 Subject: [PATCH] build --- .gitea/workflows/maven_build.yaml | 55 +++++++++++++++++++++++++++++++ build.sh | 10 ++++++ 2 files changed, 65 insertions(+) create mode 100644 .gitea/workflows/maven_build.yaml create mode 100755 build.sh diff --git a/.gitea/workflows/maven_build.yaml b/.gitea/workflows/maven_build.yaml new file mode 100644 index 0000000..2a56e9a --- /dev/null +++ b/.gitea/workflows/maven_build.yaml @@ -0,0 +1,55 @@ +name: Maven Build + +on: + push: + branches: [ main, master, dev ] + pull_request: + branches: [ main, master ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '21' + cache: 'maven' + + - name: Install Maven + run: | + if ! command -v mvn &> /dev/null; then + echo "Maven not found, installing..." + sudo apt-get update + sudo apt-get install -y maven + fi + mvn --version + + - name: Debug Info + run: | + echo "Current workspace directory: $GITHUB_WORKSPACE" + echo "Current directory: $(pwd)" + echo "Project structure:" + find . -type f -name "*.kt" | sort + find . -type f -name "pom.xml" + echo "Maven version: $(mvn --version)" + + - name: Build plughide (plughide) + run: | + echo "Building plughide" + echo "Current directory: $(pwd)" + # Run Maven build directly using the POM file path + mvn -B clean package -f "$GITHUB_WORKSPACE/pom.xml" -Dmaven.compiler.failOnError=true + + - name: Upload plughide artifact + uses: actions/upload-artifact@v3 + with: + name: plughide + path: target/plughide-*.jar + if-no-files-found: error diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..5520b77 --- /dev/null +++ b/build.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Direct build script for Maven project + +echo "Current directory: $(pwd)" +echo "Building project with Maven..." + +# Run Maven build using the exact pom.xml location +mvn clean package -f "$(pwd)/pom.xml" + +echo "Build complete. JAR file should be in target/ directory."