forked from pmd/pmd-eclipse-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (85 loc) · 2.97 KB
/
build.yml
File metadata and controls
100 lines (85 loc) · 2.97 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
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, 2025-12)
timeout-minutes: 30
defaults:
run:
shell: bash
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
- name: Setup Environment
uses: ./.github/actions/setup
- name: Build
run: |
${xvfb_cmd} ./mvnw --show-version --errors --batch-mode \
verify
- name: Upload screenshots of failed unit tests
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f #v6.0.0
if: ${{ failure() }}
with:
name: screenshots-ubuntu-latest
path: net.sourceforge.pmd.eclipse.plugin.test/screenshots
if-no-files-found: ignore
- name: Upload update-site
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f #v6.0.0
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: [ 2025-12 ]
exclude:
# exclude the fail-fast-build, which already ran
- os: ubuntu-latest
targetPlatform: 2025-12
# run other target platforms only on linux
include:
- os: ubuntu-latest
targetPlatform: 2025-09
- os: ubuntu-latest
targetPlatform: 2025-06
- os: ubuntu-latest
targetPlatform: 2025-03
fail-fast: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
- name: Setup Environment
uses: ./.github/actions/setup
- name: Build
env:
TARGET_PLATFORM: ${{ matrix.targetPlatform }}
run: |
${xvfb_cmd} ./mvnw --show-version --errors --batch-mode \
verify \
-Dtarget.platform="${TARGET_PLATFORM}"
- name: Upload screenshots of failed unit tests
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f #v6.0.0
if: ${{ failure() }}
with:
name: screenshots-${{ matrix.os }}-${{ matrix.targetPlatform }}
path: net.sourceforge.pmd.eclipse.plugin.test/screenshots
if-no-files-found: ignore