The idea is to validate the PCL is installed correctly/compiled with the appropriate flags by creating a downstream target which links against pcl.
I thought about creating a new CI job that builds all examples. Each example is a standalone downstream target, so we will kill two birds with one stone, both verify that examples compile and that CMake scripts are working.
This would need passing around artifacts between jobs (we don't want to rebuild the library in the "examples job"). Should be possible on Azure, but I haven't had time to get to this yet.
Sorry for confusion, I meant tutorials, not examples.
Clever idea indeed. Looking forward for that super clever solution which crawls the tutorials for all cmake files and sources ^^
Returning the discussion here since #2696 is not going to address this issue.
We can always have an extra step like you did in 1 where we build just a single target, filled with one class from each module. We compile and run the executable to ensure things don't segfault magically.
Where should we host this downstream project? How to choose which classes to use?
My 2 cents time.
Where should we host this downstream project?
First proposal is something under the .ci/downstream_target or equivalent which is "CMake detached" from our main CMake script. Simple but not necessarily pretty.
Second option would be try to create it as a unit test, although at this point this feels like a somewhat convoluted process. The test would need to run the downstream target independent cmake script passing the build folder as PCL_DIR; second stage would be successful compilation; third stage just running the executable. I have the impression this should be possible but I would need to dig through to come up with a proof of concept.
How to choose which classes to use?
My only requirement is for the classes/functions to be precompiled in advanced i.e. avoid header only which will be compiled for this particular target. We can later add things as we see fit.
Doesn't tutorials fulfill this? What's the difference between tutorials CI and the proposed one?
In it's current state this pipeline only builds tutorials on Ubuntu, so we can not be sure that downstream projects can configure/build against PCL on other platforms.
I thought about creating a new CI job that builds all examples. Each example is a standalone downstream target, so we will kill two birds with one stone, both verify that examples compile and that CMake scripts are working.
This would need passing around artifacts between jobs (we don't want to rebuild the library in the "examples job"). Should be possible on Azure, but I haven't had time to get to this yet.
It should be possible with pipeline caching, this can be made to work across all OS.
Instead of this, we could also use stages.
To me, stages sounds a better approach that pipeline caching
Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.
Most helpful comment
I thought about creating a new CI job that builds all examples. Each example is a standalone downstream target, so we will kill two birds with one stone, both verify that examples compile and that CMake scripts are working.
This would need passing around artifacts between jobs (we don't want to rebuild the library in the "examples job"). Should be possible on Azure, but I haven't had time to get to this yet.