Travis failing on all Pull Requests

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!
sww1235
Posts: 32
Joined: Thu Mar 21, 2019 5:12 pm

Re: Travis failing on all Pull Requests

Post by sww1235 »

It looks like you have to manually enable homebrew caching, as travis doesn't automatically do it for you.

https://stackoverflow.com/a/53331571/3342767
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Travis failing on all Pull Requests

Post by wmayer »

Is it possible that the build exceeds the available disk space so that it is stuck and then will be killed after 10 minutes?

For now I have disabled the TechDraw build on macOS. Then we'll see how it goes...
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Travis failing on all Pull Requests

Post by sgrogan »

wmayer wrote: Sun Oct 18, 2020 2:25 pm And is it possible to avoid to install the packages for the macOS build environment for every build again and again? When e.g. comparing it with the Linux build then the latter starts the compile process immediately while for macOS it takes half an hour until the packages are installed.
This is supposed to be handled by the caching but it never succeeds.
I don't think we are using gtimeout correctly. The intended behavior is that before we hit our Travis time limit of 3 hr the build is killed and the cache is saved. If the build is restarted the cache should pick up from there. I have tried to re-start some of the failed builds and it starts from scratch again.
Maybe
blacey wrote: pinged by pinger macro
has some hints? I'm not sure where this fits in the workflow https://github.com/freecad/freecad-ports-cache
"fight the good fight"
User avatar
vejmarie
Posts: 713
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Travis failing on all Pull Requests

Post by vejmarie »

Hi,

This is coming from the fact that we do not have a clean build cache from travis / master. I faced that challenge when validating the re-enablement of Travis for Mac. I can try to build a PR which will stop the compilation through a clean way after 60% of the build, and launch back it afterward and it will work. But this has to be done directly from the master branch according to travis documentation.
I tested it with my own branch initially and it worked.

@wmayer, unfortunately caching homebrew package with travis is a "nightmare" and the I/O speed from their server is not the best we could expect. I didn't really found an easy way to reduce the 30 minutes pre-install time. I can try to discuss with the travis people directly and see if they want to answer us.

vejmarie
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Travis failing on all Pull Requests

Post by sgrogan »

vejmarie wrote: Tue Oct 20, 2020 3:41 am @wmayer, unfortunately caching homebrew package with travis is a "nightmare" and the I/O speed from their server is not the best we could expect. I didn't really found an easy way to reduce the 30 minutes pre-install time. I can try to discuss with the travis people directly and see if they want to answer us.
See here:https://github.com/FreeCAD/FreeCAD-ports-cache
I don't quite understand how to update it.
"fight the good fight"
User avatar
vejmarie
Posts: 713
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Travis failing on all Pull Requests

Post by vejmarie »

sgrogan wrote: Tue Oct 20, 2020 8:37 pm
vejmarie wrote: Tue Oct 20, 2020 3:41 am @wmayer, unfortunately caching homebrew package with travis is a "nightmare" and the I/O speed from their server is not the best we could expect. I didn't really found an easy way to reduce the 30 minutes pre-install time. I can try to discuss with the travis people directly and see if they want to answer us.
See here:https://github.com/FreeCAD/FreeCAD-ports-cache
I don't quite understand how to update it.
I will have a look during the week-end.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Travis failing on all Pull Requests

Post by mlampert »

Not sure if this is the right thread - one of my PRs is failing in 2 out of 3 builds (not counting macos):

In one build the actual build succeeds but then it runs into an error on a unit test:

Code: Select all

======================================================================
ERROR: test00 (PathTests.TestPathVoronoi.TestPathVoronoi)
Check vertex comparison
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/Mod/Path/PathTests/TestPathVoronoi.py", line 56, in setUp
    initVD()
  File "/usr/local/Mod/Path/PathTests/TestPathVoronoi.py", line 47, in initVD
    e.Color = 0 if e.isPrimary() else 1;
TypeError: PyCXX: Error creating object of type N2Py4LongE from 1

----------------------------------------------------------------------
In the Windows build it seems the python header generation produces a corrupted file:

