openego / eGon-data

GNU Affero General Public License v3.0
10 stars 4 forks source link

Which continuous integration service should we use? #63

Closed gnn closed 3 years ago

gnn commented 3 years ago

This general question is a result of the points originally raised in the following text:

gnn commented 3 years ago

I've faced the newly introduced limits/changed pricing on Travis in https://github.com/OpenEnergyPlatform/open-MaStR/. There, I ran into queuing times of > 1 h to start the jobs which was slightly annoying. This is a problem which affects repos in this organization as Travis counts on per organization basis. This means for us that we might run into the same problem later, once we work more on the other repos in our organization.

My solution was to switch to GitHub Workflows. Which, honestly, works like a charm! Super fast and easy to configure.

I would suggest to do the same here. But, before we start to change anything we have to check if GitHub Workflows really offers unlimited builds for public repos as I understood it from here. Moreover, if we consider to test on Windows or macOS later, we should check now if this would be possible with GitHub Workflows.

Good to know: tox is supported.

gnn commented 3 years ago

which was originally posted by @gplssm in issue #62. I took the liberty of moving the text from its original post here because it's more suitable to the discussion here than it is to the question raised in issue #62.

gnn commented 3 years ago

I did some more research into this and have some more information. Apparently there is a difference between travis-ci.org and travis-ci.com. They are both ran by the same organisation which in 2018 initially announced that the former will be integrated into the latter. The announcement even contained a recommendation to activate new repositories on travis-ci.com. I followed this recommendation and this is the source of our troubles, because repositories on travis-ci.com are on a credited plan, while repositories on travis-ci.org are not. So, @gplssm could you check whether OpenEnergyPlatform/open-MaStR is registered on travis-ci.org? Because I have a hunch that while projects there are not on a limited plan, they are experiencing annoyingly long queue times, because I got the same reports from oemof projects.

So here are our choices moving forward:

I did some research on GitHub Actions in parallel to yours, but didn't want to post anything before knowing how to migrate. But at least I can say that macOS and Windows are supported. Although for some reason, ubuntu-latest and macos-latest don't actually refer to the latest versions. But I guess you get what you pay for. ;) The bigger question would be, how one would go about installing prerequisites like osm2pgsql or docker on these operating systems. Also, while I know that tox is supported, the issues that broke testing for macOS on Travis probably would also apply to testing via GitHub Actions, i.e. the "tox.ini" would need some non-trivial adjustments.

gnn commented 3 years ago

Also, while there are limits, it doesn't look like we would run into them.

gplssm commented 3 years ago

Thanks for your research!

So, @gplssm could you check whether OpenEnergyPlatform/open-MaStR is registered on travis-ci.org?

travis-ci.org

Although for some reason, ubuntu-latest and macos-latest don't actually refer to the latest versions. But I guess you get what you pay for. ;)

But almost. These are updated weekly. So, even if we run on ubuntu-18.04, we'd get latest package every week.

The bigger question would be, how one would go about installing prerequisites like osm2pgsql or docker on these operating systems

docker :heavy_check_mark: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md#tools osm2pgsql is not pre-installed, but can't we simply install it in the dockered ubuntu-18.04 container?

gplssm commented 3 years ago

In order to move forward, would you mind if I go a step in the direction of GH actions? I would try to set it up and see where I stuck.

gnn commented 3 years ago

So, @gplssm could you check whether OpenEnergyPlatform/open-MaStR is registered on travis-ci.org?

travis-ci.org

Explains why the builds are still running but are taking so long.

Although for some reason, ubuntu-latest and macos-latest don't actually refer to the latest versions. But I guess you get what you pay for. ;)

But almost. These are updated weekly. So, even if we run on ubuntu-18.04, we'd get latest package every week.

That's not what I meant. The latest Ubuntu is 20.04, but ubuntu-latest still refers to 18.04. ;) Same for macOS.

The bigger question would be, how one would go about installing prerequisites like osm2pgsql or docker on these operating systems

docker https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md#tools osm2pgsql is not pre-installed, but can't we simply install it in the dockered ubuntu-18.04 container?

Sure. Ubuntu isn't the problem here. I was referring to macOS and Windows since at the time of writing, there wasn't a decision on that.

In order to move forward, would you mind if I go a step in the direction of GH actions? I would try to set it up and see where I stuck.

Sure, go ahead. I had that on my agenda anyways, but didn't get around to doing it yet.

gplssm commented 3 years ago

Although for some reason, ubuntu-latest and macos-latest don't actually refer to the latest versions. But I guess you get what you pay for. ;)

But almost. These are updated weekly. So, even if we run on ubuntu-18.04, we'd get latest package every week.

That's not what I meant. The latest Ubuntu is 20.04, but ubuntu-latest still refers to 18.04. ;) Same for macOS.

Got it! I've read somewhere, that it's planned to switch to 20.04 as default image soon on GH actions.

The bigger question would be, how one would go about installing prerequisites like osm2pgsql or docker on these operating systems

docker https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md#tools osm2pgsql is not pre-installed, but can't we simply install it in the dockered ubuntu-18.04 container?

Sure. Ubuntu isn't the problem here. I was referring to macOS and Windows since at the time of writing, there wasn't a decision on that.

Now I understand. Also macOS shouldn't be too much of a problem, if the intended software can be installed on macOS at all. After a quick research I found one example of installation custom software to the windows image during the workflow: https://medium.com/rkttu/write-your-github-actions-workflow-for-build-windows-application-94e5a989f477 We have than to check for of the packages we want to install if they are installable in each OS

In order to move forward, would you mind if I go a step in the direction of GH actions? I would try to set it up and see where I stuck.

Sure, go ahead. I had that on my agenda anyways, but didn't get around to doing it yet.

:+1: jump in whenever you like and can!

gplssm commented 3 years ago

I close this one in favor of #92.