-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.53 KB
/
maven-multi-os.yml
File metadata and controls
49 lines (47 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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: Run Tests with Maven
run: |
if [[ "${{ runner.os }}" == "Linux" ]]; then
mvn test -Dos.version=linux-x86_64
elif [[ "${{ runner.os }}" == "macOS" ]]; then
mvn test -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