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

Automating Builds with Github Actions #338

Open
DarthFutuza opened this issue Mar 17, 2022 · 2 comments
Open

Automating Builds with Github Actions #338

DarthFutuza opened this issue Mar 17, 2022 · 2 comments
Labels
discussion Requires discussion among developers. priority:low
Milestone

Comments

@DarthFutuza
Copy link
Member

DarthFutuza commented Mar 17, 2022

Travis CI no longer offers free builds and I don't really want to bother with them anymore since it seems like they're basically dead for open source at this point. Github Actions is free and we should probably move to this anyway. If someone wants to help with setting this up, I'd greatly appreciate it as I don't have much time to think about this and the game itself.

I put a discussion label on this, because I'd like to also ask if we should re-evaluate how we do builds and what a better way of doing it would be. Automagic would be best if possible. Some sort of testing might be nice too, not sure what would be good though. Here's some thoughts:

Builds:

  • develop is automatically built anytime a new commit is sent to it or a merge happens etc. Builds for windows on msvc, linux on clang/gcc , macOS on clang. Should do both a debug and release build (or just release?) If the build fails, ping the one responsible in Discord.
  • develop should maybe run some basic tests as well such as checking all ext_data is valid (so you can't commit bad json without getting an error etc). Maybe also check lua?
  • master behaves similarly to develop, but maybe has more in depth tests such as after successfully building and passing other tests: start the game (as a client and server separately), load up a map, join a team, shutdown. Report any crashes before shutdown as a failed test. Other testing?
  • master also automatically generates a windows binary zip (jkgalaxies.x86.exe, jkgalaxiesded.x86.exe, rd-galaxies_x86.dll, JKG/cgamex86.dll JKG/gamex86.dll, JKG/uix86.dll as well as packing the contents of the ext_data/JKGalaxies directory & JKGServer directory etc into JKG/zz_JKG_Assets5.pk3 as appropriate). Should also build similar binaries for linux and mac. Where to upload these? Want this on jkgalaxies.net?
  • If a beta/pre-release tag is created pull and build this from the current master
  • If a stable/normal release tag is created, a developer needs to verify each version manually by testing the executable and playing it on Windows, Linux and Mac before the release can be published.
  • other branches are not automatically built unless manually requested
  • asset integration somehow? need a proper host for this
  • also want something to update the jkgalaxies website with pre-release/beta and stable release info so I don't have to manually upload links etc.
  • automatically uploading to mirrors would be great too

Developer workflow (starting from a stable release):

  1. switch to develop branch
  2. increase version number (eg: v1.3.27 to v1.3.28)
  3. work on features for next milestone
  4. if you need to deviate from the milestone or work on a large feature, branch from develop to a new branch
    4a. when finished with new feature, merge back into develop (update version number if appropriate)
  5. when milestone is ready for next pre-release/beta, manually test build and then merge develop into master
  6. build master and download binaries - test internally on all supported OSes (Windows 10, Ubuntu, MacOS Catalina) with developers
  7. draft a new tag, write patch notes, upload binaries to it
  8. upload/collect assets
  9. publish tag
  10. update links to assets and binaries on the jkgalaxies.net download webpage for beta/pre-releases
  11. push changes/publish web page changes
  12. upload to beta mirrors (only limited mirrors will support the beta)
  13. update links to mirrors and push/publish web page changes
  14. schedule 481st beta test match
  15. test game, review reported bugs, repeat
    15b. If bugs, switch back to develop, update version, then when bugs are fixed (try not to add any new features!) go back to step 5, release new beta and test again
    15c. if no serious issues during play test, publish as stable release, otherwise repeat again
  16. upload to mirrors and announce
  17. schedule community scrimmage match
  18. start next milestone feature
    repeat
@DarthFutuza DarthFutuza added discussion Requires discussion among developers. priority:medium labels Mar 17, 2022
@DarthFutuza DarthFutuza added this to the Web Ops milestone Mar 17, 2022
@DarthFutuza
Copy link
Member Author

@DarthFutuza
Copy link
Member Author

This has been started! ( with commit a0d31ed ):

Develop & master both now build release builds for 64bit/32bit windows & linux with any push or pull request.
The next thing is probably to add testing the json files (in JKGalaxies) to make sure they are valid/properly linted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Requires discussion among developers. priority:low
Projects
None yet
Development

No branches or pull requests

1 participant