Skip to content

Commit 7e158d3

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 7e158d3

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/gtk4.yml

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

0 commit comments

Comments
 (0)