Skip to content

Commit

Permalink
CI: Add PROBE_ONLY tests to matrix
Browse files Browse the repository at this point in the history
- Also add additional workflow parameter 'matrix.config.tests_with',
  which is set to either 'qt5' or 'qt6' if tests should be run for
  a particular configuration.
- Update unit test 'if:' parameters to use 'matrix.config.tests_with'

- Only perform the "enable gdb attaching" steps if unit tests are
  going to be run.

- Enable unit tests for client-and-ui builds
  • Loading branch information
ferdnyc authored and winterz committed Apr 8, 2024
1 parent 7423f55 commit ab800c7
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,26 @@ jobs:
config:
- preset: ci-dev-client-only-qt5
qt_version: "5.15"
tests_with: qt5

- preset: ci-dev-client-only-qt6
qt_version: "6.5.*"
qt_modules: qtshadertools qtscxml
tests_with: qt6

- preset: ci-dev-client-and-ui-qt5
qt_version: "5.15"
tests_with: qt5

- preset: ci-dev-client-and-ui-qt6
qt_version: "6.5.*"
tests_with: qt6

- preset: ci-dev-probe-only-qt5
qt_version: "5.15"

- preset: ci-dev-probe-only-qt6
qt_version: "6.5.*"

steps:
- name: Install Qt with options and default aqtversion
Expand Down Expand Up @@ -74,13 +84,13 @@ jobs:
run: cmake --build ./build-${{ matrix.config.preset }}

- name: Enable gdb attaching
if: ${{ runner.os == 'Linux' }}
if: ${{ runner.os == 'Linux' && matrix.config.tests_with != '' }}
run: echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope

# Exclude
# quickmaterialtest|quicktexturetest fails because of QT_QUICK_BACKEND=software
- name: Run tests on Linux Qt5 (offscreen)
if: ${{ runner.os == 'Linux' && startsWith(matrix.config.qt_version, '5.') }}
if: ${{ runner.os == 'Linux' && matrix.config.tests_with == 'qt5' }}
run: >
ctest --test-dir ./build-${{ matrix.config.preset }} --output-on-failure
--exclude-regex "quickmaterialtest|quicktexturetest"
Expand All @@ -92,7 +102,7 @@ jobs:
# quickmaterialtest|quicktexturetest fails because of QT_QUICK_BACKEND=software AND QT_QPA_PLATFORM=offscreen
# quickinspectortest|quickinspectortest2 fails at CI, local with 6.2.4 passes
- name: Run tests on Linux Qt6 (offscreen)
if: ${{ runner.os == 'Linux' && startsWith(matrix.config.qt_version, '6.') }}
if: ${{ runner.os == 'Linux' && matrix.config.tests_with == 'qt6' }}
run: >
ctest --test-dir ./build-${{ matrix.config.preset }} --output-on-failure
--exclude-regex "quickmaterialtest|quicktexturetest|quickinspectortest|quickinspectortest2"
Expand All @@ -105,7 +115,7 @@ jobs:
#26 - launchertest (Failed)
#37 - quickinspectortest2 (Failed)
- name: Run tests Qt5 on macOS
if: ${{ runner.os == 'macOS' && startsWith(matrix.config.qt_version, '5.') }}
if: ${{ runner.os == 'macOS' && matrix.config.tests_with == 'qt5' }}
run: >
ctest --test-dir ./build-${{ matrix.config.preset }} --output-on-failure
--exclude-regex "probeabidetectortest|launchertest|quickinspectortest2"
Expand All @@ -116,7 +126,7 @@ jobs:
#32 - clientconnectiontest (Failed)
# quickinspectortest2
- name: Run tests Qt6 on macOS
if: ${{ runner.os == 'macOS' && startsWith(matrix.config.qt_version, '6.') }}
if: ${{ runner.os == 'macOS' && matrix.config.tests_with == 'qt6' }}
run: >
ctest --test-dir ./build-${{ matrix.config.preset }} --output-on-failure
--exclude-regex
Expand All @@ -126,15 +136,15 @@ jobs:
# quicktexturetest
# bindinginspectortest
- name: Qt5 Run tests on Windows
if: ${{ runner.os == 'Windows' && startsWith(matrix.config.qt_version, '5.') }}
if: ${{ runner.os == 'Windows' && matrix.config.tests_with == 'qt5' }}
run: >
ctest --test-dir ./build-${{ matrix.config.preset }} -C 'Release' --output-on-failure
--exclude-regex "quicktexturetest|bindinginspectortest"
# Exclude
# quicktexturetest
- name: Qt6 Run tests on Windows
if: ${{ runner.os == 'Windows' && startsWith(matrix.config.qt_version, '6.') }}
if: ${{ runner.os == 'Windows' && matrix.config.tests_with == 'qt6' }}
run: >
ctest --test-dir ./build-${{ matrix.config.preset }} -C 'Release' --output-on-failure
--exclude-regex "quicktexturetest|launchertest|probesettingstest"
Expand Down

0 comments on commit ab800c7

Please sign in to comment.