Page 1 of 1

8Bit Unity now supports Github Actions for builds

Posted: Mon Nov 23, 2020 2:54 pm
by ibisum
Yesterday I submitted a slight tweak to 8bit-Unity - enabling Github Actions to build 8bit Unity projects.

This basically means that if you want to try out an 8bit-Unity project, all you need to do is fork the repo on github, make sure Actions are enabled, and then check the Actions -> Workflows -> Build -> Artifacts to find the compiled, ready to run .DSK image. edit: The actions get run whenever there is an update to the project - which is convenient for now, but we may switch to running these builds only on tagged releases in the future.

We set up actions for all of the onboard Unity projects: goblins, dungeon, slicks, grubs, os and the demos.

So what it means is, you can fork the repo - make changes to the projects code/resources, etc., and Github will build the .DSK image for you. No need to install Wine or use a Windows box - although those still remain viable in spite of these actions.

Anyway I thought I would point it out in case anyone is interested in hacking on 8bit Unity, but didn't have the patience for setting up a build host. Github'll do it for you now ..

EDIT: link to 8bit-Unity repo, where you can see this in action already: https://github.com/8bit-Dude/8bit-Unity

Re: 8Bit Unity now supports Github Actions for builds

Posted: Mon Nov 23, 2020 7:53 pm
by jbperin
Waou Yes !! It's crazy

I cloned the repo,
went into the directory
ran the _builder_.bat
The GUI appeared and I selected the build file of dungeon before clicking on Generate
next i went in the build dir where it had just generated some .bat script
I ran dungeon-oric48k.bat
And got a DSK file

It failed to directly load into Oricutron ... but I could load it manually and see it running.

It's all magic for me .. but yeah .. it works :-)

I didn't know this kind of magic was possible .. that's good !! thank you

Re: 8Bit Unity now supports Github Actions for builds

Posted: Mon Nov 23, 2020 8:05 pm
by ibisum
Yeah, you used the standard build process, which 8Bit-Dude has refined quite nicely.

What Github Actions mean is that you don't even need to do that - fork the repo, push a change to your fork, and you'll get .DSK files generated for you automagically on Github... without having to install the toolchains locally.

I think this really makes it easy to get started on an 8Bit-Unity project - but it *was* already kind of easy to do it locally, as you've found out ..

Re: 8Bit Unity now supports Github Actions for builds

Posted: Tue Nov 24, 2020 8:10 am
by jbperin
OK yes :-) I think i had missed the most important.

Then I :
- forked the 8 bit unity repository
- activated Actions on the forked repository
- cloned the forked repository
- made a little changed in source
- committed and pushed my change

And then I got a fresh DSK build on the repository .. I think it's the first time I produce a DSK file .. I had only made TAP file for now :-)

Great !! (It makes me dream of continuous integration)

I think that people who change the source code of the app will still have to be able to build locally for testing their mods before committing.

But it's very convenient for people who only want to work on artistic part of a game because they don't have to install a build environment.

Re: 8Bit Unity now supports Github Actions for builds

Posted: Tue Nov 24, 2020 8:16 am
by Dbug
jbperin wrote: Tue Nov 24, 2020 8:10 am I think that people who change the source code of the app will still have to be able to build locally for testing their mods before committing.

But it's very convenient for people who only want to work on artistic part of a game because they don't have to install a build environment.
Is that not doable with branches?

Re: 8Bit Unity now supports Github Actions for builds

Posted: Tue Nov 24, 2020 8:59 am
by ibisum
Dbug: two things to differentiate: branches and forks.

A fork is a complete copy of the repo, hosted on Github under the account of the person doing the fork. The purpose of a fork is to give a clean environment for Github to use in preparing Pull Requests - which are the product of comparing the personals copy with the original - often at a branch level, but there is no requirement to do modifications on a new branch. You can modify the 'main' branch on your fork and still get a successful PR made - or you could do it on another branch entirely, giving you the ability to compare your work with the original branch.

A branch is a more local 'waypoint', typically created in a devs local copy of the repository, for the purposes of isolating the original work with the new, modified version - so that comparisons can be easily made when the time comes to merge the new changes to the original source of the project - or locally, between branches.

They are not the same thing. A fork can have multiple branches, as a repo can have multiple forks, but devs are usually advised to work only on one fork - their own - and use branches to isolate workload.

This setup of Github Actions is great for people who don't want to commit heavily to setting up a local development environment - you can fork the repo, make changes to the artwork or source code, push the changes to your own Github fork, and get a .DSK built for you by Github, itself. This step simplifies the steps needed to start making changes in the project, and it also helps new developers get involved by giving them a .DSK file to test, automatically.

OF course the more sophisticated developers can still fork the repo, create their own local branch, commit their work locally, do local builds manually, and so on. The point of this contribution to 8Bit-Unity is to assist 8bit-Dude in getting new devs involved in the project, and also to be sure that contributions still produce working .DSK images ...

Re: 8Bit Unity now supports Github Actions for builds

Posted: Tue Nov 24, 2020 9:06 am
by ibisum
But it's very convenient for people who only want to work on artistic part of a game because they don't have to install a build environment.
Yes, exactly. The 8bit-Unity project has a great collection of games that are already being actively developed by interested devs (myself included) - but what we don't have is a group of artists who can help corral the art resources into a better state. Typically, Artists don't wanna have to build things locally, or run .BAT files, or fudge at all with compiler or build systems in general - they want to save the modified files, and get a result.

With this in place, artists can join the project, make modifications to the assets, and push their changes to their own repo - getting a .DSK file to test with, as a result. Without once touching a command line ...

Re: 8Bit Unity now supports Github Actions for builds

Posted: Tue Nov 24, 2020 10:56 am
by Dbug
ibisum wrote: Tue Nov 24, 2020 9:06 am With this in place, artists can join the project, make modifications to the assets, and push their changes to their own repo - getting a .DSK file to test with, as a result. Without once touching a command line ...
So, how would you recommend the artist get the assets from github, modify them, and push them?

Re: 8Bit Unity now supports Github Actions for builds

Posted: Tue Nov 24, 2020 11:21 am
by ibisum
Umm... use one of the hundreds of Git clients out there for the purpose?

For any artists who are interested:

a) Fork the repo on Github to your own Github user
b) Clone your forked repo locally using your Git UI of choice
c) Make your changes to the assets - e.g. in projects/dungeon/charmaps/quedex-oric.png
d) Push the changes back to your repo
e) Download the resulting .DSK file from "Actions->Workflows->dungeons-demo-oric .." and run it in an emulator
f) goto c) until satisfied.

I know its hard to believe, but even some artists can handle basic git operations these days ..