Fixed bug when removing ancestors of root #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main Platforms | |
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.platforms.friendly_name }} Qt${{ matrix.qt_version.qt_ver }} dll${{ matrix.shared_lib }} NoGui${{ matrix.no_gui }} NoWidgets${{ matrix.no_widgets }} ManyRoles${{ matrix.many_roles }} | |
runs-on: ${{ matrix.platforms.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
qt_version: | |
- { qt_ver: 5.15.2, mingw_arch: win64_mingw81 } | |
- { qt_ver: 6.5.3, mingw_arch: win64_mingw } | |
shared_lib: [ON,OFF] | |
no_widgets: [OFF,ON] | |
no_gui: [OFF,ON] | |
many_roles: [OFF,ON] | |
platforms: | |
- { os: windows-latest, generator: "NMake Makefiles", friendly_name: MSVC } | |
- { os: windows-latest, generator: "MinGW Makefiles", friendly_name: MinGW } | |
- { os: ubuntu-latest, generator: "Unix Makefiles", friendly_name: Ubuntu } | |
- { os: macos-latest, generator: "Unix Makefiles", friendly_name: MacOS } | |
exclude: | |
- no_gui: ON | |
no_widgets: OFF | |
steps: | |
- name: Install Qt | |
if: ${{ matrix.platforms.friendly_name != 'MinGW' }} | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ matrix.qt_version.qt_ver }} | |
- name: Install Qt MinGW | |
if: ${{ matrix.platforms.friendly_name == 'MinGW' }} | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ matrix.qt_version.qt_ver }} | |
arch: ${{ matrix.qt_version.mingw_arch }} | |
- 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: Set up MSVC environment | |
if: ${{ matrix.platforms.friendly_name == 'MSVC' }} | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Upgrade MinGW | |
if: ${{ matrix.platforms.friendly_name == 'MinGW' }} | |
run: | | |
choco upgrade mingw | |
- name: Install Linux Dependencies | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install libxcb-* | |
export PATH=$PATH:$PWD/build/installed/lib | |
export PATH=$PATH:$PWD/build/installed/bin | |
- name: Build | |
shell: pwsh | |
run: | | |
cd build/debug | |
cmake -G"${{ matrix.platforms.generator }}" -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_DEBUG_POSTFIX=d -DBUILD_TESTING=ON -DTEST_OUTPUT_XML=ON -DBUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=${{ matrix.shared_lib }} -DCMAKE_INSTALL_PREFIX="../installed" -DNO_WIDGETS=${{ matrix.no_widgets }} -DNO_GUI=${{ matrix.no_gui }} -DOPTIMISE_FOR_MANY_ROLES=${{ matrix.many_roles }} ../../ | |
cmake --build . | |
cmake --build . --target install | |
cd ../release | |
cmake -G"${{ matrix.platforms.generator }}" -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_TESTING=ON -DTEST_OUTPUT_XML=ON -DBUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=${{ matrix.shared_lib }} -DCMAKE_INSTALL_PREFIX="../installed" -DNO_WIDGETS=${{ matrix.no_widgets }} -DNO_GUI=${{ matrix.no_gui }} -DOPTIMISE_FOR_MANY_ROLES=${{ matrix.many_roles }} ../../ | |
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") | |
if([Environment]::GetEnvironmentVariable("RUNNER_OS") -eq "Linux"){ | |
[Environment]::SetEnvironmentVariable("QT_QPA_PLATFORM","offscreen") | |
} | |
cd debug | |
cmake --build . --target test | |
cd ../release | |
cmake --build . --target test | |
- name: HtmlModelSerialiser output validation | |
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.platforms.friendly_name }}-Qt${{ matrix.qt_version.qt_ver }}-Shared${{ matrix.shared_lib }}-NoGui${{ matrix.no_gui }}-NoWidgets${{ matrix.no_widgets }}-ManyRoles${{ matrix.many_roles }} | |
path: | | |
build/TestResults/*.xml | |
build/TestResults/testsreport.html |