[O2-B1476] Migrate project to using maven instead of ant #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Compile, Validate and Package BKP-LHC-Client on Multiple OS | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| jobs: | |
| compile: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Compile with Maven | |
| run: | | |
| if [[ "${{ runner.os }}" == "Linux" ]]; then | |
| mvn clean compile -Dos.version=linux-x86_64 | |
| elif [[ "${{ runner.os }}" == "macOS" ]]; then | |
| mvn clean compile -Dos.version=osx-x86_64 | |
| fi | |
| - name: Validate Maven Project | |
| run: | | |
| if [[ "${{ runner.os }}" == "Linux" ]]; then | |
| mvn validate -Dos.version=linux-x86_64 | |
| elif [[ "${{ runner.os }}" == "macOS" ]]; then | |
| mvn validate -Dos.version=osx-x86_64 | |
| fi | |
| - name: Package with Maven (Fat JAR) | |
| run: | | |
| if [[ "${{ runner.os }}" == "Linux" ]]; then | |
| mvn clean package -Dos.version=linux-x86_64 | |
| elif [[ "${{ runner.os }}" == "macOS" ]]; then | |
| mvn clean package -Dos.version=osx-x86_64 | |
| fi |