-
Notifications
You must be signed in to change notification settings - Fork 82
97 lines (95 loc) · 3.27 KB
/
mavenBuild.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Maven Build
on:
workflow_call:
inputs:
maven-goals:
description: maven goals to use, defaults to 'clean verify'
required: false
default: 'clean verify'
type: string
submodules:
description: |
Whether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules.
When the `ssh-key` input is not provided, SSH URLs beginning with `[email protected]:` are converted to HTTPS.
The value is just passed as it is to the github/actions/checkout action: https://github.com/actions/checkout#usage
type: string
required: false
default: 'false'
mavenVersion:
description: 'The version of Maven set up'
type: string
required: false
default: '3.9.9'
permissions: {}
jobs:
event_file:
name: "Upload Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: Event File
path: ${{ github.event_path }}
build:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: Linux, os: ubuntu-latest }
- { name: Windows, os: windows-latest }
- { name: MacOS, os: macos-13 }
name: Verify ${{ matrix.config.name }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # required for jgit timestamp provider to work
submodules: ${{ inputs.submodules }}
- name: Set up Java
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
java-version: |
8
11
17
21
mvn-toolchain-id: |
JavaSE-1.8
JavaSE-11
JavaSE-17
JavaSE-21
distribution: 'temurin'
cache: maven
- name: Set up Maven
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
with:
maven-version: ${{ inputs.mavenVersion }}
- name: Download the API Tools matcher
uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # v1.6.0
id: api-tools-matcher
with:
url: "https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.releng.aggregator/master/.github/matcher/api-tools.json"
target: .github/matcher
- run: echo "::add-matcher::.github/matcher/${{ steps.api-tools-matcher.outputs.filename }}"
- name: Build with Maven
uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a
with:
run: >-
mvn --batch-mode -V -U -e
-ntp
-Dcompare-version-with-baselines.skip=false
-Pbree-libs
-Papi-check
--fail-at-end
${{ inputs.maven-goals }}
- name: Upload Test Results for ${{ matrix.config.name }}
if: always()
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: test-results-${{ matrix.config.os }}
if-no-files-found: warn
path: |
${{ github.workspace }}/**/target/surefire-reports/*.xml
${{ github.workspace }}/**/results/**/*.png