From 8fc5ee53737b548b17501e254880991ef099e8c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Sat, 14 Dec 2024 09:07:39 +0100 Subject: [PATCH] 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. --- .github/workflows/gtk4.yml | 72 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/gtk4.yml diff --git a/.github/workflows/gtk4.yml b/.github/workflows/gtk4.yml new file mode 100644 index 0000000000..0007ec471e --- /dev/null +++ b/.github/workflows/gtk4.yml @@ -0,0 +1,72 @@ +name: GTK4 Tests +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + SWT_GTK4: 1 + +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: Verify ${{ matrix.config.name }} with Java-${{ matrix.java }} on GTK4 + 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: true + - 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: 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: >- + xvfb-run + mvn --batch-mode -V -U -e + --threads 1C + -DforkCount=1 + --fail-at-end + -DskipNativeTests=false + -DfailIfNoTests=false + clean install + - 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