-
Notifications
You must be signed in to change notification settings - Fork 42
108 lines (93 loc) · 3.39 KB
/
Copy pathbuild.yml
File metadata and controls
108 lines (93 loc) · 3.39 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
100
101
102
103
104
105
106
107
108
name: Build
on:
workflow_call:
# if another commit is added to the same branch or PR (same github.ref),
# then cancel already running jobs and start a new build.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
env:
LANG: 'en_US.UTF-8'
jobs:
# verify build on one node before multiple builds on different os are started
fail-fast-build:
name: verify (ubuntu-latest, 2026-06)
timeout-minutes: 30
defaults:
run:
shell: bash
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
- name: Setup Environment
uses: ./.github/actions/setup
- name: Build
run: |
MVN_DEBUG=()
[ "${RUNNER_DEBUG:-}" = "1" ] && MVN_DEBUG=(--debug)
${xvfb_cmd} ./mvnw "${MVN_DEBUG[@]}" --show-version --errors --batch-mode \
verify
- name: Upload screenshots and surefire reports of failed unit tests
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
if: ${{ failure() }}
with:
name: test-reports-ubuntu-latest
path: |
net.sourceforge.pmd.eclipse.plugin.test/screenshots
net.sourceforge.pmd.eclipse.plugin.test/target/surefire-reports
if-no-files-found: ignore
- name: Upload update-site
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
with:
name: update-site
path: net.sourceforge.pmd.eclipse.p2updatesite/target/net.sourceforge.pmd.eclipse.p2updatesite-*.zip
build:
needs: fail-fast-build
name: verify (${{ matrix.os }}, ${{ matrix.targetPlatform }})
timeout-minutes: 30
defaults:
run:
shell: bash
continue-on-error: false
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
targetPlatform: [ 2026-06 ]
exclude:
# exclude the fail-fast-build, which already ran
- os: ubuntu-latest
targetPlatform: 2026-06
# run other target platforms only on linux
include:
- os: ubuntu-latest
targetPlatform: 2026-03
- os: ubuntu-latest
targetPlatform: 2025-12
- os: ubuntu-latest
targetPlatform: 2025-09
fail-fast: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
- name: Setup Environment
uses: ./.github/actions/setup
- name: Build
env:
TARGET_PLATFORM: ${{ matrix.targetPlatform }}
run: |
MVN_DEBUG=()
[ "${RUNNER_DEBUG:-}" = "1" ] && MVN_DEBUG=(--debug)
${xvfb_cmd} ./mvnw "${MVN_DEBUG[@]}" --show-version --errors --batch-mode \
verify \
-Dtarget.platform="${TARGET_PLATFORM}"
- name: Upload screenshots and surefire reports of failed unit tests
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
if: ${{ failure() }}
with:
name: test-reports-${{ matrix.os }}-${{ matrix.targetPlatform }}
path: |
net.sourceforge.pmd.eclipse.plugin.test/screenshots
net.sourceforge.pmd.eclipse.plugin.test/target/surefire-reports
if-no-files-found: ignore