Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

.github/workflow : Added compile tests #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

akshaim
Copy link
Member

@akshaim akshaim commented Sep 6, 2022

Added compile tests so that the compilation tests are triggered in the event that the submodule is updated.

@akshaim akshaim force-pushed the add-CI-buildtests branch 2 times, most recently from 63dbf5d to eb1126e Compare September 6, 2022 09:21
@akshaim
Copy link
Member Author

akshaim commented Sep 6, 2022

ping @miri64

@benpicco
Copy link

benpicco commented Sep 6, 2022

How can this be tested / what were the results?

Feel free to squash btw.

@MrKevinWeiss
Copy link

We had a small discussion at the summit. Maybe it would be better to use docker rather than a hard coded version of gcc. We could also try to run full build tests either but the make info-boards-supported or with the compile_and_test_for_board.py script.

When I have more time I will investigate.

@akshaim
Copy link
Member Author

akshaim commented Sep 9, 2022

@benpicco Here you go. results while doing a dry run in my system using act.

```

DRYRUN [Compilation tests for RIOT-OS submodule update/build-1] 🚀 Start image=catthehacker/ubuntu:act-latest
DRYRUN [Compilation tests for RIOT-OS submodule update/build-2] 🚀 Start image=catthehacker/ubuntu:act-latest
DRYRUN [Compilation tests for RIOT-OS submodule update/build-3] 🚀 Start image=catthehacker/ubuntu:act-latest
DRYRUN [Compilation tests for RIOT-OS submodule update/build-2] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=false
DRYRUN [Compilation tests for RIOT-OS submodule update/build-3] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=false
DRYRUN [Compilation tests for RIOT-OS submodule update/build-1] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=false
DRYRUN [Compilation tests for RIOT-OS submodule update/build-2] 🐳 docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
DRYRUN [Compilation tests for RIOT-OS submodule update/build-2] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
DRYRUN [Compilation tests for RIOT-OS submodule update/build-3] 🐳 docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
DRYRUN [Compilation tests for RIOT-OS submodule update/build-3] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
DRYRUN [Compilation tests for RIOT-OS submodule update/build-1] 🐳 docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
DRYRUN [Compilation tests for RIOT-OS submodule update/build-1] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
DRYRUN [Compilation tests for RIOT-OS submodule update/build-2] 🧪 Matrix: map[applications:sniffer]
DRYRUN [Compilation tests for RIOT-OS submodule update/build-3] 🧪 Matrix: map[applications:spectrum-scanner]
DRYRUN [Compilation tests for RIOT-OS submodule update/build-1] 🧪 Matrix: map[applications:coap-chat]
DRYRUN [Compilation tests for RIOT-OS submodule update/build-3] ⭐ Run Main actions/checkout@v2
DRYRUN [Compilation tests for RIOT-OS submodule update/build-1] ⭐ Run Main actions/checkout@v2
DRYRUN [Compilation tests for RIOT-OS submodule update/build-2] ⭐ Run Main actions/checkout@v2
DRYRUN [Compilation tests for RIOT-OS submodule update/build-1] ✅ Success - Main actions/checkout@v2
DRYRUN [Compilation tests for RIOT-OS submodule update/build-3] ✅ Success - Main actions/checkout@v2
DRYRUN [Compilation tests for RIOT-OS submodule update/build-2] ✅ Success - Main actions/checkout@v2
DRYRUN [Compilation tests for RIOT-OS submodule update/build-2] ⭐ Run Main Pull the latest riotbuild docker image
DRYRUN [Compilation tests for RIOT-OS submodule update/build-1] ⭐ Run Main Pull the latest riotbuild docker image
DRYRUN [Compilation tests for RIOT-OS submodule update/build-3] ⭐ Run Main Pull the latest riotbuild docker image
DRYRUN [Compilation tests for RIOT-OS submodule update/build-2] ✅ Success - Main Pull the latest riotbuild docker image
DRYRUN [Compilation tests for RIOT-OS submodule update/build-1] ✅ Success - Main Pull the latest riotbuild docker image
DRYRUN [Compilation tests for RIOT-OS submodule update/build-3] ✅ Success - Main Pull the latest riotbuild docker image
DRYRUN [Compilation tests for RIOT-OS submodule update/build-2] ⭐ Run Main Run compile tests
DRYRUN [Compilation tests for RIOT-OS submodule update/build-3] ⭐ Run Main Run compile tests
DRYRUN [Compilation tests for RIOT-OS submodule update/build-2] ✅ Success - Main Run compile tests
DRYRUN [Compilation tests for RIOT-OS submodule update/build-1] ⭐ Run Main Run compile tests
DRYRUN [Compilation tests for RIOT-OS submodule update/build-3] ✅ Success - Main Run compile tests
DRYRUN [Compilation tests for RIOT-OS submodule update/build-1] ✅ Success - Main Run compile tests
DRYRUN [Compilation tests for RIOT-OS submodule update/build-2] 🏁 Job succeeded
DRYRUN [Compilation tests for RIOT-OS submodule update/build-3] 🏁 Job succeeded
DRYRUN [Compilation tests for RIOT-OS submodule update/build-1] 🏁 Job succeeded

@akshaim
Copy link
Member Author

akshaim commented Sep 9, 2022

@MrKevinWeiss Do we really need to run the compilation tests on all targets from make info-boards-supported? Applications (unlike examples )are usually meant for specific boards, right?

compile_and_test_for_board.py however runs and tests it in the target as well this would need the HW connected to it or maybe use renode .

@MrKevinWeiss
Copy link

You are right, compile_and_test_for_board.py is probably not the correct thing. Though it would be nice to build test every board, I don't know how big that would be. Maybe for now we just say native and add some script foo later, or even a preselected list of the most important boards.

Copy link

@MrKevinWeiss MrKevinWeiss left a comment

Choose a reason for hiding this comment

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

If this works than I would be OK for now. I think there is too much info missing from the makefiles and such in order to use info-boards-supported properly and try to test every one.

A simple native build should be at least better than nothing without adding too much extra work.


- name: Run compile tests
run: |
make BUILD_IN_DOCKER=1 -C ${{ matrix.applications }}

Choose a reason for hiding this comment

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

I tried the following locally, this would all apps to be added without having to touch the CI list in order for testing.

Suggested change
make BUILD_IN_DOCKER=1 -C ${{ matrix.applications }}
export RIOTAPPS=$(find . -name '*Makefile*' -printf "%h\n" | sort -u | grep -v RIOT)
for appdir in $RIOTAPPS; do make BUILD_IN_DOCKER=1 -C $appdir; done

Copy link
Member

Choose a reason for hiding this comment

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

I tried the following locally, this would all apps to be added without having to touch the CI list in order for testing.

This would however disable parallel testing. I personally prefer to use a CI matrix if there is one.

Choose a reason for hiding this comment

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

That means every test we would have to add into a list, also touching the github config, which also means that any non-maintainer would have to wait for it to be triggered.

Either way, AFAIK, we are merging this repo with the examples in the main RIOT repo. This would reduce all the duplicate CI work I suppose...

Copy link
Member

Choose a reason for hiding this comment

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

Only 10% of changes in the past were file additions and not all of those were new applications (given that this repo only contains 3 applications at the moment)

$ git log --oneline --diff-filter=A | wc -l
14
$ git log --oneline | wc -l
140

I think we would manage ;-). But yes, given RIOT-OS/RIOT#18602 this might indeed be a mood point.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants