Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Feedback DevOps CI/CD and branching strategy

Discussion in 'Open Projects' started by L4ZZA, Oct 5, 2020.

  1. L4ZZA

    L4ZZA

    Joined:
    Dec 20, 2019
    Posts:
    5
    Hi guys, I would like to contribute and add github actions to build the project, run tests (if any) and release the binaries if both the previous steps succeed.

    My current plan is to create one on the master branch since is the only shared branch, but I would like to consider the introduction of a develop branch where all the code can get tested before ending up on the release branch (aka master).

    The option of having a release branch also works (https://forum.unity.com/threads/question-on-using-git-flow.981672/) as it's the same process just with different branch names.

    Let me know what you think and if it's something you would consider as well as if I can start with this and have a card on https://open.codecks.io/unity-open-project-1 possibly under a new DevOps deck.
     
    Last edited: Oct 5, 2020
    rcabreraortiz and GhAyoub like this.
  2. MileyUnity

    MileyUnity

    Joined:
    Jan 3, 2020
    Posts:
    92
    Whilst I like this idea, I think it's too early in the development in order to setup any automated builds and unit tests. Once we pass the pre-production stage we can look in to this and see what's possible :)
     
  3. hemanthvanam

    hemanthvanam

    Joined:
    Mar 3, 2019
    Posts:
    11
    I also would love to work on Unit testing as this would help in speeding up the process of testing where any PR broke any functionality before merging.
     
  4. Megatank58

    Megatank58

    Joined:
    Jul 20, 2020
    Posts:
    44
    I would like to help in unit testing too
     
  5. GhAyoub

    GhAyoub

    Joined:
    Dec 7, 2018
    Posts:
    10
    I'm here to help as well!
     
  6. RunninglVlan

    RunninglVlan

    Joined:
    Nov 6, 2018
    Posts:
    182
    Hi, @L4ZZA, what do you think about this idea I suggested in another thread?
     
    Last edited: Oct 22, 2020
  7. L4ZZA

    L4ZZA

    Joined:
    Dec 20, 2019
    Posts:
    5
    @RunninglVlan That is one other advantage of automating the build early on.
    I do like the idea there, but at the moment the whole project seems to be stuck at the template code and I can't foresee any automation to be implemented anytime soon.
     
  8. rcabreraortiz

    rcabreraortiz

    Joined:
    May 10, 2019
    Posts:
    6
    Now you're speaking my language, @L4ZZA. My day job is building/testing server infrastructure with CI/CD pipelines, but I haven't explored this with Unity or with any general game development process. This is really interesting and I would love to learn how this is applied to games, so I'm adding my comment here to follow. :)
     
  9. RunninglVlan

    RunninglVlan

    Joined:
    Nov 6, 2018
    Posts:
    182
  10. o92design

    o92design

    Joined:
    Jun 19, 2018
    Posts:
    4
    It's not too early for an automated process of building the Project. I would say it's essential to have it as soon as possible since it will automate many small tasks which everyone should do before pull request but isn't since it's a open source project with many different levels of experience.

    Just a simple build pipeline to confirm that noone breaks anything by adding some stuff is the least at this stage. A build which confirms that it can be built on Selected target and that it starts up properly. Far too many times have I've been involved with GameJams which we only ran the game in the Editor and then when Building it for real Nothing worked. Since then, that is one of the preperations which I make before entering a GameJam. Setup A CI flow for the project.

    At this moment we're having 18 pull requests waiting to get into master - having a basic build running would give us an indicator on which to prioritize.

    Since @L4ZZA, @rcabreraortiz and @RunninglVlan seem to have some knowledge in this area maybe they could come up with basic editor script which we later on expand upon in order to have a first setup.

    Pros for getting the CI / CD Started now:
    • Basic protection in the beginning for everyone to use
    • Common tasks are automated and can be run locally
      • Build Project with correct settings
        • Future Test Cases ( Not Unit Tests )
        • Game Levels
        • Gives Devs a local build before making pull request
      • Choose Test Cases to be run on Build
    • Historical Releases
    • Data can be generated in order see which areas should be supported
    • Instead of waiting for approval on small fixes we could maybe have an automated process?
    • Checks on small annoying stuff which is easy to forget
      • Linting (See that we are having right now)
      • Unity Version Handling
      • Art Asset checks - correct formatting and stuff
    Cons for CI / CD
    • Someone to be responsible in the long term of the DevEnv
    • Data Storage handling - Logs etc.
    • Only using Actions may not be sufficient
    Getting a Test Case up and running will also work as a semi-showcase in regard of how the project works.

    There also seem to be a draft up on this https://github.com/UnityTechnologies/open-project-1/pull/110
     
    Prodigga and RunninglVlan like this.