Code: Select all

C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod/Path/App/VoronoiCellPy.h(34): error C2061: syntax error: identifier 'VoronoiCell' [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\Path\App\Path.vcxproj]
C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod/Path/App/VoronoiCellPy.h(39): error C2143: syntax error: missing ';' before '*' [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\Path\App\Path.vcxproj]
C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod/Path/App/VoronoiCellPy.h(39): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\Path\App\Path.vcxproj]
C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod/Path/App/VoronoiCellPy.h(39): error C2238: unexpected token(s) preceding ';' [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\Path\App\Path.vcxproj]
C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod/Path/App/VoronoiEdgePy.h(34): error C2061: syntax error: identifier 'VoronoiEdge' [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\Path\App\Path.vcxproj]
C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod/Path/App/VoronoiEdgePy.h(39): error C2143: syntax error: missing ';' before '*' [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\Path\App\Path.vcxproj]
C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod/Path/App/VoronoiEdgePy.h(39): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\Path\App\Path.vcxproj]
C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod/Path/App/VoronoiEdgePy.h(39): error C2238: unexpected token(s) preceding ';' [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\Path\App\Path.vcxproj]
  Generating Code...
C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod/Path/App/VoronoiEdgePy.cpp(1057): error C2511: 'Path::VoronoiEdgePy::VoronoiEdgePy(Path::VoronoiEdgePy::VoronoiEdge *,PyTypeObject *)': overloaded member function not found in 'Path::VoronoiEdgePy' [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\Path\App\Path.vcxproj]
  C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod/Path/App/VoronoiEdgePy.h(21): note: see declaration of 'Path::VoronoiEdgePy'
C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod/Path/App/VoronoiEdgePy.cpp(1057): error C2440: 'static_cast': cannot convert from 'Path::VoronoiEdgePy::VoronoiEdge *' to 'Base::BaseClassPy::PointerType' [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\Path\App\Path.vcxproj]
  C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod/Path/App/VoronoiEdgePy.cpp(1057): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod/Path/App/VoronoiEdgePy.cpp(1058): error C2550: 'Path::VoronoiEdgePy::{ctor}': constructor initializer lists are only allowed on constructor definitions [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\Path\App\Path.vcxproj]
C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod/Path/App/VoronoiEdgePy.cpp(1193): error C2143: syntax error: missing ';' before '*' [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\Path\App\Path.vcxproj]
....
Anybody know what's going on here?
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Travis failing on all Pull Requests

Post by sgrogan »

mlampert wrote: Wed Oct 21, 2020 4:12 pm Anybody know what's going on here?
I can confirm the error with PCH on. With PCH off, the build succeeds and passes unit tests, Maybe a missing guard somewhere?
"fight the good fight"
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Travis failing on all Pull Requests

Post by mlampert »

sgrogan wrote: Sat Oct 24, 2020 1:33 pm I can confirm the error with PCH on. With PCH off, the build succeeds and passes unit tests, Maybe a missing guard somewhere?
Great - thanks, that got me through the Windows build!
User avatar
vejmarie
Posts: 713
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Travis failing on all Pull Requests

Post by vejmarie »

Ok, this MacOS build works now
https://travis-ci.org/github/FreeCAD/Fr ... /739338702

A lot of effort into this.

The challenge is the build time on mac and Travis. It is terribly slow. But it did generated a full build with the cache. I have not our travis account credential but I believe it might be great if somebody could pull the build cache from this build and promote it to the master branch.

I have had to run three time the build using 1hour slice to make it up to the end. I am going to update the .tavis.yml file as to take into consideration the new pythonversion used in homebew (3.9) with boost. At least we got a build with "state" of the art library version (Qt 5.15.1, Python 3.9, boost 1.74 etc ...). I can also confirm that it works with XCode 12.0.1 which means that we shall be able to compile on ARM processor.

With the cache loaded, I believe the build time on macOS is going to be around 1hr. I have to disable warning on deprecated function. A lot is changing within Unicode supprot and Python. We might have some homework for upcoming python 3.12

vejmarie
Post Reply