Appveyor is timing out

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Appveyor is timing out

Post by abdullah »

wmayer wrote: Fri May 03, 2019 12:06 pm ...
Most probably:
git commit 3a133ee0cbd3a8fc0b733f52493451268e3d279b

is causing:

AppVeyor CI (MSVC2013) to show a compilation error:

Code: Select all

 C:\projects\freecad\FreeCADLibs\include\boost/geometry/algorithms/detail/overlay/visit_info.hpp(31): error C2059: syntax error : 'constant' [C:\projects\freecad\build\src\Mod\Path\App\Path.vcxproj]
 C:\projects\freecad\FreeCADLibs\include\boost/geometry/algorithms/detail/overlay/visit_info.hpp(31): error C2238: unexpected token(s) preceding ';' [C:\projects\freecad\build\src\Mod\Path\App\Path.vcxproj]
Full log:
https://ci.appveyor.com/project/yorikva ... ur2uw1s13y

The same passes with Travis CI (MSVC2017):
https://travis-ci.org/FreeCAD/FreeCAD/b ... tification

Maybe you take a look?
wmayer
Founder
Posts: 20302
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Appveyor is timing out

Post by wmayer »

It probably depends on the used boost version. For my local VS2017 it fails for the same reason.

Inside visit_info.hpp there is the class declaration of visit_info which has a static constant NONE. When including Area.h then over some cascades it includes kurve\geometry.h that has a global define of NONE.

So this define causes a name collision and makes the compilation to fail when the boost class is read-in.
wmayer
Founder
Posts: 20302
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Appveyor is timing out

Post by wmayer »

I have reverted the git commit 3a133ee0 because libarea/Area.h is included exactly in one file only from within PathApp and then it's pointless anyway to add it to the PCH.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Appveyor is timing out

Post by abdullah »

wmayer wrote: Sat May 04, 2019 10:38 am I have reverted the git commit 3a133ee0 because libarea/Area.h is included exactly in one file only from within PathApp and then it's pointless anyway to add it to the PCH.
Many thanks for the explanation and the fix! :)
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Appveyor is timing out

Post by abdullah »

AppVeyor has been dragging severely lately and I have added clcache to it:

Code: Select all

clcache statistics:
  current cache dir         : Disk cache at C:\Users\appveyor\clcache
  cache size                : 779,266,400 bytes
  maximum cache size        : 1,073,741,824 bytes
  cache entries             : 1122
  cache hits                : 0
  cache misses
    total                      : 1122
    evicted                    : 0
    header changed             : 0
    source changed             : 1122
  passed to real compiler
    called w/ invalid argument : 0
    called for preprocessing   : 0
    called for linking         : 0
    called for external debug  : 80
    called w/o source          : 0
    called w/ multiple sources : 0
    called w/ PCH              : 18
Note: AppVeyor's cache is local to the datacenter, while Travis' is external.

Let's see if there are improvements.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Appveyor is timing out

Post by abdullah »

Seems working:
https://ci.appveyor.com/project/yorikva ... s/24314470


Job name Tests Duration
Environment: generator=Visual Studio 12 Win64, ARCH=Win64, Compiler=MSVC2013 21 min 13 sec
Environment: generator=Visual Studio 12, ARCH=Win32, Compiler=MSVC2013 19 min 28 sec
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Appveyor is timing out

Post by abdullah »

I have not had much time to do actual modifications lately.

Clcache in AppVeyor

I have enabled clcache in AppVeyor, and I ran into the problem described by saso: Appveyor by default does not record the atime, this is the access time of the file, for performance reasons. Clcache relies on atime to determine the old cache items, which it "auto-cleans". I found a solution from the bitcoin guys to enable atime during compilation.

I have not found documentation of the auto-clean feature, but mere references to the fact there is one. But it seems to be working.

Code: Select all

clcache statistics:
  current cache dir         : Disk cache at C:\Users\appveyor\clcache
  cache size                : 1,040,653,217 bytes
  maximum cache size        : 1,073,741,824 bytes
  cache entries             : 1462
  cache hits                : 1136
  cache misses
    total                      : 1
    evicted                    : 0
    header changed             : 1
    source changed             : 0
  passed to real compiler
    called w/ invalid argument : 0
    called for preprocessing   : 0
    called for linking         : 0
    called for external debug  : 0
    called w/o source          : 0
    called w/ multiple sources : 0
    called w/ PCH              : 18
AppVeyor builds

In AppVeyor with have 1 worker, 60 minutes limit and 1 GB cache (the result above gets compressed and we are somehow fitting the 1 GB even though we build for both 32 and 64 bits). The cache is local to the datacenter. This is ok for a full compilation taking about 57 minutes with MSVC2013. With the clcache improvements, most compilations (it depends on the changes) go down to around 21 minutes (2 minutes downloading libraries and clcache, 1 minute cmake, 17 minutes msbuild, 1 minute running tests). But this requires a full compilation first (or that timeout compilations save the cache, which might be possible).

I would like to move from MSVC2013 to MSVC2017 to have full c++11 support. However, MSVC2017 between 2-2.5 times slower than MSVC2013 (according to Travis tests).

I have found this thread:
https://github.com/appveyor/ci/issues/517

People are asking here for extended time in AppVeyor and getting successful at getting at least 90 minutes. I am not sure if "Shrek's cat's eyes" could get sufficient build time for a full build.

AppVeyor is fast, but having only one worker and making 32 and 64 bit builds with little changes still means waiting around 40 minutes, as the 32 bits build starts after the 64 bit build is finished. This is just a note to consider.

PCH

For reducing the build time, we should continue PCH. I am not sure how much it is possible to optimize with PCH, but I think we should aim to project-wide PCH.

Travis Windows

In Travis we have many workers (concurrent jobs) and 2h 30 minutes of build time. Travis is treating us like kings. Cache is located outside the datacenter.

We are running it with clcache too:

Code: Select all

clcache statistics:
  current cache dir         : Disk cache at C:\Users\travis\clcache
  cache size                : 718,772,447 bytes
  maximum cache size        : 1,073,741,824 bytes
  cache entries             : 1915
  cache hits                : 1120
  cache misses
    total                      : 26
    evicted                    : 0
    header changed             : 1
    source changed             : 25
  passed to real compiler
    called w/ invalid argument : 0
    called for preprocessing   : 0
    called for linking         : 0
    called for external debug  : 0
    called w/o source          : 0
    called w/ multiple sources : 0
    called w/ PCH              : 18
Running one typical MSVC2017 build (x64) with clcache takes about 1 hour. The first compilation took about 2 hours 20 minutes, before PCH was introduced.

There is still a big problem to solve: Tests are not completely run and I am not sure if it would return "failure" if a test fails.

I will be working on this problem next.

Travis build times

Linux gcc builds of typical PRs take around 7 minutes to complete.
Linux clang builds sometimes take a little bit more, sometimes the same as gcc. Not sure what is the reason.
OSX builds take around 2 hours to complete. Not sure if something like caching can be done here.

The "Python 3.7" build is systematically failing. I do not know if something may be done about this. I am not sure exactly what this build is:
https://travis-ci.org/FreeCAD/FreeCAD/builds/529083852
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Appveyor is timing out

Post by abdullah »

I have been running problems with the test suite failing.

I posted here to get more exposure:
https://forum.freecadweb.org/viewtopic. ... 15#p306618

Kurt inspired me to start cutting away tests until I discover which one is the one making Travis fail.

It will be some PR tests...
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Appveyor is timing out

Post by abdullah »

Well, well.. after many desperate blind test removals, it is possible have the tests pass:
https://travis-ci.org/FreeCAD/FreeCAD/jobs/531052489

Now I only have to start reverting test removals to discover which one is the one that made the whole thing fail...
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Appveyor is timing out

Post by abdullah »

Todays log:

The PartDesign tests make the tests fail on Travis, because this passes:
https://travis-ci.org/FreeCAD/FreeCAD/b ... tification

and this does not:
https://travis-ci.org/FreeCAD/FreeCAD/b ... tification

and the problem is not (only) the GUI tests of PD, because without the GUI tests it also fails:
https://travis-ci.org/FreeCAD/FreeCAD/b ... tification

Now running several builds at the same time, to check if there is something wrong with TechDraw tests:
https://travis-ci.org/FreeCAD/FreeCAD/b ... tification

This has already become a big challenge...
Post Reply