Skip to content

Add GitHub actions to lint, check dependencies, and run tests for the Rust bindings#5

Merged
pac-work merged 1 commit intopac-work:rust-bindingsfrom
cwtchan:feature/add-github-actions
Aug 27, 2025
Merged

Add GitHub actions to lint, check dependencies, and run tests for the Rust bindings#5
pac-work merged 1 commit intopac-work:rust-bindingsfrom
cwtchan:feature/add-github-actions

Conversation

@cwtchan
Copy link

@cwtchan cwtchan commented Aug 1, 2025

This probably shouldn't be using the mxl-not-built feature but it does make it easier.

@cwtchan cwtchan force-pushed the feature/add-github-actions branch from 70c3ad0 to cb5ad4f Compare August 1, 2025 09:50
@pac-work
Copy link
Owner

pac-work commented Aug 1, 2025

I have literal 0 knowledge about the GitHub pipelines... @pedro-alves-ferreira, you were yesterday mentioning that you can look at the pipelines - maybe @cwtchan did what you meant already?

By the way, sorry, @cwtchan for already merging the destination of this PR. I hope it will be easy to change the destination directly to the https://github.com/pac-work/mxl/tree/rust-bindings . The branch contents should be the same.

@pedro-alves-ferreira
Copy link

@pedro-alves-ferreira, you were yesterday mentioning that you can look at the pipelines

Yes, I'll start working on that on Monday.

@cwtchan cwtchan changed the base branch from rust-bindings-allow-building-without-version-h to rust-bindings August 4, 2025 13:05
@cwtchan cwtchan force-pushed the feature/add-github-actions branch from cb5ad4f to ae225c4 Compare August 4, 2025 13:13
@pedro-alves-ferreira
Copy link

Thanks for this, @cwtchan! I will try to find some time to test it out later today.

@pedro-alves-ferreira
Copy link

pedro-alves-ferreira commented Aug 12, 2025

@pac-work @cwtchan I'll go over this today and see if we can reuse what the C++ build does, and build the Rust stuff against an installed libmxl + headers.

How do you want to deal with the sign-off of all commits? The only thing I can imagine is to create a branch, do fixup commits on top of that branch, and then, prior to opening a PR to mxl/main, we do a --autosquash. What do you think?

@cwtchan
Copy link
Author

cwtchan commented Aug 12, 2025

@pac-work @cwtchan I'll go over this today and see if we can reuse what the C++ build does, and build the Rust stuff against an installed libmxl + headers.

How do you want to deal with the sign-off of all commits? The only thing I can imagine is to create a branch, do fixup commits on top of that branch, and then, prior to opening a PR to mxl/main, we do a --autosquash. What do you think?

This sounds fine to me.

@pedro-alves-ferreira
Copy link

I'm doing it here: https://github.com/bisect-pt/mxl/commits/feature/add-github-actions/
I've already rebased onto main and added the licensing information to all files. It would be appropriate if you both signoff this commit too.
Let me see how far I can get today in terms of the CI stuff. I'll be away for a week starting tomorrow.

@pedro-alves-ferreira
Copy link

@pac-work @cwtchan

Here's the status:

I opted for adding steps to the existing build.yml file. The reason is one of the requirements we got was to make sure everything should build off a container defined using the project's Dockerfiles. It doesn't see trivial to do that using packaged git actions. So, what I did was to run cargo (clippy, build and test) in the container.
Let me know what you think and if you have a better alternative. Thanks!

@cwtchan
Copy link
Author

cwtchan commented Aug 12, 2025

@pedro-alves-ferreira the only thing I would ask, is can it not live in a different workflow file?

@pedro-alves-ferreira
Copy link

Absolutely. I'm just not sure how to do it, while at the same time reusing the mxl build step that happens before it.
What I've been considering is to change build.rs so that it builds mxl from the ground up using CMake, so we don't care if it's built beforehand. Just like any other external crate. That would simplify things, both for CI and for development. What do you both think?

@pac-work
Copy link
Owner

pac-work commented Aug 13, 2025

How do you want to deal with the sign-off of all commits? The only thing I can imagine is to create a branch, do fixup commits on top of that branch, and then, prior to opening a PR to mxl/main, we do a --autosquash. What do you think?

I do not really have experience with fixup commits. I am OK with that, as long as it keeps the history. Losing history is always something I try to avoid, if for no other reason, then to know who I need to contact if some code is suspicious.

All my commits were signed off - is there anything I should do with them to make this work? I guess a fixup commit for that licensing, to show that we agree with the license?

I briefly read on those fixup commits - so they will get merged to the https://github.com/pac-work/mxl/tree/rust-bindings on top of everything, then I will run rebase with --autosquash (which needs to be done anyway to get it on top of the recent MXL) and that will alter the previous commits which were missing signoffs?

@pedro-alves-ferreira
Copy link

pedro-alves-ferreira commented Aug 13, 2025 via email

@cwtchan
Copy link
Author

cwtchan commented Aug 14, 2025

Absolutely. I'm just not sure how to do it, while at the same time reusing the mxl build step that happens before it. What I've been considering is to change build.rs so that it builds mxl from the ground up using CMake, so we don't care if it's built beforehand. Just like any other external crate. That would simplify things, both for CI and for development. What do you both think?

I have got something which builds mxl using build.rs but it's a little unique to my situation as I use Nix.
I added some options in some of the CMakeLists to not build the tools nor tests if we find that useful.

@cwtchan
Copy link
Author

cwtchan commented Aug 14, 2025

I've added a PR for compiling the base MXL library when compiling `mxl-sys` here
@pedro-alves-ferreira @pac-work

@pac-work pac-work force-pushed the rust-bindings branch 3 times, most recently from 81d6dba to eb83e4e Compare August 22, 2025 10:12
Signed-off-by: Chris Chan <chris.chan@techex.co.uk>
@cwtchan cwtchan force-pushed the feature/add-github-actions branch from ae225c4 to 4f84e87 Compare August 26, 2025 19:17
@pac-work pac-work merged commit f341728 into pac-work:rust-bindings Aug 27, 2025
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.

3 participants