-
Notifications
You must be signed in to change notification settings - Fork 84
[GITHUB][ZH] Validate replays for mismatches in CI #1239
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
Conversation
Doesn't headless only check the |
I was assuming that this is already the case, but I didn't actually check the source code. I can move the files to the Documents folder, so this isn't blocked. Any idea why the generalszh.exe doesn't return an exit code? I do this kind of stuff in my day job, but we only have linux stuff. So everything powershell related is mostly AI generated. |
You can use cmake gui options to select debug logging etc without rts debug etc. Check pr #931 regarding the vc6 secret stuff |
Thanks for trying to implement this!
Yeah, specifying non-replay folder paths isn't possible right now and not so easy to implement. I was hoping we could just copy the replays in CI into there.
It probably has to do with generals being a gui application. Those run in background in Windows by default when run from cmd. You can try this:
(from https://www.reddit.com/r/PowerShell/comments/r1f02u/what_am_i_doing_wrong_here_the_lastexitcode_is/) |
It would also be nice if the console output was uploaded. ChatGPT suggests something like this:
|
Hm, the Compatibility Test is running for 2 hours now. My guess is it's displaying an error with MessageBox. Are the game files in the CI environment? |
Ah, yes - that could be the reason. I suspect the game files are missing due to copyright issues. One solution might be to buy Generals using a new Steam account and then run steamcmd within the pipeline to Install the game - but that would be way too slow. Another option would be to use a self-hosted CI runner. That would also be the fastest CI solution, since we wouldn't need to install the game every time. And ultimately - though probably not entirely legal - we could either cache the game files in GitHub Actions, or, if we're okay with running the replays in a Linux environment, build a Docker container that includes all the game files. |
@tintinhamans once mentioned that we can put the gamefiles into an s3 bucket. No idea how that works though... |
Since we'd be using headless mode, we can cut down on a lot of stuff
I think the only thing left is the ini files |
@helmutbuhler do you think it's possible to make the headless mode work with just the ini files, replay saves, maps, and map scripts? |
Maybe try download the ci image or setup something similar to it and run it as a local vm and see if you can stuff to work correctly that way first. Should be a lot faster and easier to debug than waiting for actions to run every time. |
We probably can easily get rid of the videos and sound files. Other than those it will be difficult. Gamelogic depends on the models (even though it shouldn't). But in my opinion we can just dump all the game files into an encrypted s3 bucket and use it. As long as it's not publicly downloadable we should be fine. That's how the VC6 compiler is currently set up. |
Yeah except our vc6 compiler is setup is also pretty legally murky. We could replace the models with stripped down versions that don't use any art but are just invisible polygons. |
I got a response from CCHyper/EAHyper regarding ini files and those are redistributable. We don't even have to remove audio and video file code. We can just replace those with blanks of the and length if needed. I think we can do something similar with .tga files and just replace them all with blank textures with the same name We just need to figure out model files and if we can sort those out then I think we should be in the clear |
To prevent any issues around the legality of the use of assets, this PR is going to take a lot of non code based work to get it into a workable state. Model data is used within the pathfinding which is required for the replay to work correctly. Which leads me to think that this PR will not be feasible in a form that allows a common CI option for the project and should be closed. |
We can put the gamedata into an encrypted S3 bucket. That way distribution is impossible. |
I agree that this isn’t easily feasible at the moment, so I’ll go ahead and close this PR. One thing I’d still like to explore is getting the replay test to run in a Linux environment. That would let me self-host the CI runner on my own hardware without running into legal concerns. It looks like Linux support is still in early stages (see #547 / #486), but I’ll keep an eye on it. |
The linux build won't be compatible because compatibility depends on VS6 optimizations. |
I'm implementing #1201. I cannot test everything in my fork due to missing secrets for R2 in order to install VC6. So please just approve CI workflow here in order for me to finish this work :)
I also have no clue about C++ development so @helmutbuhler could you check how/if your wish was correctly implemented: