Skip to content

Commit 382fe3b

Browse files
committed
Add workflow to run with GTK4 enabled
Currently everything is run with GTK3 by default but we can't tell the current state of affairs with GTK4. This now adds a new action that run the build (and tests) with GTK4 enabled.
1 parent 709f323 commit 382fe3b

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

.github/workflows/gtk4.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: GTK4 Tests
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.ref }}
4+
cancel-in-progress: true
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
env:
13+
SWT_GTK4: 1
14+
15+
jobs:
16+
event_file:
17+
name: "Event File"
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Upload
21+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
22+
with:
23+
name: Event File
24+
path: ${{ github.event_path }}
25+
build:
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
java: [ '17' ]
30+
config:
31+
- { name: Linux, os: ubuntu-latest, native: gtk.linux.x86_64 }
32+
name: Verify ${{ matrix.config.name }} with Java-${{ matrix.java }} on GTK4
33+
runs-on: ${{ matrix.config.os }}
34+
steps:
35+
- name: checkout swt
36+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
with:
38+
fetch-depth: 0 # required for jgit timestamp provider to work
39+
lfs: true
40+
- name: Install Linux requirements
41+
if: ${{ matrix.config.native == 'gtk.linux.x86_64'}}
42+
run: |
43+
sudo apt-get update -qq
44+
sudo apt-get install -qq -y libgtk-3-dev libgtk-4-dev freeglut3-dev webkit2gtk-driver
45+
- name: Set up Java ${{ matrix.java }}
46+
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
47+
with:
48+
java-version: ${{ matrix.java }}
49+
distribution: 'temurin'
50+
cache: maven
51+
- name: Set up Maven
52+
uses: stCarolas/setup-maven@v5
53+
with:
54+
maven-version: 3.9.9
55+
- name: Build
56+
run: >-
57+
xvfb-run
58+
mvn --batch-mode -V -U -e
59+
--threads 1C
60+
-DforkCount=1
61+
--fail-at-end
62+
-DskipNativeTests=false
63+
-DfailIfNoTests=false
64+
-Dtycho.baseline.replace=none
65+
clean install
66+
- name: Upload Test Results for ${{ matrix.config.name }} / Java-${{ matrix.java }}
67+
if: always()
68+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
69+
with:
70+
name: test-results-gtk4-${{ matrix.config.native }}-java${{ matrix.java }}
71+
if-no-files-found: warn
72+
path: |
73+
${{ github.workspace }}/**/target/surefire-reports/*.xml
74+
${{ github.workspace }}/**/*.dumpstream
75+
${{ github.workspace }}/**/*.dump

0 commit comments

Comments
 (0)