Skip to content

ci: setup github actions#14308

Merged
miri64 merged 3 commits intoRIOT-OS:masterfrom
aabadie:pr/ci/github-actions
Jul 6, 2020
Merged

ci: setup github actions#14308
miri64 merged 3 commits intoRIOT-OS:masterfrom
aabadie:pr/ci/github-actions

Conversation

@aabadie
Copy link
Copy Markdown
Contributor

@aabadie aabadie commented Jun 18, 2020

Contribution description

Sorry this was not intended to be proposed now, I wanted to try on my own fork... but well, now that it's here...

This PR is a POC for setting up Github Actions for some of our tests: static-test, some standalone builds for tools (flatc and mosquitto_rsmb) and also for running tests on some of our tools, like compile_and_test_for_board.py, backport_pr.py and riotctrl_shell scripts (all come with a full test environment based on tox).

In the end, I think GH actions could a good replacement to Travis, which had some failures during the last weeks (some jobs were not showing up in PRs).

For running the static-test and the standalone builds for tools, I created a dedicated riot-action project which is based on a simple (and small) Docker image. I could have reused the riotbuild image, but it's so fat, you know.

Testing procedure

  • The testing procedure is more an agreement on whether we want to use Github Action or not.
  • The actions also need to be enabled in the project settings
  • You can have a look here and there to see what it would look like

Issues/PRs references

Now based on #14438

@aabadie aabadie changed the title Setup GitHub actions ci: setup GitHub actions (POC) Jun 18, 2020
@aabadie aabadie added Area: CI Area: Continuous Integration of RIOT components Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR labels Jun 18, 2020
@aabadie aabadie changed the title ci: setup GitHub actions (POC) ci: setup github actions (POC) Jun 18, 2020
@aabadie aabadie changed the title ci: setup github actions (POC) ci: setup github actions Jun 19, 2020
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Jun 21, 2020

Note that this PR is also filling 2 uncovered things in our currents checks:

  • run tox on compile_and_test_for_board.py which already exists but not run automatically
  • build the standalone tools provided in several places: tools/flatc, tools/mosquitto_rsmb, stm32/dist, and kinetis/dist. These just need a simple build with a local toolchain.

@aabadie aabadie requested a review from fjmolinas June 22, 2020 14:23
@aabadie aabadie force-pushed the pr/ci/github-actions branch 2 times, most recently from 5d39e0a to 7a637f5 Compare June 25, 2020 07:34
@aabadie aabadie force-pushed the pr/ci/github-actions branch 2 times, most recently from 2832731 to 7dce2a2 Compare July 4, 2020 14:21
@aabadie aabadie added the State: waiting for other PR State: The PR requires another PR to be merged first label Jul 4, 2020
@miri64
Copy link
Copy Markdown
Member

miri64 commented Jul 4, 2020

👍 the tool check Workflows should be made required then, I'd say.

@miri64
Copy link
Copy Markdown
Member

miri64 commented Jul 4, 2020

#14438 was merged. Please rebase.

@miri64 miri64 removed the State: waiting for other PR State: The PR requires another PR to be merged first label Jul 4, 2020
@aabadie aabadie force-pushed the pr/ci/github-actions branch from 81219e9 to 661e147 Compare July 4, 2020 16:46
@miri64
Copy link
Copy Markdown
Member

miri64 commented Jul 6, 2020

Can you squash and pull the current master to your fork, please? static-test is currently failing.

@aabadie aabadie force-pushed the pr/ci/github-actions branch from 661e147 to b39e154 Compare July 6, 2020 08:58
@miri64
Copy link
Copy Markdown
Member

miri64 commented Jul 6, 2020

