-
Notifications
You must be signed in to change notification settings - Fork 87
49 lines (46 loc) · 1.64 KB
/
ci.yml
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
# To verify that the changes of a PR do not break the build and pass the tests.
name: ELK CI
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# We check LTS versions and the latest release
# 11 - LTS
# 17 - LTS
java-version: [ 11, 17 ]
steps:
# Checkout the reposity of both elk and elk-models (the latter is required for the tests)
- uses: actions/checkout@v4
with:
path: elk
- uses: actions/checkout@v4
with:
repository: eclipse-elk/elk-models
path: elk-models
# Prepare and use a cache for maven
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up Java version ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.java-version }}
- name: Build and verify with maven
# Run mvn in the 'build' folder
working-directory: /home/runner/work/elk/elk/elk/build/
# As line breaks do not seem to be supported, env variables are used as workaround to make the mvn call readable
run: mvn $opts $doc $test $test_models clean verify
env:
opts: --fail-at-end --no-transfer-progress
doc: --define elk.metadata.documentation.outputPath=/home/runner/work/elk/elk/elk/docs
test: --define tests.paths.elk-repo=/home/runner/work/elk/elk/elk
test_models: --define tests.paths.models-repo=/home/runner/work/elk/elk/elk-models