Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from Travis CI to Github Actions #2948

Merged
merged 1 commit into from Nov 16, 2021

Conversation

eht16
Copy link
Member

@eht16 eht16 commented Oct 17, 2021

Use Github Actions instead of external Travis CI service which recently enforced resource limits and so increase the risk of broken CI because of too few "credits".

I'm not completely sure about resource limits for Github Actions. According to https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions, it seems there are 2000 free minutes per month.
OTOH the first sentence on this page says "GitHub Actions usage is free for both public repositories and self-hosted runners." while the table below says "2,000 minutes" for "GitHub Free".
According to https://github.community/t/for-public-repositories-is-there-a-monthly-limit-on-minutes/129017, there is no limit for public repositories.

Even if there would be a limit of 2000 minutes, this might fit for our use (for all repositories of the "geany" organization). On Travis CI, we have to manually ask their support to donate additional credits to our account each time the credits are exhausted.

From September 1st to October 17th, we used about 17500 credits (about 1750 build minutes) on Travis CI and we've got 8090 credits left to use.

See also geany/www.geany.org#33.
I would continue with migrating G-P once we agree on this switch and this one has been merged.

@eht16 eht16 added the build-system Related to the build system(s) label Oct 17, 2021

name: CI Build

on: push
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only for testing and I'll remove it before merge.

run: |
ccache --show-stats

mingw:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole Windows part is subject to change later with a new, more real life build setup. This is why it is currently more or less copied from the Linux job and I find it this way more readable than many if's.

@eht16
Copy link
Member Author

eht16 commented Oct 17, 2021

The initial Github Actions workflow starts first after the merge. I didn't find a way to trigger the workflow before the workflow definition exists first in the target branch. Once this is merged, further PRs will be checked in advance.

For a sample workflow run, see https://github.com/eht16/geany/actions/runs/1365415809.


- name: Show environment
run: env | sort
if: ${{ env.DEBUG == '1' }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not yet decided whether we should keep the "show environment" and "ccache statistics" steps. They helped while writing the workflow definition but might be just noisy in every day use.
For now, I made them disabled by default but activatable via the DEBUG variable.

@eht16
Copy link
Member Author

eht16 commented Oct 24, 2021

@elextr @kugel- @b4n any opinions?

We have currently 3760 credits left, so we are going to run out of credits in a few weeks again.
In the meantime, I'm more confident that there is no limit on public Open Source projects for Github Actions.

@elextr
Copy link
Member

elextr commented Oct 24, 2021

I'm not qualified to comment on the actual setup file, but no limits seems good to me and also having windows testing for changes is good, well done.

Since we are early in a release cycle its probably a good time to try it out.

@kugel-
Copy link
Member

kugel- commented Nov 2, 2021

I agree on the switch. I would like to have CI for my meson branch again ;-)

If I see this correctly only Linux CI builds are covered for now. What are the plans for other platforms?

@kugel-
Copy link
Member

kugel- commented Nov 2, 2021

Sorry, I have overlooked the mingw-part.

@eht16 eht16 force-pushed the migrate_travis_to_gh_actions branch from dc4bb32 to bf09b82 Compare November 16, 2021 21:42
@eht16 eht16 merged commit 6e4a847 into geany:master Nov 16, 2021
@eht16
Copy link
Member Author

eht16 commented Nov 16, 2021

Merged to get progress on the migration to GH Actions. I'll continue with G-P soon.
Existing PRs probably will continue to use Travis CI until merged but this should be OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-system Related to the build system(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants