Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Integrating Qt Test and GitHub Actions

Integrating Qt Test and GitHub Actions

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 856 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • VRoninV Offline
    VRoninV Offline
    VRonin
    wrote on last edited by
    #1

    If anyone is interested I set up an example project to integrate test reporting of Qt Tests in Github Actions.
    Github Actions doesn't have a native test reporting system so what this example does is, in case of a test failure, it creates an archive artifact containing the raw xml test results, a combined xml file you can fee into any system that is compatible with the junit format as well as a pretty-formatted html report
    The repository can be found here you can check the latest workflow for an example of the output.

    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
    ~Napoleon Bonaparte

    On a crusade to banish setIndexWidget() from the holy land of Qt

    K 1 Reply Last reply
    1
    • VRoninV VRonin

      If anyone is interested I set up an example project to integrate test reporting of Qt Tests in Github Actions.
      Github Actions doesn't have a native test reporting system so what this example does is, in case of a test failure, it creates an archive artifact containing the raw xml test results, a combined xml file you can fee into any system that is compatible with the junit format as well as a pretty-formatted html report
      The repository can be found here you can check the latest workflow for an example of the output.

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @VRonin

      Thanks for sharing your experience.

      I have tried immediately. Unfortunately it is the first that I seriously try CMake. I have updated in teh meantime to most recent CMake as installable through maintenanceTool.

      Now probably a really stupid question. Is nmake required as well?

      Here is the output under "general messages" when trying to run CMake

      Running C:\Qt\Tools\CMake_64\bin\cmake.exe -S E:/Source/Android/ExampleQtTestGithubActions-master -B C:/Users/inposition/AppData/Local/Temp/QtCreator-chfUmI/qtc-cmake-opGBqYLY in C:\Users\inposition\AppData\Local\Temp\QtCreator-chfUmI\qtc-cmake-opGBqYLY.
      -- The CXX compiler identification is GNU 8.1.0
      -- Detecting CXX compiler ABI info
      CMake Error: Generator: execution of make failed. Make command was: nmake /nologo cmTC_668d7\fast && 
      -- Detecting CXX compiler ABI info - failed
      -- Check for working CXX compiler: C:/Qt/Tools/mingw810_64/bin/g++.exe
      CMake Error: Generator: execution of make failed. Make command was: nmake /nologo cmTC_af41d\fast && 
      -- Check for working CXX compiler: C:/Qt/Tools/mingw810_64/bin/g++.exe - broken
      CMake Error at C:/Qt/Tools/CMake_64/share/cmake-3.19/Modules/CMakeTestCXXCompiler.cmake:59 (message):
        The C++ compiler
      
          "C:/Qt/Tools/mingw810_64/bin/g++.exe"
      
        is not able to compile a simple test program.
      
        It fails with the following output:
      
          Change Dir: C:/Users/inposition/AppData/Local/Temp/QtCreator-chfUmI/qtc-cmake-opGBqYLY/CMakeFiles/CMakeTmp
          
          Run Build Command(s):nmake /nologo cmTC_af41d\fast && Das System kann die angegebene Datei nicht finden
          Generator: execution of make failed. Make command was: nmake /nologo cmTC_af41d\fast && 
           
      
        CMake will not be able to correctly generate this project.
      Call Stack (most recent call first):
        CMakeLists.txt:2 (project)
      
      -- Configuring incomplete, errors occurred!
      See also "C:/Users/inposition/AppData/Local/Temp/QtCreator-chfUmI/qtc-cmake-opGBqYLY/CMakeFiles/CMakeOutput.log".
      See also "C:/Users/inposition/AppData/Local/Temp/QtCreator-chfUmI/qtc-cmake-opGBqYLY/CMakeFiles/CMakeError.log".
      CMake process exited with exit code 1.
      Elapsed time: 00:01.
      

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by VRonin
        #3

        On windows CMake defaults to nmake generator regardless of the compiler used. You need to pass -G"MinGW Makefiles" as an additional argument to tell it to use MinGW (or set the generator to MinGW Makefiles in the settings of Qt Creator tools-Options->kits->select the kit->CMake Generator)

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved