-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (94 loc) · 3.11 KB
/
mavenBuild.yml
File metadata and controls
99 lines (94 loc) · 3.11 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
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
98
99
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 `git@github.com:` 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.11'
permissions: {}
env:
MAVEN_ARGS: >-
--batch-mode --no-transfer-progress
jobs:
event_file:
name: "Upload Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
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 }
defaults:
run: # Run on bash/cmd, because powershell (the Windows default) interprets dots in arguments differently
shell: ${{ matrix.config.name == 'Windows' && 'cmd' || 'bash' }}
name: Verify ${{ matrix.config.name }}
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0 # required for jgit timestamp provider to work
submodules: ${{ inputs.submodules }}
- name: Set up Java
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
java-version: |
8
11
17
25
21
mvn-toolchain-id: |
JavaSE-1.8
JavaSE-11
JavaSE-17
JavaSE-25
JavaSE-21
distribution: 'temurin'
cache: maven
- name: Set up Maven
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
with:
maven-version: ${{ inputs.mavenVersion }}
- name: Build with Maven
run: >-
${{ runner.os == 'Linux' && 'xvfb-run' || '' }}
mvn --show-version --update-snapshots --errors
-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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: test-results-${{ matrix.config.os }}
if-no-files-found: warn
path: |
${{ github.workspace }}/**/target/surefire-reports/*.xml
${{ github.workspace }}/**/results/**/*.png