-
Notifications
You must be signed in to change notification settings - Fork 191
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
CI testing of CUDA #457
Comments
I have done some testing locally, it's not very hard to set up a self-hosted runner. I temporarily ran one on my desktop PC in a docker container with access to the video card and nothing else, and I was able to run tests. The problem is security. A CI system is effectively downloading code from random people on the internet, compiling it and running it. The code should be sanity checked first. Github has some warnings about using self-hosted runners with public repos. Related discussions suggest that the actual problem is actions triggered on pull requests, because anyone can submit a pull request. Triggering them on pushes (or manually) is preferable, because only members of the TACO team can do that. What is needed is a process where only members of the TACO team can trigger the CUDA test, and they have the opportunity to review pull request code before doing so. Github has a way to define an action that is run explicitly, by saying the action is triggered on
Steps 3, 4 and 6 can be scripted, but it is crucial that the review step is done first. Our CUDA runner(s) should not be available to run jobs for forked repos, or other repos outside of the control of the TACO team. (I am not sure what the exact security model is for forks, we need to test this.) I have set up a temporary test configuration in my personal fork of taco. It has two actions defined: normal tests, and cuda tests: On normal pushes and pull requests, it tests with recent versions of gcc and clang, on ubuntu-latest and macos (because why not). Selecting the other workflow, it has a button and a popup dialog to manually trigger it: That action has some input fields defined, and those appear in the popup so you have some control over how taco is built. |
Some problems with the above approach:
|
It definitely makes sense to make the CUDA tests be triggered manually for pull requests. Would there be any issues with having the tests be triggered automatically for pushes to master though, since only developers with write access to the repo can push to master? |
I think it makes sense to run it automatically for pushes to master too. (Though that would be giving you information after-the-fact, it won't prevent the push.) |
I got a friend to help test the details of forks and unauthorized access to self-hosted runners. Here's what we found.
So that all looks sane to me. If someone wants to run their own self-hosted runner for their own fork, they can. But only taco collaborators can run code on the official one, and they do so via pushes or manual triggers. |
We have some CI testing, for a limited set of features. But we need better feedback for when a change breaks something on CUDA.
Github action runners run on constricted VMs with 2 cores and no GPUs. Thus, if we want to build and run tests automatically on CUDA, we need to provide the hardware ourselves.
The text was updated successfully, but these errors were encountered: