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

Build executables via GitHub actions #160

Merged

Conversation

marcoveeneman
Copy link
Contributor

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.

@m472
Copy link

m472 commented Dec 17, 2020

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

@switchabl
Copy link
Contributor

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 (switchabl@8e0cf31).

@marcoveeneman
Copy link
Contributor Author

@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 :)

@WouterJD
Copy link
Owner

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.

@switchabl
Copy link
Contributor

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
switchabl@8e0cf31#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721

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

@tschmidty69
Copy link

@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.

@marcoveeneman
Copy link
Contributor Author

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
Copy link
Contributor Author

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 marcoveeneman force-pushed the build-executable-via-github-actions branch from 61f3e6a to c1bb13e Compare February 4, 2021 16:37
@WouterJD WouterJD merged commit 291fce6 into WouterJD:master Feb 13, 2024
@WouterJD
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants