I love people who can come back and admit when they were incorrect/misinformed. I dont know how often colleagues have corrected/opened my eyes on wrong/old information. It only makes things better.
Be careful with the admin permissions to the runner. You just opened up access to your desktop as well as your home network to anyone that pushes malicious code and triggers the action.
@@therealjtgillI never thought of that. So even if you don't have your pull request approved the fact that the runner will test it makes it possible to run bad code without the owners knowing. I never thought of that I am pretty new to the whole cicd thing.
@@tronophono913 Yep. This is something that happened with public repos on GH when GH started providing cloud runners. Attackers would look for repos with no/low security settings and basic workflow files, fork the repo, replace the functioning code with a miner, then make a pull request. The GH cloud runners would run the mining code and leave the repo owner with fees for running the instances. That being said, you can add permissions to GH repos that only allow certain users to start CI/CD runs without prohibiting pull requests. So a user can make a pull request, but only a trusted user would be allowed to kick off the workflows.
The irony that a pro C++ dev thought that adding a YAML config file to their repo was "too hard". Good job seeing it through man, it'll make a big difference to QA.
Be careful with PR builds and self-hosted runners, make sure to think about security. It can be pretty easy to accidentally allow arbitrary code execution on your machine. Or DoS, etc.
Watched your last video and was actually surprised, that you not thought about this kind of automation before. I think this was based on "Hey he is coming from EA, he should have done stuff before". That was absolutely a first an very naive thinking and I am very happy to see, that you guys try now. Keep up.
Regarding the weirdness around windows not finding existing installs of python - I stumbled on what sounds like it may be a related issue a few days ago - hit the search box in windows and type "alias" - There's an option there that was new to me - Manage app execution aliases - in there are a bunch of aliases that override PATH variables and may have been the thing that caused your issue (it certainly did mine) - you only appear to be able to enable/disable the options that Microsoft creates - but it definitely adds at least 2 for Python that may havebeen screwing with you the way it did me. I'm guessing there's a registry hive that defines the list of aliases, but I lost interest after I fixed my problem. Thanks for the video, as always. Stay safe out there.
I hope you make another video when you setup all the run tests, too! Been wanting to setup something similar for a while now, so the video couldn't have come at a better time. Love the new format of these videos. Keep it up!
Something else you can do is add Required Checks so you don’t accidentally push a broken commit to main. Since it’s not very comfortable to do via GitHub Actions if you have a lot of Checks - you can add a step, like Wait For All Check to Complete and set it as a Required Check
I've recently been trying to set up a Github Actions workflow for my university assignments (Qt applications built using CMake) to ensure cross-platform compatibility. However, I couldn't get this all to work as expected, and quickly thought it was just not worth the time and effort. After watching this, you have got me thinking: Perhaps this is easier than I thought? Even at a smaller scale, being able to automate certain processes is really a useful skill to have. I guess I know what I'll be doing this weekend...
9:40 waiting for chrome to introduce some css style that is applied for recording software so auther of website could automatically blur everything, something like streamer mode
I think I'd have gone for self-hosting Jenkins before writing my own Python script, but the new CI-integration that hosting solutions are going with are pretty awesome.
I've been building a bunch of my side projects using the free github runners lately. They give you quite a bit of free time, it's a great way to get started!
Regarding running in parallel, I think it will only run one job at a time on a given runner. Since you only have one runner that satisfies all your tags, you won't get parallelism. There may be a way to configure more than one runner on your machine. I've never played with self-hosted before.
Yes you are right github actions or azure pipelines initially add more overhead since you have to learn how and what you have to do to make it work. But glad you see that this will be beneficial in the long run since it's quite a better solution than setting up like a python script or anything. Currently also in the process of setting up my azure pipelines for my private project and it takes some time but I already know that this will be the better solution.
The matrix will only run in parallel if you have more self-hosted runners that have those requirements. Otherwise they will use the same self-hosted runner and run sequentially.
Congratz on adding CI. It's great to see best practices in game dev. How do you plan to build on Linux? The MSBuild is not available there afaik - add CMake support?
Don't install your runner as admin, there's not really a reason to do that here. Installing python can be done with an action that downloads a portable version to a folder and paths it up for you (edit: the setup-python docs say the default user NETWORK SERVICE should work), and having the pipeline be elevated just to set some symlinks to save some extra copying seems like micro-optimisation. Aside from the security risk pointed out by another user, pipelines work best when they are repeatable and always start from a known point, and having pipelines able to change the environment for future runs breaks that. Also I'd definitely look at running on master as well, though the value there depends on how you plan to release, to a degree.
Goodmorning from America! So, As someone who just pushed my first repo to Gitlab and looking at their form of ‘Actions’, I sort of got a bit overwhelmed so I went to my project lol. I am just glad I did my first git push. I had the feeling that CI/CD though on my own machine would be annoying to setup, so I am more then happy to let my provider do it. 🤷♂️ Idk, I could be wrong. Someone can gladly correct me. 😂
I have a question that's (almost) unrelated to the topic of this video. After building a game using the editor, how does the engine export the game as a standalone executable? PS: If the answer is too complicated, could you do a short explainer video?😅
Yeah no idea why you didnt do this from the start. Using devops, github or another system to run tests on PR/ commit sounds like ... well a normal practice.
Welcome to DevOps engineering! It's cool to see how easy it was to set up. I'm interested in the scaling challenges in the future. Parallel matrix builds might require an extra keyword but not only that, your runner might need extra an configuration flag to allow more than one workflow running at once. Often in CI platforms it's limited to one per runner, unless you are using some type of a Docker executor where each build runs in a container (this is an excellent reliability/reproducability improvement for the future!!)
Seems this is a bit different than a Gitlab CI/CD pipeline? I would not want my hosted instance to install any software. If I would need specific software I either get a docker image or build one myself; which then is used in the Gitlab CI/CD pipeline. Granted I have only worked with Gitlab CI/CD yet.
The difference is this allows using the full power of the computer it runs on, which is what he wanted so in this case better for his use case with needing the GPU
Using docker compose you can even create multiple runners using only one machine. Most likely you can even use Kubernetes in some way to have a scaleble build farm :D
It gets annoying when it's a private repo. Creating SSH key, copying it, sshing the machine and running jobs is a pain in the a$$ bcuz it fails sometimes (like a lot of times) if the configuration isn't right.
"I was thinking about it in bed almost subconsciously" That's... that's actually a thing. I've been experimenting with it more and more as well as reviewing some methods/research that has been done on it.
The python problem could be that the runner is using a different "PATH" (Probably the admin does not have python on it?) Also, be careful with the admin privileges on a self-hosted runner, anyone can execute a script there. Good Stuff ✨
It’s amazing that something like automated testing using GitHub Actions is worth a video? Like… everybody outside the gaming business is doing testing with CI for at least a decade.
@@avwie132 Well not everyone is doing automated testing for a decade, sadly. Game development might even be one of the better ones compared to engineering companies, banks and all kinds of places working with old tech and ancient practices.
Will you make a public website on which everyone can look if images look right; vote to categorize them so you and your team have less work? Then, the test suite automatically uploads images to that website and registered users can check if the rendering works.
Does this sound like an Elon response to anyone else? It doesn't really matter... But seems like this epiphany came from comments and the sheer volume of viewers said it was easy (yes Cherno mentions that).... But makes it seem like...ohhh i was up thinking at night Reminds me of that time that YT reporter gives Elon an idea, and the next time they meet Elon says, "oh yea we were discussing a problem, and you made me think of a solution " completely invalidating that it was his idea completely
the feeling when u realize what you were trying to do was actually something simple is good and bad at the same time
So true, you're relieved that you finally found the solution but kinda sad because you've already put so much effort into it
I love people who can come back and admit when they were incorrect/misinformed. I dont know how often colleagues have corrected/opened my eyes on wrong/old information.
It only makes things better.
Modern CI/CD tools like GitHub Actions and GitLab CI are really nice to use.
Retrospectively i dunno how I was able to work without CI in the old days.
Gitlab is very nice when u work with separate groups and separate repos and what not..
Very nice. CI is a such a blessing, especially on cross platform code.
Be careful with the admin permissions to the runner. You just opened up access to your desktop as well as your home network to anyone that pushes malicious code and triggers the action.
In B4 a patron replaces Hazel with a Bitcoin miner and makes a pull request
Absolutely. Not only that but also supply chain attacks.
@@therealjtgillI never thought of that. So even if you don't have your pull request approved the fact that the runner will test it makes it possible to run bad code without the owners knowing. I never thought of that I am pretty new to the whole cicd thing.
Ideally you can put the code inside a docker so it cannot access the host pc
@@tronophono913 Yep. This is something that happened with public repos on GH when GH started providing cloud runners. Attackers would look for repos with no/low security settings and basic workflow files, fork the repo, replace the functioning code with a miner, then make a pull request. The GH cloud runners would run the mining code and leave the repo owner with fees for running the instances.
That being said, you can add permissions to GH repos that only allow certain users to start CI/CD runs without prohibiting pull requests. So a user can make a pull request, but only a trusted user would be allowed to kick off the workflows.
Please keep us updated with GitHub Actions, I would love to see the discussions about the new workflows added in the future!
The irony that a pro C++ dev thought that adding a YAML config file to their repo was "too hard". Good job seeing it through man, it'll make a big difference to QA.
Be careful with PR builds and self-hosted runners, make sure to think about security. It can be pretty easy to accidentally allow arbitrary code execution on your machine. Or DoS, etc.
10:58 YAML, the lovely format with pointers that can DoS your computer if you don't parse it carefully.
Watched your last video and was actually surprised, that you not thought about this kind of automation before. I think this was based on "Hey he is coming from EA, he should have done stuff before". That was absolutely a first an very naive thinking and I am very happy to see, that you guys try now. Keep up.
It's fantastic to see how you've implemented the test pipeline!
Regarding the weirdness around windows not finding existing installs of python - I stumbled on what sounds like it may be a related issue a few days ago - hit the search box in windows and type "alias" - There's an option there that was new to me - Manage app execution aliases - in there are a bunch of aliases that override PATH variables and may have been the thing that caused your issue (it certainly did mine) - you only appear to be able to enable/disable the options that Microsoft creates - but it definitely adds at least 2 for Python that may havebeen screwing with you the way it did me. I'm guessing there's a registry hive that defines the list of aliases, but I lost interest after I fixed my problem. Thanks for the video, as always. Stay safe out there.
I hope you make another video when you setup all the run tests, too! Been wanting to setup something similar for a while now, so the video couldn't have come at a better time. Love the new format of these videos. Keep it up!
@16:42 don't let them run in parallel if they go to the same agent and you are doing performance tests like measuring time
Something else you can do is add Required Checks so you don’t accidentally push a broken commit to main.
Since it’s not very comfortable to do via GitHub Actions if you have a lot of Checks - you can add a step, like Wait For All Check to Complete and set it as a Required Check
I've recently been trying to set up a Github Actions workflow for my university assignments (Qt applications built using CMake) to ensure cross-platform compatibility. However, I couldn't get this all to work as expected, and quickly thought it was just not worth the time and effort. After watching this, you have got me thinking: Perhaps this is easier than I thought? Even at a smaller scale, being able to automate certain processes is really a useful skill to have. I guess I know what I'll be doing this weekend...
9:40 waiting for chrome to introduce some css style that is applied for recording software so auther of website could automatically blur everything, something like streamer mode
I think I'd have gone for self-hosting Jenkins before writing my own Python script, but the new CI-integration that hosting solutions are going with are pretty awesome.
Github actions are absolutely amazing. Since i use them i never pushed a broken commit on master anymore.
That's awesome! Don't have a server to set this up on now, but will revisit once I do.
I've been building a bunch of my side projects using the free github runners lately. They give you quite a bit of free time, it's a great way to get started!
Regarding running in parallel, I think it will only run one job at a time on a given runner. Since you only have one runner that satisfies all your tags, you won't get parallelism. There may be a way to configure more than one runner on your machine. I've never played with self-hosted before.
I have a flight in 2h and legit waited for this video to get published so I can download it
Have a safe flight! Enjoy!!
Yes you are right github actions or azure pipelines initially add more overhead since you have to learn how and what you have to do to make it work. But glad you see that this will be beneficial in the long run since it's quite a better solution than setting up like a python script or anything. Currently also in the process of setting up my azure pipelines for my private project and it takes some time but I already know that this will be the better solution.
The matrix will only run in parallel if you have more self-hosted runners that have those requirements. Otherwise they will use the same self-hosted runner and run sequentially.
Thanks, Cherno for the video! this is very helpful.
Congratz on adding CI. It's great to see best practices in game dev. How do you plan to build on Linux? The MSBuild is not available there afaik - add CMake support?
you could change your ASSERT macro to still check the validity of the condition in release builds: `do { if (false && (condition)) {} } while(0)`
I think this video will be one of your most watched videos ever. Not now. But in the future.
I've not seen the GitHub code (yet) for Hazel. But I am assuming there is a test harness for Hazel, besides the runtime tests?
Python doesn't require admin rights to install for user, not system.
Don't install your runner as admin, there's not really a reason to do that here. Installing python can be done with an action that downloads a portable version to a folder and paths it up for you (edit: the setup-python docs say the default user NETWORK SERVICE should work), and having the pipeline be elevated just to set some symlinks to save some extra copying seems like micro-optimisation.
Aside from the security risk pointed out by another user, pipelines work best when they are repeatable and always start from a known point, and having pipelines able to change the environment for future runs breaks that.
Also I'd definitely look at running on master as well, though the value there depends on how you plan to release, to a degree.
Really awesome!
Goodmorning from America!
So, As someone who just pushed my first repo to Gitlab and looking at their form of ‘Actions’, I sort of got a bit overwhelmed so I went to my project lol. I am just glad I did my first git push. I had the feeling that CI/CD though on my own machine would be annoying to setup, so I am more then happy to let my provider do it. 🤷♂️
Idk, I could be wrong. Someone can gladly correct me. 😂
I have a question that's (almost) unrelated to the topic of this video. After building a game using the editor, how does the engine export the game as a standalone executable?
PS: If the answer is too complicated, could you do a short explainer video?😅
Yeah no idea why you didnt do this from the start. Using devops, github or another system to run tests on PR/ commit sounds like ... well a normal practice.
Welcome to DevOps engineering! It's cool to see how easy it was to set up. I'm interested in the scaling challenges in the future. Parallel matrix builds might require an extra keyword but not only that, your runner might need extra an configuration flag to allow more than one workflow running at once. Often in CI platforms it's limited to one per runner, unless you are using some type of a Docker executor where each build runs in a container (this is an excellent reliability/reproducability improvement for the future!!)
Has anybody the songs name at 0:22? Shazam can't find it :(
proabably from some audio asset library which can be licensed
Github actions is pretty easy, but it costs and the costs can add up.
You're right
I'm from India, how is the scope there for automation testing
21:21 That is an issue I face a lot.
Seems this is a bit different than a Gitlab CI/CD pipeline? I would not want my hosted instance to install any software. If I would need specific software I either get a docker image or build one myself; which then is used in the Gitlab CI/CD pipeline.
Granted I have only worked with Gitlab CI/CD yet.
The difference is this allows using the full power of the computer it runs on, which is what he wanted so in this case better for his use case with needing the GPU
🔥
wait hazel has a dev, QA, and prod branch? instead of 1 main? how come this was what you guys did
Create a dedicated admin account for the runner. System is god in Windows.
Properly evaluate CMake one day.
Using docker compose you can even create multiple runners using only one machine. Most likely you can even use Kubernetes in some way to have a scaleble build farm :D
My projects CI and building is very similar to Hazel, but I prefer Bash, Gradle and CMake.
It gets annoying when it's a private repo. Creating SSH key, copying it, sshing the machine and running jobs is a pain in the a$$ bcuz it fails sometimes (like a lot of times) if the configuration isn't right.
"I was thinking about it in bed almost subconsciously"
That's... that's actually a thing. I've been experimenting with it more and more as well as reviewing some methods/research that has been done on it.
The python problem could be that the runner is using a different "PATH" (Probably the admin does not have python on it?)
Also, be careful with the admin privileges on a self-hosted runner, anyone can execute a script there.
Good Stuff ✨
but tbh, it is just better to use the packaged ones that comes with github actions as it turns out to be very configurable.
It’s amazing that something like automated testing using GitHub Actions is worth a video? Like… everybody outside the gaming business is doing testing with CI for at least a decade.
That's impressive for a service that was released 4 years ago.
Testing using CI pipelines isn’t. That’s what I meant. Not Actions specificy
@@avwie132 Well not everyone is doing automated testing for a decade, sadly. Game development might even be one of the better ones compared to engineering companies, banks and all kinds of places working with old tech and ancient practices.
And I think the video has value for someone who also wants to set up Actions specifically
CI / CD is really not that hard nowadays and making pipelines that work can be amazing
I'll definitely be on the lookout for a Linux build. I'd like to give your engine a try, but I'm never going back to Windows.
I wonder how far github has come compared to gitlab
w00t
Hi, why is Jenkins not even mentioned ?? It seems to me the go to tool for CI/CD ?!
Will you make a public website on which everyone can look if images look right; vote to categorize them so you and your team have less work? Then, the test suite automatically uploads images to that website and registered users can check if the rendering works.
Character Development
Is it possible to get unbanned from The Cherno server?
see? Github Actions is GOOD
Can't beat Jenkins..... Github Actions can do some of the starting checks, but the practical PC side, Jenkins hands down.
first
🙄
Does this sound like an Elon response to anyone else? It doesn't really matter... But seems like this epiphany came from comments and the sheer volume of viewers said it was easy (yes Cherno mentions that).... But makes it seem like...ohhh i was up thinking at night
Reminds me of that time that YT reporter gives Elon an idea, and the next time they meet Elon says, "oh yea we were discussing a problem, and you made me think of a solution " completely invalidating that it was his idea completely
The idea doesn't mean shit. Execution is everything
better, more code less talking and you'll get there
Why build a game engine in this day and age? there are already so many to choose from.