Skip to content

Fixed bug when removing ancestors of root #75

Fixed bug when removing ancestors of root

Fixed bug when removing ancestors of root #75

name: Standalone Modules
on:
push:
branches:
- master
- dev
- bugfix
- ci_admin
paths-ignore:
- '.travis.yml'
- 'docs/**'
- '**.markdown'
- '**.md'
- 'LICENSE'
pull_request_target:
paths-ignore:
- '.travis.yml'
- 'docs/**'
- '**.markdown'
- '**.md'
- 'LICENSE'
jobs:
build:
name: Build and Test ${{ matrix.modules.friendly_name }} Qt ${{ matrix.qt_ver }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
qt_ver: [5.15.2,6.5.3]
modules:
- { friendly_name: RoleMaskProxyModel, rolemaskproxy: ON, insertproxy: OFF, modelserialisation: OFF, rootindexproxy: OFF, genericmodel: OFF}
- { friendly_name: InsertProxyModel, rolemaskproxy: OFF, insertproxy: ON, modelserialisation: OFF, rootindexproxy: OFF, genericmodel: OFF}
- { friendly_name: ModelSerialisation, rolemaskproxy: OFF, insertproxy: OFF, modelserialisation: ON, rootindexproxy: OFF, genericmodel: OFF}
- { friendly_name: RootIndexProxyModel, rolemaskproxy: OFF, insertproxy: OFF, modelserialisation: OFF, rootindexproxy: ON, genericmodel: OFF}
- { friendly_name: GenericModel, rolemaskproxy: OFF, insertproxy: OFF, modelserialisation: OFF, rootindexproxy: OFF, genericmodel: ON}
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
- name: Git Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Build Directory
shell: pwsh
run: |
mkdir build
cd build
mkdir debug
mkdir release
- name: Install Linux Dependencies
run: |
sudo apt-get update -y
sudo apt-get install libxcb-*
- name: Build
shell: pwsh
run: |
cd build/debug
cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_DEBUG_POSTFIX=d -DBUILD_TESTING=ON -DTEST_OUTPUT_XML=ON -DCMAKE_INSTALL_PREFIX="../installed" -DBUILD_EXAMPLES=ON -DBUILD_GENERICMODEL=${{ matrix.modules.genericmodel }} -DBUILD_ROOTINDEXPROXY=${{ matrix.modules.rootindexproxy }} -DBUILD_ROLEMASKPROXY=${{ matrix.modules.rolemaskproxy }} -DBUILD_INSERTPROXY=${{ matrix.modules.insertproxy }} -DBUILD_MODELSERIALISATION=${{ matrix.modules.modelserialisation }} -DBUILD_SHARED_LIBS=ON ../../
cmake --build .
cmake --build . --target install
cd ../release
cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_TESTING=ON -DTEST_OUTPUT_XML=ON -DCMAKE_INSTALL_PREFIX="../installed" -DBUILD_EXAMPLES=ON -DBUILD_GENERICMODEL=${{ matrix.modules.genericmodel }} -DBUILD_ROOTINDEXPROXY=${{ matrix.modules.rootindexproxy }} -DBUILD_ROLEMASKPROXY=${{ matrix.modules.rolemaskproxy }} -DBUILD_INSERTPROXY=${{ matrix.modules.insertproxy }} -DBUILD_MODELSERIALISATION=${{ matrix.modules.modelserialisation }} -DBUILD_SHARED_LIBS=ON ../../
cmake --build .
cmake --build . --target install
- name: Test
id: runtests
shell: pwsh
run: |
cd build
$OldPath = [Environment]::GetEnvironmentVariable("PATH")
[Environment]::SetEnvironmentVariable("PATH","$pwd/installed/lib;$pwd/installed/bin;$OldPath")
[Environment]::SetEnvironmentVariable("QT_QPA_PLATFORM","offscreen")
cd debug
cmake --build . --target test
cd ../release
cmake --build . --target test
- name: HtmlModelSerialiser output validation
if: ${{ matrix.modules.friendly_name == 'ModelSerialisation' }}
run: |
pip install html5validator
html5validator --root build/TestResults/
- name: Prepare Test Report
if: ${{ always() && (steps.runtests.outcome == 'failure') }}
uses: ./ci/processtestresults
with:
qt-tests: build/TestResults
junit-output: build/TestResults/junitresult.xml
html-output: build/TestResults/testsreport.html
- name: Publish Test Report
if: ${{ always() && (steps.runtests.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.modules.friendly_name }}-Qt${{ matrix.qt_ver }}
path: |
build/TestResults/*.xml
build/TestResults/testsreport.html