static-test still fails :-( Maybe temporarily add a set -x at the start of dist/tools/ci/build_and_test.sh so we can see what is executed?

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Jul 6, 2020

Maybe temporarily add a set -x at the start of dist/tools/ci/build_and_test.sh so we can see what is executed?

Done but it is still failing I don't understand the issue...

 ./dist/tools/static-tests.sh
+ CI_BASE_BRANCH=master
+ [[ -n static-tests ]]
+ export BASE_BRANCH=master
+ BASE_BRANCH=master
+ '[' static-tests == static-tests ']'
+ RESULT=0
+ RECALL=
+ '[' '' '!=' recall ']'
+ git diff master HEAD -- ./dist/tools/ci/build_and_test.sh
+ trap RESULT=1 ERR
+ git rebase master
fatal: Needed a single revision
invalid upstream 'master'
++ RESULT=1
+ ((  1 != 0  ))
+ git rebase --abort
Rebase failed, aborting...
++ RESULT=1
+ echo 'Rebase failed, aborting...'
+ exit 1
makefiles/tests.inc.mk:3: recipe for target 'static-test' failed

@miri64
Copy link
Copy Markdown
Member

miri64 commented Jul 6, 2020

  • git rebase master
    fatal: Needed a single revision
    invalid upstream 'master'

I think master was not pulled or there is no reference to it.

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Jul 6, 2020

I think master was not pulled or there is no reference to it.

Hmm, yes probably. The checkout action only fetches the branch of the PR.

@aabadie aabadie force-pushed the pr/ci/github-actions branch from fefbf82 to 9c9010a Compare July 6, 2020 12:50
@miri64
Copy link
Copy Markdown
Member

miri64 commented Jul 6, 2020

What's also weird is, that it seems perfectly fine with origin/master here...

@miri64
Copy link
Copy Markdown
Member

miri64 commented Jul 6, 2020

Git still needs to have some config: I would prefer this to be done in the Dockerfile, though.

@miri64
Copy link
Copy Markdown
Member

miri64 commented Jul 6, 2020

(I find it curious that it does not report the fixup commits, so maybe the failed rebase messed something up)

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Jul 6, 2020

Git still needs to have some config:

You probably don't want to know what is my opinion about this rebase...

@miri64
Copy link
Copy Markdown
Member

miri64 commented Jul 6, 2020

Git still needs to have some config:

You probably don't want to know what is my opinion about this rebase...

That it shouldn't be done, since most sane CI do the merge we do when hitting the green button anyway? :-)

@miri64
Copy link
Copy Markdown
Member

miri64 commented Jul 6, 2020

Can you retrigger another build of static-test somehow?

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Jul 6, 2020

it shouldn't be done, since most sane CI do the merge we do when hitting the green button anyway? :-)

yes but with less politically correct words :D

@miri64
Copy link
Copy Markdown
Member

miri64 commented Jul 6, 2020

Unpopular proposal: post-pone the adding of the static tests for now (we have them on Travis and Murdock already and that alone seems to confuse people as well) and just get the tool tests in for now.

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Jul 6, 2020

Unpopular proposal: post-pone the adding of the static tests for now

It seems that we came to the same conclusion...

@aabadie aabadie force-pushed the pr/ci/github-actions branch from 9912fef to c15df72 Compare July 6, 2020 13:24
@miri64
Copy link
Copy Markdown
Member

miri64 commented Jul 6, 2020

Only one remaining nit I want to try: #14308 (comment)

@miri64
Copy link
Copy Markdown
Member

miri64 commented Jul 6, 2020

The name is still shown as build, but it works so 🤷‍♀️ let's keep it as is. Please squash!

@miri64 miri64 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Type: new feature The issue requests / The PR implemements a new feature for RIOT labels Jul 6, 2020
@aabadie aabadie force-pushed the pr/ci/github-actions branch from ade006b to ffbc16a Compare July 6, 2020 13:30
Copy link
Copy Markdown
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

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

ACK. Workflows passed in @aabadie's fork (and is now also showing the correct job names 🎉)

@miri64 miri64 merged commit d065b7b into RIOT-OS:master Jul 6, 2020
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Jul 6, 2020

Thanks a lot for reviewing @miri64 !

@aabadie aabadie deleted the pr/ci/github-actions branch July 6, 2020 13:59
@miri64 miri64 added this to the Release 2020.07 milestone Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: CI Area: Continuous Integration of RIOT components CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants