Skip to content

Add GitHub Actions workflow for compilation #1

Add GitHub Actions workflow for compilation

Add GitHub Actions workflow for compilation #1

Workflow file for this run

name: Build
on:
push:
branches: [ main, master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: 'temurin'
cache: 'maven'
- name: Build all modules
run: |
set -e # Exit on first compilation error
# Store the root directory
ROOT_DIR=$(pwd)
# Find all pom.xml files and build them
find . -name pom.xml -not -path "*/target/*" | while read pom; do
PROJECT_DIR=$(dirname "$pom")
echo "Building $PROJECT_DIR"
# Change to project directory and compile
cd "$ROOT_DIR/$PROJECT_DIR"
mvn clean compile -B -q || {
echo "Failed to compile $PROJECT_DIR"
exit 1
}
done
echo "All modules compiled successfully"