sogno-platform / dpsim

Real-time power system simulator including powerflow, (dynamic) phasors and EMT
https://sogno.energy/dpsim/
Mozilla Public License 2.0
67 stars 49 forks source link

Update actions in workflow and improve parallelisation and cache handling #298

Closed leonardocarreras closed 3 weeks ago

leonardocarreras commented 1 month ago

Changelog

In general, the versions of the actions were updated for checkout, cache, download and upload artifacts. Aditionally, the parallel build with a static value in an environment variable -j2 was changed to the --parallel $(nproc) argument to the command to pick automatically the value.

In particular, other changes were done:

leonardocarreras commented 1 month ago

I'm not sure we want caching for the profiling actions, because the point of this action was to have performance figures for each commit. However, we don't really use them, so I would also be fine with removing them.

I think if we do not plan to use them it would be okay to delete the cache or the action itself. I listen to opinions.

n-eiling commented 1 month ago

OK thanks for the additional research. Looks like our runners get 4 CPUs according to the github documentation. I don't need the profiling anymore, so I would be fine with removing them to make the CI run faster.

leonardocarreras commented 1 month ago

There is now a villas problem, I am unsure what might have been changed in villas in the last days:

In file included from /__w/dpsim/dpsim/dpsim-villas/src/InterfaceWorkerVillas.cpp:15:
/__w/dpsim/dpsim/dpsim-villas/src/../include/dpsim-villas/InterfaceWorkerVillas.h:8:10: fatal error: villas/exceptions.hpp: No such file or directory
    8 | #include <villas/exceptions.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /__w/dpsim/dpsim/dpsim-villas/src/InterfaceVillas.cpp:3:
/__w/dpsim/dpsim/dpsim-villas/src/../include/dpsim-villas/InterfaceVillas.h:8:10: fatal error: villas/exceptions.hpp: No such file or directory
    8 | #include <villas/exceptions.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

https://github.com/sogno-platform/dpsim/actions/runs/9402263953/job/25901074854#step:7:429

My view is that the error is not caused by this PR, as I can see problems in the pipeline for others...

leonardocarreras commented 4 weeks ago

Hi @n-eiling! I see that you are working on #299 and the updated container with a new villas version, thanks for this... Do you think that it will be fixing the new errors that we get? In your opinion could this PR go first? Should I retrigger the workflow of container.yaml with the older container to make the workflow to pass again?

n-eiling commented 4 weeks ago

This is due to an error in VILLAS. I already fixed it. Once it's merged the container should work again. Sorry for breaking this.

leonardocarreras commented 4 weeks ago

@n-eiling thank you for fixing, maybe with luck the merge does not take long :)

m-mirz commented 4 weeks ago

@leonardocarreras instead of removing the profiling we could also trigger this manually. In general, I think it is valuable to have the profiling in such a convenient way.

sonarcloud[bot] commented 3 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

leonardocarreras commented 3 weeks ago

@m-mirz Now it works as suggested (on-demand)