mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-02 05:12:02 +00:00
[github] tests: improve test coverage by testing all build variants
This commit is contained in:
44
.github/workflows/build.yml
vendored
44
.github/workflows/build.yml
vendored
@@ -21,6 +21,7 @@ jobs:
|
|||||||
- name: Install client dependencies
|
- name: Install client dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install \
|
sudo apt-get install \
|
||||||
|
weston libgtest-dev \
|
||||||
libdw-dev libunwind-dev \
|
libdw-dev libunwind-dev \
|
||||||
libspice-protocol-dev nettle-dev \
|
libspice-protocol-dev nettle-dev \
|
||||||
libgl-dev libgles-dev \
|
libgl-dev libgles-dev \
|
||||||
@@ -43,6 +44,7 @@ jobs:
|
|||||||
-DCMAKE_LINKER:FILEPATH=/usr/bin/ld \
|
-DCMAKE_LINKER:FILEPATH=/usr/bin/ld \
|
||||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||||
-DENABLE_LIBDECOR=${{ matrix.wayland_shell == 'libdecor' }} \
|
-DENABLE_LIBDECOR=${{ matrix.wayland_shell == 'libdecor' }} \
|
||||||
|
-DENABLE_TESTS=ON \
|
||||||
-DOPTIMIZE_FOR_NATIVE=OFF \
|
-DOPTIMIZE_FOR_NATIVE=OFF \
|
||||||
..
|
..
|
||||||
- name: Build client
|
- name: Build client
|
||||||
@@ -54,6 +56,14 @@ jobs:
|
|||||||
- name: Check GL function calls
|
- name: Check GL function calls
|
||||||
if: matrix.compiler.cc == 'clang'
|
if: matrix.compiler.cc == 'clang'
|
||||||
run: WAYLAND_SHELL='${{ matrix.wayland_shell }}' ./gl-check
|
run: WAYLAND_SHELL='${{ matrix.wayland_shell }}' ./gl-check
|
||||||
|
- name: Package client build
|
||||||
|
run: tar -cf client-build.tar -C client build
|
||||||
|
- name: Upload client build
|
||||||
|
uses: actions/upload-artifact@v6
|
||||||
|
with:
|
||||||
|
name: client-build-${{ matrix.compiler.cc }}-${{ matrix.wayland_shell }}-${{ matrix.build_type }}
|
||||||
|
path: client-build.tar
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
module:
|
module:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -238,7 +248,16 @@ jobs:
|
|||||||
make dirhtml SPHINXOPTS='-b spelling -W' -j$(nproc)
|
make dirhtml SPHINXOPTS='-b spelling -W' -j$(nproc)
|
||||||
|
|
||||||
client-tests:
|
client-tests:
|
||||||
|
needs: client
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
compiler:
|
||||||
|
- {cc: gcc, cxx: g++}
|
||||||
|
- {cc: clang, cxx: clang++}
|
||||||
|
wayland_shell: [xdg-shell, libdecor]
|
||||||
|
build_type: [Release, Debug]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
@@ -249,6 +268,7 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install \
|
sudo apt-get install \
|
||||||
weston libgtest-dev libgl1-mesa-dri \
|
weston libgtest-dev libgl1-mesa-dri \
|
||||||
|
libdecor-0-dev libdbus-1-dev \
|
||||||
libdw-dev libunwind-dev \
|
libdw-dev libunwind-dev \
|
||||||
libspice-protocol-dev nettle-dev \
|
libspice-protocol-dev nettle-dev \
|
||||||
libgl-dev libgles-dev \
|
libgl-dev libgles-dev \
|
||||||
@@ -257,25 +277,23 @@ jobs:
|
|||||||
libwayland-dev libxkbcommon-dev libfontconfig-dev \
|
libwayland-dev libxkbcommon-dev libfontconfig-dev \
|
||||||
libsamplerate0-dev libpipewire-0.3-dev libpulse-dev
|
libsamplerate0-dev libpipewire-0.3-dev libpulse-dev
|
||||||
|
|
||||||
- name: Configure
|
- name: Download client build
|
||||||
run: |
|
uses: actions/download-artifact@v6
|
||||||
cmake -S client -B client/build-client-tests \
|
with:
|
||||||
-DOPTIMIZE_FOR_NATIVE=OFF \
|
name: client-build-${{ matrix.compiler.cc }}-${{ matrix.wayland_shell }}-${{ matrix.build_type }}
|
||||||
-DENABLE_LIBDECOR=OFF \
|
path: client-build
|
||||||
-DENABLE_TESTS=ON
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build client/build-client-tests --parallel
|
|
||||||
|
|
||||||
- name: Run client tests
|
- name: Run client tests
|
||||||
|
id: tests
|
||||||
run: |
|
run: |
|
||||||
ctest --test-dir client/build-client-tests
|
tar -xf client-build/client-build.tar -C client
|
||||||
|
ctest --test-dir client/build --output-on-failure
|
||||||
|
|
||||||
- name: Upload client test failures
|
- name: Upload client test failures
|
||||||
if: failure()
|
if: failure() && steps.tests.outcome == 'failure'
|
||||||
uses: actions/upload-artifact@v6
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: client-test-failures
|
name: client-test-failures-${{ matrix.compiler.cc }}-${{ matrix.wayland_shell }}-${{ matrix.build_type }}
|
||||||
path: |
|
path: |
|
||||||
client/build-client-tests/Testing/
|
client/build/Testing/
|
||||||
/tmp/lg-render-case.*
|
/tmp/lg-render-case.*
|
||||||
|
|||||||
Reference in New Issue
Block a user