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

[Feature Add] Compiling RPM in GitHub CI #83

Open
alextrical opened this issue Dec 20, 2023 · 5 comments
Open

[Feature Add] Compiling RPM in GitHub CI #83

alextrical opened this issue Dec 20, 2023 · 5 comments

Comments

@alextrical
Copy link

alextrical commented Dec 20, 2023

Hi

I have currently got the GitHub CI to compile the RPM package, but I'm not sure how to get this into a state ready to be able to generate Both the existing .DEB and the new .RPM
Please can you look over the workflow found here https://github.com/alextrical/stl-thumb/blob/master/.github/workflows/build-ci.yml
And let me know how you feel about this. I suppose the best fix may be to add the X86_64 RPM generation to a new Step in the Workflow

The compiled binaries can be found at https://github.com/alextrical/stl-thumb/releases/tag/release

@unlimitedbacon
Copy link
Owner

Thanks. It would be very nice to get this going.

The current CI script cross compiles Debian packages for several different processor architectures. Specifically, armhf and arm64 for use on a Raspberry Pi or other embedded systems.

Do you think there is value in doing RPM builds for all these architectures as well? Or is x86_64 the only one that is really necessary? As far as I know, RedHat based distros are not commonly used on embedded systems.

@alextrical
Copy link
Author

Awesome, I can look into getting the workflow into a format more acceptable for merging into the main repo then. Now it's shown that it's possible to compile a RPM in a Ubuntu based workflow ^_^

I'm not familiar with using Redhat/Fedora on anything other than x86_64, but depending on the difficulty it may be worth compiling for the other architectures too. (That's going to be a bit of a learning curve for me to work out how that loop logic works)

Give me a few days and I will try and have something ready to review for merge

@alextrical
Copy link
Author

alextrical commented Dec 24, 2023

It seems one of the biggest issues with the workflow was getting it to actually run.
Ubuntu 18.04 doesn't seem to be in the roster anymore, so the workflow wouldn't run.
After updating the script to make use of 22.04 and getting it working as intended, I've started work on getting the RPM build added into the workflow, though i've got some bugs to iron out of that it seems (specifically Asset file not found: ./target/release/stl-thumb that cargo generate-rpm seems to love to throw.

Edit:
A bit of an ugly fix is to copy the files to the needed location, after cargo deb completes its build of the required files with cp -r ./target/${{ matrix.target }}/release ./target
It feels wrong that cargo deb compiles its required files/folder structure, but cargo generate-rpm doesn't

@alextrical
Copy link
Author

From what i can tell the Build action is outputting into ./target/x86_64-unknown-linux-gnu/release/stl-thumb but the cargo generate-rpm expects the files to be at ./target/release/stl-thumb Now to work out how to get it to take the --target variable

@alextrical
Copy link
Author

PR related to this feature has been submitted #84
Now to take a look at the requirements to get the KDE plugin working reliably on Fedora Atomic/Kinoite

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

No branches or pull requests

2 participants