Skip to content

Merge pull request #52 from vserdyuk/master #58

Merge pull request #52 from vserdyuk/master

Merge pull request #52 from vserdyuk/master #58

name: Standalone Modules
on:
push:
branches:
- master
- dev
paths-ignore:
- '.travis.yml'
- 'docs/**'
- '**.markdown'
- '**.md'
- 'LICENSE'
pull_request:
branches:
- master
- dev
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.2.0]
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@v2
with:
version: ${{ matrix.qt_ver }}
- name: Git Checkout
uses: actions/checkout@v2
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-icccm4 libxcb-xkb1 libxcb-icccm4 libxcb-image0 libxcb-render-util0 libxcb-randr0 libxcb-keysyms1 libxcb-xinerama0 libxcb-xinput-dev
- name: ${{ matrix.modules.friendly_name }} Qt${{ matrix.qt_ver }}
shell: pwsh
run: |
cd build/debug
cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_DEBUG_POSTFIX=d -DCMAKE_INSTALL_PREFIX="../installed" -DBUILD_TESTING=ON -DTEST_OUTPUT_XML=ON -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 -DCMAKE_INSTALL_PREFIX="../installed" -DBUILD_TESTING=ON -DTEST_OUTPUT_XML=ON -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: Debug Test
id: rundebugtests
continue-on-error: true
uses: GabrielBB/xvfb-action@v1
with:
working-directory: ./build/debug
run: cmake --build . --target test
- name: Release Test
id: runreleasetests
uses: GabrielBB/xvfb-action@v1
with:
working-directory: ./build/release
run: 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.rundebugtests.outcome == 'failure' || steps.runreleasetests.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.rundebugtests.outcome == 'failure' || steps.runreleasetests.outcome == 'failure') }}
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.modules.friendly_name }}-Qt${{ matrix.qt_ver }}
path: |
build/TestResults/*.xml
build/TestResults/testsreport.html