-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add build scripts and optimized GitHub Actions #1860
base: main
Are you sure you want to change the base?
Conversation
4e54e01
to
eb9a452
Compare
eb9a452
to
bcab3f5
Compare
Building the wasm version fails for old (20.04) ubuntu installations. Not an issue, but should probably be mentioned somewhere. I didn't capture a log, but it was to do with aqt needing a newer version of python than what you get with that old ubuntu. Building the wasm version works fine on a fresh ubuntu 24.04 vm.
I can see that the file was downloaded to /tmp, and if I run the command manually: |
@@ -0,0 +1,82 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should all these new bash scripts have the executable flag set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't they? Else I have to modify the permissions in GitHub Actions before running the scripts or call them with bash.
If I manually install the toolchain:
... then source the environment setup stuff: ... then start the gx build, I get an error:
|
I only have a linux box, I can't test this for mac or windows. Would you expect it to work on these platforms? |
I understand these scripts make it easier to build, in terms of combining the package installation + configure + build steps, but should these scripts really be in the repo? It looks like they have various specific requirements/assumptions (e.g. Linux builds, doing clean builds, putting build dir inside the repo) so that it may often be easier to build without the scripts. Or, in other cases it is simple enough that you don't need a separate build script (e.g. build-gx.sh). I'm not sure how much benefit we get from adding these scripts, as opposed to having some improved build documentation, and this also creates additional tools that need to be maintained going forward. |
@DanielMcInnes if you install manually the Victron SDK you need to create a symlink for
This sould already be fixed. It was because the command executed was I tested it on a fresh Ubuntu VM, on Windows with a WSL Ubuntu container and GitHub Actions. All mentioned use Ubuntu 24.04. The scripts won't work natively on Windows. For macOS I'm not sure, but don't think that it will work, since @blammit the idea was to make it easy for community members to build the GUI and therefore also to make it attractive for developing and testing custom modifications. It's easy to build the GUI if you have QtCreator installed, but if you have not (like me and nearly all of the community), then this is quite a pain. It's also very complex to setup QtCreator correctly, see #492 and #1389. This scripts also reduce maintenance for build scripts used in GitHub Actions, since all needed data is now fetched from the prepare script and those scripts are run to build the wasm file in the GitHub Actions. From my point of view, this is a huge benefit, since:
|
bcab3f5
to
618140b
Compare
I like the added convenience this brings to linux users, especially building and installing mqtt. I imagine similar scripts would be required for windows & mac users, resulting in 3 sets of build scripts that need to be maintained, which is not ideal. I think this would be better done via cmake, which would give you the same build behavior on all 3 platforms. See |
Some script were added to make it much easier for everyone to locally build GUIv2 for a GX device and as WebAssembly.
GitHub Actions were also modified to execute the new scripts, which makes maintenance less time consuming. For example the emscripten and QT version are now always fetched from one single script and do not need to be updated in multiple scripts, GitHub Actions and wiki:
gui-v2/build-wasm-install-requirements.sh
Lines 5 to 7 in 9886dac
I tested the scripts on Windows with a fresh Ubuntu WSL container and with GitHub Actions.
After this PR is merged, also the wiki has to be modified and simplified.
I added also a
.gitattributes
file to fix automatically the line endings of*.sh
files, else they were always converted toCRLF
instead ofLF
.