Skip to content

Commit

Permalink
Updating CI Script
Browse files Browse the repository at this point in the history
  • Loading branch information
VSRonin committed Mar 7, 2024
1 parent 81b64eb commit a063465
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 119 deletions.
52 changes: 25 additions & 27 deletions .github/workflows/buildstandalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ on:
branches:
- master
- dev
- bugfix
- ci_admin
paths-ignore:
- '.travis.yml'
- 'docs/**'
- '**.markdown'
- '**.md'
- 'LICENSE'
pull_request:
branches:
- master
- dev
pull_request_target:
paths-ignore:
- '.travis.yml'
- 'docs/**'
Expand All @@ -27,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
qt_ver: [5.15.2,6.2.0]
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}
Expand All @@ -36,11 +35,11 @@ jobs:
- { friendly_name: GenericModel, rolemaskproxy: OFF, insertproxy: OFF, modelserialisation: OFF, rootindexproxy: OFF, genericmodel: ON}
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
- name: Git Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Build Directory
Expand All @@ -53,46 +52,45 @@ jobs:
- 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 }}
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 -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 -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 -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 -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: 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: 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.rundebugtests.outcome == 'failure' || steps.runreleasetests.outcome == 'failure') }}
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.rundebugtests.outcome == 'failure' || steps.runreleasetests.outcome == 'failure') }}
uses: actions/upload-artifact@v2
if: ${{ always() && (steps.runtests.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.modules.friendly_name }}-Qt${{ matrix.qt_ver }}
path: |
Expand Down
56 changes: 22 additions & 34 deletions .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ on:
branches:
- master
- dev
- bugfix
- ci_admin
paths-ignore:
- '.travis.yml'
- 'docs/**'
- '**.markdown'
- '**.md'
- 'LICENSE'
pull_request:
branches:
- master
- dev
pull_request_target:
paths-ignore:
- '.travis.yml'
- 'docs/**'
Expand All @@ -22,12 +21,14 @@ on:
- 'LICENSE'
jobs:
build:
name: Build and Test ${{ matrix.platforms.friendly_name }} Qt${{ matrix.qt_ver }} dll${{ matrix.shared_lib }} NoGui${{ matrix.no_gui }} NoWidgets${{ matrix.no_widgets }} ManyRoles${{ matrix.many_roles }}
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_ver: [5.15.2,6.2.0]
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]
Expand All @@ -43,17 +44,17 @@ jobs:
steps:
- name: Install Qt
if: ${{ matrix.platforms.friendly_name != 'MinGW' }}
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
version: ${{ matrix.qt_version.qt_ver }}
- name: Install Qt MinGW
if: ${{ matrix.platforms.friendly_name == 'MinGW' }}
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
arch: win64_mingw81
version: ${{ matrix.qt_version.qt_ver }}
arch: ${{ matrix.qt_version.mingw_arch }}
- name: Git Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Build Directory
Expand All @@ -70,10 +71,10 @@ jobs:
if: ${{ runner.os == 'Linux' }}
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
sudo apt-get install libxcb-*
export PATH=$PATH:$PWD/build/installed/lib
export PATH=$PATH:$PWD/build/installed/bin
- name: ${{ matrix.platforms.friendly_name }} Qt${{ matrix.qt_ver }} Static:${{ matrix.shared_lib }} No Gui:${{ matrix.no_gui }} No Widgets:${{ matrix.no_widgets }} Many Roles:${{ matrix.many_roles }}
- name: Build
shell: pwsh
run: |
cd build/debug
Expand All @@ -84,29 +85,16 @@ jobs:
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: Linux Debug Test
if: ${{ runner.os == 'Linux' }}
id: runlinuxdebugtests
continue-on-error: true
uses: GabrielBB/xvfb-action@v1
with:
working-directory: ./build/debug
run: cmake --build . --target test
- name: Linux Release Test
if: ${{ runner.os == 'Linux' }}
id: runlinuxreleasetests
uses: GabrielBB/xvfb-action@v1
with:
working-directory: ./build/release
run: cmake --build . --target test
- name: Test
if: ${{ runner.os != 'Linux' }}
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
Expand All @@ -116,17 +104,17 @@ jobs:
pip install html5validator
html5validator --root build/TestResults/
- name: Prepare Test Report
if: ${{ always() && (steps.runtests.outcome == 'failure' || steps.runlinuxdebugtests.outcome == 'failure' || steps.runlinuxreleasetests.outcome == 'failure') }}
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' || steps.runlinuxdebugtests.outcome == 'failure' || steps.runlinuxreleasetests.outcome == 'failure') }}
uses: actions/upload-artifact@v2
if: ${{ always() && (steps.runtests.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platforms.friendly_name }}-Qt${{ matrix.qt_ver }}-Shared${{ matrix.shared_lib }}-NoGui${{ matrix.no_gui }}-NoWidgets${{ matrix.no_widgets }}-ManyRoles${{ matrix.many_roles }}
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
11 changes: 5 additions & 6 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
branches:
- master
- dev
- bugfix
- ci_admin
paths-ignore:
- '.travis.yml'
- '.appveyor.yml'
Expand All @@ -14,10 +16,7 @@ on:
- 'LICENSE'
- '**CMakeLists.txt'
- 'cmake/**'
pull_request:
branches:
- master
- dev
pull_request_target:
paths-ignore:
- '.travis.yml'
- '.appveyor.yml'
Expand All @@ -33,6 +32,6 @@ jobs:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/clang-format-action@v3.2.0
uses: jidicula/clang-format-action@v4.11.0
28 changes: 15 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ on:
- "*"
jobs:
release:
name: ${{ matrix.platforms.friendly_name }} Qt ${{ matrix.qt_ver }} Release
name: ${{ matrix.platforms.friendly_name }} Qt ${{ matrix.qt_version.qt_ver }} Release
runs-on: ${{ matrix.platforms.os }}
strategy:
max-parallel: 1
matrix:
qt_ver: [5.15.2,6.2.0]
qt_version:
- { qt_ver: 5.15.2, mingw_arch: win64_mingw81 }
- { qt_ver: 6.5.3, mingw_arch: win64_mingw }
platforms:
- { os: windows-latest, generator: "NMake Makefiles", debug_postfix: d, compression: ZIP, friendly_name: MSVC }
- { os: windows-latest, generator: "MinGW Makefiles", debug_postfix: d, compression: ZIP, friendly_name: MinGW }
Expand All @@ -19,17 +21,17 @@ jobs:
steps:
- name: Install Qt
if: ${{ matrix.platforms.friendly_name != 'MinGW' }}
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
version: ${{ matrix.qt_version.qt_ver }}
- name: Install Qt MinGW
if: ${{ matrix.platforms.friendly_name == 'MinGW' }}
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
arch: win64_mingw81
version: ${{ matrix.qt_version.qt_ver }}
arch: ${{ matrix.qt_version.mingw_arch }}
- name: Git Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Build Directory
Expand All @@ -47,8 +49,8 @@ jobs:
if: ${{ runner.os == 'Linux' }}
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: Build Debug ${{ matrix.platforms.friendly_name }} Qt ${{ matrix.qt_ver }}
sudo apt-get install libxcb-*
- name: Build Debug ${{ matrix.platforms.friendly_name }} Qt ${{ matrix.qt_version.qt_ver }}
if: ${{ runner.os != 'Linux' }}
run: |
cd build/shared-Debug
Expand All @@ -57,7 +59,7 @@ jobs:
cd ../static-Debug
cmake -G"${{ matrix.platforms.generator }}" -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_STATIC_LIBRARY_SUFFIX=_static -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_DEBUG_POSTFIX=${{ matrix.platforms.debug_postfix }} -DCMAKE_INSTALL_PREFIX="../installed" ../../
cmake --build .
- name: Build Release ${{ matrix.platforms.friendly_name }} Qt ${{ matrix.qt_ver }}
- name: Build Release ${{ matrix.platforms.friendly_name }} Qt ${{ matrix.qt_version.qt_ver }}
run: |
cd build/shared-Release
cmake -G"${{ matrix.platforms.generator }}" -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX="../installed" ../../
Expand All @@ -83,9 +85,9 @@ jobs:
needs: release
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
- name: Git Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Build Directory
Expand Down
Loading

0 comments on commit a063465

Please sign in to comment.