forked from pmd/pmd-eclipse-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (97 loc) · 3.06 KB
/
build.yml
File metadata and controls
112 lines (97 loc) · 3.06 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
109
110
111
112
name: Build
on:
pull_request:
merge_group:
push:
branches:
- '**'
# don't run on dependabot branches. Dependabot will create pull requests, which will then be run instead
- '!dependabot/**'
tags:
- '**'
workflow_dispatch:
schedule:
# build it monthly: At 05:00 on day-of-month 1.
- cron: '0 5 1 * *'
# 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-03)
timeout-minutes: 30
defaults:
run:
shell: bash
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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@v4
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@v4
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-03 ]
exclude:
# exclude the fail-fast-build, which already ran
- os: ubuntu-latest
targetPlatform: 2025-03
# run other target platforms only on linux
include:
- os: ubuntu-latest
targetPlatform: 2024-12
- os: ubuntu-latest
targetPlatform: 2024-09
- os: ubuntu-latest
targetPlatform: 2024-06
fail-fast: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- 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@v4
if: ${{ failure() }}
with:
name: screenshots-${{ matrix.os }}-${{ matrix.targetPlatform }}
path: net.sourceforge.pmd.eclipse.plugin.test/screenshots
if-no-files-found: ignore