-
Notifications
You must be signed in to change notification settings - Fork 139
94 lines (91 loc) · 3.45 KB
/
maven.yml
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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: SWT Matrix Build
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: Event File
path: ${{ github.event_path }}
build:
strategy:
fail-fast: false
matrix:
java: [ '17' ]
config:
- { name: Linux, os: ubuntu-latest, native: gtk.linux.x86_64 }
- { name: Windows, os: windows-latest, native: win32.win32.x86_64 }
- { name: MacOS x86, os: macos-13, native: cocoa.macosx.x86_64 }
- { name: MacOS ARM, os: macos-latest, native: cocoa.macosx.aarch64 }
name: Verify ${{ matrix.config.name }} with Java-${{ matrix.java }}
runs-on: ${{ matrix.config.os }}
steps:
- name: checkout swt
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # required for jgit timestamp provider to work
lfs: false # lfs-pull is not necessary, the natives are re-build in each run
- name: Install Linux requirements
if: ${{ matrix.config.native == 'gtk.linux.x86_64'}}
run: |
sudo apt-get update -qq
sudo apt-get install -qq -y libgtk-3-dev libgtk-4-dev freeglut3-dev webkit2gtk-driver
- name: Pull large static Windows binaries
if: ${{ matrix.config.native == 'win32.win32.x86_64'}}
run: |
git lfs pull --include='/binaries/org.eclipse.swt.win32.win32.x86_64/WebView2Loader.dll'
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: maven
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.9
- name: Build
run: >-
${{ contains(matrix.config.native, 'linux') && 'xvfb-run' || '' }}
mvn --batch-mode -V -U -e
--threads 1C
-DforkCount=1
'-Dnative=${{ matrix.config.native }}'
-Papi-check
'-Dtycho.baseline.replace=none'
--fail-at-end
-DskipNativeTests=false
-DfailIfNoTests=false
clean install
- name: Performance tests
if: contains(github.event.pull_request.labels.*.name, 'performance')
working-directory: tests/org.eclipse.swt.tests
run: >-
${{ contains(matrix.config.native, 'linux') && 'xvfb-run' || '' }}
mvn --batch-mode -V -U -e
-DforkCount=1
--fail-at-end
-DskipNativeTests=true
-DfailIfNoTests=true
-Dtest=PerformanceTests
integration-test
- name: Upload Test Results for ${{ matrix.config.name }} / Java-${{ matrix.java }}
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: test-results-${{ matrix.config.native }}-java${{ matrix.java }}
if-no-files-found: warn
path: |
${{ github.workspace }}/**/target/surefire-reports/*.xml