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..., 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-..., 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 https://github.com/geany/www.geany.org/pull/33. I would continue with migrating G-P once we agree on this switch and this one has been merged. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2948
-- Commit Summary --
* <a href="https://github.com/geany/geany/pull/2948/commits/139ea3c99019d85e3e1417dca85a7c3ac303a881">Migrate from Travis CI to Github Actions</a>
-- File Changes --
A .github/workflows/build.yml (161)
-- Patch Links --
https://github.com/geany/geany/pull/2948.patch https://github.com/geany/geany/pull/2948.diff
@eht16 commented on this pull request.
@@ -0,0 +1,161 @@
+# +# Copyright: 2021, The Geany contributors +# License: GNU GPL v2 or later + +name: CI Build + +on: push
This is only for testing and I'll remove it before merge.
@eht16 commented on this pull request.
+ - name: Run Tests + run: | + cd _build + make -j2 check + + - name: Run distcheck + run: | + cd _build + make -j2 distcheck DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_FLAGS"; + + - name: ccache stats + run: | + ccache --show-stats + + mingw:
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.
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/1352366241.
@eht16 pushed 1 commit.
4cd209fa2343ecadf897bbeb300d8ff93ea90426 Try using secrets to set debug mode
@eht16 pushed 1 commit.
5a419ba72968b73d6700cf075670dfa15da73b54 Remove .travis.yml
@eht16 pushed 1 commit.
1c733f975a15f8cee8896e7b8bf4afd604f3f3c1 Don't use secrets for DEBUG mode
@eht16 pushed 1 commit.
adf8b62440c7b9ee33cccfb9d98c60c248ff0a19 Migrate from Travis CI to Github Actions
@eht16 commented on this pull request.
# push back the the updated cache after build, we use a always new cache key (to force
+ # the creation of the cache item at the end) in combination with "restore-keys" as fallback + - name: Prepare ccache timestamp + id: ccache_cache_timestamp + run: echo "::set-output name=timestamp::$(date +%Y-%m-%d-%H-%M)" + + - name: Configure ccache + uses: actions/cache@v2 + with: + path: ${{ env.CCACHE_DIR }} + key: ${{ runner.os }}-${{ github.job }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} + restore-keys: ${{ runner.os }}-${{ github.job }}-ccache- + + - name: Show environment + run: env | sort + if: ${{ env.DEBUG == '1' }}
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 pushed 1 commit.
f24c4245d0869c4ab782525f1719df278baeafb5 Run Linux builds on Ubuntu 18.04 (as it was before)
@eht16 pushed 1 commit.
dc4bb325bdc1bba80d042eb9d6536fc34f94635e Run Linux builds on Ubuntu 18.04 (as it was before)
@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.
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.
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?
Sorry, I have overlooked the mingw-part.
Merged #2948 into master.
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.
github-comments@lists.geany.org