FortiusANT icon indicating copy to clipboard operation
FortiusANT copied to clipboard

Build executables via GitHub actions

Open marcoveeneman opened this issue 4 years ago • 8 comments

Build executables via GitHub Actions

This PR introduces automated builds of the ExplorANT and FortiusANT executables. The Executables are built on every new commit and can be downloaded when complete. This can be extended in the future with e.g. code linting, automated regression tests, release asset generation for GitHub releases etc.

Please let me know what you think about it.

marcoveeneman avatar Dec 05 '20 00:12 marcoveeneman

I think it is a good idea to automate the build for the following reasons:

  • It facilitates publishing new versions
  • It enables more people to test versions that are still under development without having to be able to run the project from source code

m472 avatar Dec 17 '20 13:12 m472

I am using this for the Genius branch now since someone has requested an exe file for testing (and I could never get this to work locally). Seems to be working fine, thanks!

I decided to split the result into two artifacts since most people probably don't need ExplorANT (https://github.com/switchabl/FortiusANT/commit/8e0cf31c4343a5922df765d77e5f6a1aab1cfc44).

switchabl avatar Dec 17 '20 14:12 switchabl

@m472 This is exactly why i submitted this PR, unfortunately it didn't get any attention yet. @WouterJD, any plans on merging this? @switchabl good to hear it is already of use for you :)

marcoveeneman avatar Dec 17 '20 20:12 marcoveeneman

unfortunately it didn't get any attention yet

Sorry, Marco - been busy with all other great idea's

most people probably don't need ExplorANT

True; ExplorANT.exe is for test-purpose only; I especially used it to test the i-Vortex code. @switchable: how did you split?

@marcoveeneman where does the code run (on github server?) Does this rebuild the .exe even when (for example) documentation is uploaded?

I recall you wrote something to exclude the .exe's from github's versioning; that is quite valid - since the old .exe do not serve a purpose and are really large. Same for .pdf, .xls, .hex where only last versions are usefull.

WouterJD avatar Dec 24 '20 09:12 WouterJD

This is the change to have two artifacts. Don't know if there are any disadvantages to that but has been working fine for me https://github.com/switchabl/FortiusANT/commit/8e0cf31c4343a5922df765d77e5f6a1aab1cfc44#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721

This is an example of what the build result looks like: https://github.com/switchabl/FortiusANT/actions/runs/433070862

switchabl avatar Dec 24 '20 11:12 switchabl

@WouterJD the code runs under GitHub actions, which is their version of a CI server (similar to Jenkins, etc) and does run on every push to the repository. @switchabl I am guessing it could be set to run only when a specific branch is changed, ie. a release branch or somesuch, but it is pretty lightweight in any case so I wouldn't worry too much about it.

todschmidt avatar Dec 30 '20 19:12 todschmidt

Let's continue the discussion after a small break :)

@WouterJD GitHub Actions is, as @tschmidty69 mentioned, a CI tool (Continuous Integration). This basically means that GitHub will automatically execute certain actions when new code is pushed to the repository, to automatically build and test the changes for example. This results in either success or failure, meaning you either added some good (or untested) code, or you broke something and you need to fix it. Actions are defined in .github/workflows/*.yml files.

To answer your question regarding the build of executables if documentation is updated. Short answer: yes, every new commit will trigger a new 'pipeline' which will execute all the tasks. What you then do with the result is up to you. You can store it somewhere or ignore it if you don't need it. Artefacts will be retained for 90 days by default, after that they are gone, which is perfectly fine.

Indeed, i mentioned removing the .exe files from the repository. This PR can help with this, since you never need to manually build an executable again. Instead, GitHub Actions will do it automatically for you, for every new commit on all your test branches. Once you are satisfied with a certain version on the master branch, you can add a git tag to it to make the release final. That commit will then show up on the releases page on GitHub. You can add the executables built by GitHub Actions as assets to the release so people can download it.

marcoveeneman avatar Jan 08 '21 09:01 marcoveeneman

I just checked and it is actually possible to skip certain actions depending on what changes you made. However i'm not sure how useful this is in our case.

marcoveeneman avatar Jan 08 '21 09:01 marcoveeneman

It'd be time to merge this PR....waiting for years. sorry @marcoveeneman

WouterJD avatar Feb 13 '24 20:02 WouterJD