C /Qt5 cross platform qmake subdirs example for desktop apps.
Implemented as one app/executable linked to multiple libs (modules).
This is a C /Qt5 example with automated unit test execution (catch). Tests are implemented in executables (subdirs) which are executed during compilation automatically, compilation fails a test fails. This is the ideal precondition for test driven development. When using gcc, local lcov test coverage report generation is supported. Semantic versioning combined with continuous artifact deployment is build on top while using free continuous integration services (travis, gitlab & appvoyer) for open source development.
This project contains examples for:
- automated test execution with qmake (local)
- test coverage report creation with lcov (local)
- semantic versioning using git tags (local & CI)
- cross platform packaging (deb, AppImage, dmg & exe)
- cross platform CI builds (linux, macOS & windows)
- continuous artifacts & release deployment (CI/CD)
Download latest development version here:
- cuteproject-linux.x86_64.AppImage
- cuteproject.ubuntu14.04_amd64.deb
- cuteproject.ubuntu16.04_amd64.deb
- cuteproject.macOS-latest.dmg
- cuteproject.windows_x86.zip
Note: This program does nothing famous. It just pops up a C /Qt5 desktop UI which shall work cross platform. It's meant to be an example for a DevOps-driven desktop UI development. That's its only use case.
To successfully build on debian based OS:
sudo apt-get install qt5-default qt5-qmake gdb
To successfully build on macOS:
brew update
brew install qt5
export PATH=$(brew --prefix)/opt/qt5/bin:$PATH
To successfully build on windows (install Qt & MSVC):
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
set PATH=%PATH%;C:\Qt\5.9\msvc2015\bin;C:\Qt\Tools\QtCreator\bin;
Note: Shall also work with other Qt or MSVC versions ..
qmake
make
Note: On windows use jom
instead of make
The cuteproject app uses semantic versioning.
Git tags on the master branch are used to mark specific versions. Git tags must have the form 1.2.3 (not prefixed with v) and github automatically creates releases. To automate artifacts versioning pkgs/version.sh
utilizes git describe --long
to create semantic version numbers. To set the apps executable version information properly, the version information from git is additionally generated by qmake within app/gitversion.pri
(refer to everythingfrontend).
Before tagging a new version the debian pkgs/deb/app/changelog
has to be updated manually!
Note: Libraries & tests are not versioned separately!
This project contains scripts for automated packaging. All scripts are tested under linux besides the macOS.sh script - it's implemented for Mac OS X only. All of these scripts can be called locally to produce the following build artifacts:
pkgs/debian.sh
creates a debian packagepkgs/appimage.sh
creates an .AppImagepkgs/macOS.sh
creates a .dmg image
Windows packaging is actually only implemented within .appvoyer.yml!
Note: Refer to the CI configurations to check detailed packaging information & dependencies.
Development and testing is mainly focused on linux. Windows and Mac OS X are additionally used to verify builds and to make deployments. There are three different CI platforms configured for this purpose (gitlab, travis & appvoyer). The project always builds on linux, windows and Mac OS X. Artifacts for these systems are continuously deployed.
The following build systems are triggered continuously:
Gitlab (git push
triggered weekly) :: Artifact = [.deb & .AppImage]
- Ubuntu:devel (build & test)
- Ubuntu:rolling (build & test)
- Ubuntu:latest (build, test & deploy, lcov)
- Ubuntu:trusty (build, test & deploy)
- Ubuntu:xenial (build, test & deploy)
Travis (git push
triggered) :: Artifact = Apple Disk Image [.dmg]
- Ubuntu:trusty (gcc -> build & test, codecov)
- Ubuntu:trusty (clang -> build & test, codecov)
- Mac OS X (gcc -> build, test & deploy)
- Mac OS X (clang -> build, test & deploy)
AppVoyer (git push
triggered) :: Artifact = Windows Executable [.exe]
- Windows x64 (Visual Studio -> build & deploy)
- Windows x64 (MinGW -> failing!)
Note: Refer to the configuration files for more detailed information.
Development takes place on github while the repository is mirrored to gitlab for deployments ..
Pull requests are welcome - for contribution checkout issues.