-
Notifications
You must be signed in to change notification settings - Fork 194
133 lines (125 loc) · 4.73 KB
/
maven.yml
File metadata and controls
133 lines (125 loc) · 4.73 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# This is the main maven workflow for SWT.
# You can run this locally to test changes with the act command https://nektosact.com/
# For example, to run all GTK4 tests:
# act -j build-linux --matrix java:21 --matrix gtk:gtk4 --artifact-server-path $PWD/.artifacts
# You may need to download runners on first run, act will ask but if you
# want the big runner there is no progress as it downloads, so you can pull it with
# docker directly:
# docker pull catthehacker/ubuntu:full-latest
name: SWT Matrix Build
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
types: [opened, reopened, synchronize, labeled]
jobs:
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: Event File
path: ${{ github.event_path }}
changes:
name: Detect changed paths
runs-on: ubuntu-latest
outputs:
# Lint warnings are expected in this block
# https://github.com/dorny/paths-filter/issues/223#issuecomment-2463309889
win32: ${{ steps.filter.outputs.win32 || 'false' }}
gtk: ${{ steps.filter.outputs.gtk || 'false' }}
cocoa: ${{ steps.filter.outputs.cocoa || 'false' }}
md: ${{ steps.filter.outputs.md || 'false' }}
other: ${{ steps.filter.outputs.other || 'false' }}
steps:
- name: Paths filter (PRs only)
if: github.event.pull_request.base
# dorney/paths-filter is out of date, so use this fork with
# a specific fix for missing predicate-quantifier in action's
# inputs
# https://github.com/dorny/paths-filter/pull/226#issuecomment-2805358761
uses: petermetz/paths-filter@5ee2f5d4cf5d7bdd998a314a42da307e2ae1639d
id: filter
with:
predicate-quantifier: 'every'
filters: |
win32:
- '**/win32/**'
gtk:
- '**/gtk/**'
cocoa:
- '**/cocoa/**'
md:
- '**/*.md'
jenkins:
- 'Jenkinsfile'
# "other" = anything not matching the above buckets
other:
- '**'
- '!**/win32/**'
- '!**/gtk/**'
- '!**/cocoa/**'
- '!**/*.md'
- '!Jenkinsfile'
build-linux:
name: Build (Linux)
needs: changes
# push => always; PR => run if gtk changed OR "other" changed (run-everything case)
if: ${{ github.event_name != 'pull_request' || needs.changes.outputs.gtk == 'true' || needs.changes.outputs.other == 'true' }}
strategy:
fail-fast: false
matrix:
java: ['21']
gtk: [gtk3, gtk4]
gdk_backend: [x11, wayland]
exclude:
- gtk: gtk3
gdk_backend: wayland
uses: ./.github/workflows/build.yml
with:
runner: ubuntu-latest
java: ${{ matrix.java }}
native: gtk.linux.x86_64
gtk: ${{ matrix.gtk }}
gdk_backend: ${{ matrix.gdk_backend }}
performance: ${{ contains(github.event.pull_request.labels.*.name, 'performance') }}
runtodotests: ${{ contains(github.event.pull_request.labels.*.name, 'runtodotests') }}
build-windows:
name: Build (Windows)
needs: changes
# push => always; PR => run if win32 changed OR "other" changed (run-everything case)
if: ${{ github.event_name != 'pull_request' || needs.changes.outputs.win32 == 'true' || needs.changes.outputs.other == 'true' }}
strategy:
fail-fast: false
matrix:
java: ['21']
uses: ./.github/workflows/build.yml
with:
runner: windows-latest
java: ${{ matrix.java }}
native: win32.win32.x86_64
performance: ${{ contains(github.event.pull_request.labels.*.name, 'performance') }}
runtodotests: ${{ contains(github.event.pull_request.labels.*.name, 'runtodotests') }}
build-macos:
name: Build (macOS)
needs: changes
# push => always; PR => run if cocoa changed OR "other" changed (run-everything case)
if: ${{ github.event_name != 'pull_request' || needs.changes.outputs.cocoa == 'true' || needs.changes.outputs.other == 'true' }}
strategy:
fail-fast: false
matrix:
java: ['21']
arch: [x86_64, aarch64]
uses: ./.github/workflows/build.yml
with:
runner: ${{ matrix.arch == 'x86_64' && 'macos-15-intel' || 'macos-latest' }}
java: ${{ matrix.java }}
native: cocoa.macosx.${{ matrix.arch }}
performance: ${{ contains(github.event.pull_request.labels.*.name, 'performance') }}
runtodotests: ${{ contains(github.event.pull_request.labels.*.name, 'runtodotests') }}