OpenWaterAnalytics / EPANET

The Water Distribution System Hydraulic and Water Quality Analysis Toolkit
MIT License
279 stars 204 forks source link

build epanet libraries using github workflows #690 #691

Closed Mariosmsk closed 2 years ago

eladsal commented 2 years ago

@Mariosmsk thank you for this contribution, I was not aware of this option. If I understand correctly, for every commit into any branch, the code is compiled into the different DLLs, which can be immediately downloaded. We didn't have such an option so far, and users that weren't able to compile the code had no place to get the DLLs from. This is a great feature.

LRossman commented 2 years ago

Perhaps @Mariosmsk could explain to the less informed (like me) exactly what this workflow update is doing. Is what @eladsal said true - I have my doubts since the ccpp.yml has always been included in dev and yet I don't see any listing on the project page where the built libraries for a new commit are available for download. Isn't the workflow used to check that the submitted code compiles correctly and passes any CI tests, using temporary folders to contain all files created from the build process?

eladsal commented 2 years ago

@LRossman , I just followed the links @Mariosmsk provided in #690. I ended up here: https://github.com/Mariosmsk/EPANET/actions/runs/2756587821 There is a download link at the bottom.

Also, note that this PR includes win32.yml and win36.yml.

But an explanation would be nice :)

Mariosmsk commented 2 years ago

Hi all, yes @LRossman, what @eladsal said is true. This is the idea of this PR, for every commit, the code is compiled into the different DLLs (win32.yml, win36.yml) and .so (ccpp.yml) files, which can be immediately downloaded. Also, we can do this for dylib for mac with the help of @samhatchett.

The file, ccpp.yml, was always and I added the following code to upload the data on GitHub using the upload artifacts. Artifacts allow you to share data between jobs in a workflow and store data once that workflow has completed. More: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts

- uses: actions/upload-artifact@v2
  with:
    name: libepanet-output
    path: /home/runner/work/EPANET/EPANET/buildproducts/

image

LRossman commented 2 years ago

OK, I get it now. Nice work @Mariosmsk .