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

cicd: add github configuration to run continuous integration #396

Merged
merged 2 commits into from
Dec 7, 2023

Conversation

andrea-iob
Copy link
Member

Continuous integration is now handled by github actions and runs on non-cloud machines (Ubuntu 20.4).

CI works in the same way as before, there are just some differences in the tests being run (we don't test anymore the compilation using older gcc versions).

The results of the tests are available at the follwing link: "https://github.com/optimad/bitpit/actions/workflows/continuous_integration.yml". Here an example of how the test results look like:
bitpit_ci_1
bitpit_ci_2

@andrea-iob
Copy link
Member Author

I forgot to say that Travis will still be used for submitting Coverity analysis. It is possible to use github actions also for that task, but I will do the porting sometime in the (hopefully near) future.

@katemay
Copy link

katemay commented May 23, 2023

One thing just came to mind. Since this is open source, would it make sense to run this pipeline on github cloud instead of on bob? I read that github advises not using self-hosted runners for public repos to protect against pull requests from forks running potentially damaging code. Beyond that, isn't it free to use github cloud on an open source project? If bitpit is in the cloud, that's more resources for the other projects.

@edoardolombardi
Copy link
Member

One thing just came to mind. Since this is open source, would it make sense to run this pipeline on github cloud instead of on bob? I read that github advises not using self-hosted runners for public repos to protect against pull requests from forks running potentially damaging code. Beyond that, isn't it free to use github cloud on an open source project? If bitpit is in the cloud, that's more resources for the other projects.

I completely agree

@andrea-iob andrea-iob closed this May 24, 2023
@andrea-iob andrea-iob deleted the cicd.github.actions branch May 24, 2023 07:31
@andrea-iob andrea-iob restored the cicd.github.actions branch November 10, 2023 16:11
@andrea-iob andrea-iob reopened this Nov 10, 2023
@andrea-iob
Copy link
Member Author

andrea-iob commented Nov 10, 2023

Here there are some suggestions on how to safely enable self-hosted runners for public repositories. These are the two proposed solutions:

  • "The best (and most cumbersome) way to prevent this is to check Require approval for all outside collaborators in the repo settings as explained here. Then you have to manually approve workflows running on each PR, after you have first checked the PR for any changes to workflow files."
  • "Another way to mitigate the risk would be to have a private “companion” repo to your public repo that the self-hosted runner is assigned to as explained here but I haven’t tried this myself."

The first solution seems the fine for us.

@katemay
Copy link

katemay commented Nov 10, 2023

Is there a reason why we shouldn't use github's cloud though? From what they say here it's free for open source projects. Is there a reason why it's better to use bob for bitpit rather than the cloud?

name: Continuous integration

on:
workflow_dispatch:
Copy link

Choose a reason for hiding this comment

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

Would the workflow_dispatch be available to anyone on the internet since this is open source? It would probably be a bad idea to allow anyone in the world to run a job on bob.

Copy link
Member Author

Choose a reason for hiding this comment

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

We can remove it, however I think that running a github action requires some kind of permission on the repository.

@andrea-iob andrea-iob added this to the 1.9 milestone Nov 15, 2023
@andrea-iob andrea-iob merged commit a51eebd into master Dec 7, 2023
6 of 7 checks passed
@andrea-iob andrea-iob deleted the cicd.github.actions branch December 7, 2023 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants