From 47f177c8aa9a1a94796ed7f0435e918ed8ebf622 Mon Sep 17 00:00:00 2001 From: Rudi Date: Thu, 20 Aug 2026 18:45:27 -0400 Subject: [PATCH] Third pass --- .gitea/workflows/build.yaml | 31 ++++++++++++++++--------------- .github/workflows/build.yaml | 31 ++++++++++++++++--------------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index bd622f2..41f9623 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -23,31 +23,34 @@ jobs: java-version: '17' distribution: 'temurin' - - name: Ensure Java JDK Available + - name: Ensure Java & Build Tools Available run: | - if ! command -v javac >/dev/null 2>&1; then - echo "javac not found in PATH, installing OpenJDK..." + if ! command -v javac >/dev/null 2>&1 || ! command -v gradle >/dev/null 2>&1; then + echo "Installing JDK 17 and Gradle via package manager..." if command -v apt-get >/dev/null 2>&1; then - apt-get update && apt-get install -y openjdk-17-jdk-headless + apt-get update && apt-get install -y openjdk-17-jdk-headless gradle || true elif command -v apk >/dev/null 2>&1; then - apk add --no-cache openjdk17 + apk add --no-cache openjdk17 gradle || true fi fi - echo "Using Java compiler:" - javac -version || which javac - echo "Using Java runtime:" - java -version || which java + echo "Java compiler:" + javac -version || which javac || true + echo "Java runtime:" + java -version || which java || true + echo "Gradle:" + gradle -version || echo "Gradle not available" - name: Make scripts executable run: | - chmod +x ./build_all.sh ./gradlew ./run.sh + chmod +x ./build_all.sh ./run.sh - name: Run Unit Tests run: | if command -v gradle >/dev/null 2>&1; then + echo "Running Gradle unit tests..." gradle test --info else - echo "Testing via build_all.sh..." + echo "Gradle not found; running standalone build verification..." sh ./build_all.sh fi @@ -56,23 +59,21 @@ jobs: sh ./build_all.sh - name: Upload j3270 Executable JAR Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 continue-on-error: true with: name: j3270-executable-jar path: build/j3270.jar - if-no-files-found: warn - name: Upload Test Reports if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 continue-on-error: true with: name: test-reports path: | lib3270j/build/reports/tests/ j3270/build/reports/tests/ - if-no-files-found: ignore - name: Report Build Status if: failure() diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bd622f2..41f9623 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,31 +23,34 @@ jobs: java-version: '17' distribution: 'temurin' - - name: Ensure Java JDK Available + - name: Ensure Java & Build Tools Available run: | - if ! command -v javac >/dev/null 2>&1; then - echo "javac not found in PATH, installing OpenJDK..." + if ! command -v javac >/dev/null 2>&1 || ! command -v gradle >/dev/null 2>&1; then + echo "Installing JDK 17 and Gradle via package manager..." if command -v apt-get >/dev/null 2>&1; then - apt-get update && apt-get install -y openjdk-17-jdk-headless + apt-get update && apt-get install -y openjdk-17-jdk-headless gradle || true elif command -v apk >/dev/null 2>&1; then - apk add --no-cache openjdk17 + apk add --no-cache openjdk17 gradle || true fi fi - echo "Using Java compiler:" - javac -version || which javac - echo "Using Java runtime:" - java -version || which java + echo "Java compiler:" + javac -version || which javac || true + echo "Java runtime:" + java -version || which java || true + echo "Gradle:" + gradle -version || echo "Gradle not available" - name: Make scripts executable run: | - chmod +x ./build_all.sh ./gradlew ./run.sh + chmod +x ./build_all.sh ./run.sh - name: Run Unit Tests run: | if command -v gradle >/dev/null 2>&1; then + echo "Running Gradle unit tests..." gradle test --info else - echo "Testing via build_all.sh..." + echo "Gradle not found; running standalone build verification..." sh ./build_all.sh fi @@ -56,23 +59,21 @@ jobs: sh ./build_all.sh - name: Upload j3270 Executable JAR Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 continue-on-error: true with: name: j3270-executable-jar path: build/j3270.jar - if-no-files-found: warn - name: Upload Test Reports if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 continue-on-error: true with: name: test-reports path: | lib3270j/build/reports/tests/ j3270/build/reports/tests/ - if-no-files-found: ignore - name: Report Build Status if: failure()