-
-
Notifications
You must be signed in to change notification settings - Fork 298
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 binaries using Github actions. #181
Conversation
…plementation based on sysinfo and netstat2.
# Conflicts: # Cargo.lock
# Conflicts: # Cargo.lock # Cargo.toml
# Conflicts: # Cargo.lock # Cargo.toml
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.
Awesome. :) I left some minor comments, and after we merge the opensockets PR I think we can definitely go ahead with this one and even use this instead of travis.
.github/workflows/ci.yaml
Outdated
pull_request: | ||
push: | ||
branches: | ||
- master |
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.
We use main
as our main branch
.github/workflows/ci.yaml
Outdated
strategy: | ||
matrix: | ||
build: | ||
# We test ripgrep on a pinned version of Rust, along with the moving |
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.
ripgrep => bandwhich :)
.github/workflows/ci.yaml
Outdated
push: | ||
branches: | ||
- master | ||
- actions |
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.
I think we can remove this once we're ready to merge and don't need to debug anymore, right?
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.
Exactly
.github/workflows/ci.yaml
Outdated
rust: stable | ||
- build: nightly | ||
os: ubuntu-18.04 | ||
rust: nightly |
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.
Right now on travis, our nightly branch is allowed to fail and we just use it as an FYI. Is there a way to do this here too?
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.
Not now unfortunately. I'm not familiar with setting up checks for pull requests, but I guess that we could do ci action with only stable as a gate for pull requests and ci_nightly which would build but would not guard anything.
Hey @remgodow, let me know if there's anything I can pick up on this side. Maybe I can work on the binary release part a bit? (eg. keep our naming convention, make it build/release a generic musl linux file, etc.)? Also, what do we have left after this? (I know I've asked before somehwere, but I can't seem to find where just now - sorry :) ). |
@imsnif Sure, feel free to adapt it for project needs. We could add an information for Windows users that WinPcap or NpCap in WinPcap compatible mode is required for bandwhich to work, with a link to NpCap, as WinPcap is depracated. An extra for windows users would be a package for chocolatey/scoop package managers. |
Scoop looks easy, its uses a simple json with project description and links to binaries as a package manifest. To add it to the repository you make a pull to scoop repo. Here is an example for ccache |
Hey @remgodow, there seems to be a git hitch that I'm not sure I have the permissions to fix here. Could you please merge main into here? I did this locally but am not able to push. I think it's just getting everything from main except the actions themselves. |
Also, @remgodow - as a side note, I would very much like to add you as an author in Cargo.toml - since you made a very significant contributions. If you'd like that, please add yourself to the bottom of the authors with your email address (if you'd like to include it). |
# Conflicts: # Cargo.lock # Cargo.toml # build.rs # src/os/linux.rs # src/os/lsof.rs # src/os/lsof_utils.rs # src/os/shared.rs
The issue with pushing to the branch is caused by release action - right now, it creates /refs/heads/action tags. Therefore it is neccesary to delete release and tag on the fork page to allow pushes. I've added you as collaborator to my fork, I hope that it will allow you to test actions and remove test releases. |
I played around with this a little. Github actions look cool, but tbh - while I do see the benefit of releasing additional executables, this is too much of a time sink for me right now. Seeing as this isn't blocking anything (to my knowledge) at the moment, I'm going to leave this open and get back to it if the need becomes more pressing. Thanks again for the work on this and the windows port! |
@imsnif I have adopted release action to current release versioning, and added musl target. Would you need anything else? |
This looks great! Thanks :) A few things:
|
…d on github, tar executable without directories
|
This looks really great. I don't have a lot of time to devote to it right now, but I plan on releasing a new version in the next few days, so will definitely merge this and use it for the release beforehand. |
So, unfortunately working with github acations is a no-go for me at the moment. I merged this and tried to work with them, but they fail consistently on macos because of some sort of race condition. I realize that the fault here is in the tests themselves and that a proper fix would be to find the race condition and fix it there, but after spending some time on it I can see that this might not be trivial. At the moment, the travis tests do what we want them to (they sometimes also fail here as well, but much more rarely and almost always run successfully when re-run). So, for our current needs I think they are enough. Thanks very much for your work on this. I realize you put a lot of effort here. We gave it a good go, but I guess at least in our case, travis is a better option. The actions are still in main but I disabled github actions on this repository so the output will not confuse those wanting to contribute. Maybe in the future I'll give them another go. |
Sure thing, the benefit of nigtly and ci actions over travis was having the artifacts, but its not a deal breaker when it comes to developent builds, hovever there is also a release actions which works on all platforms and is triggered manually by creating a release (as it builds and uploads the artifacts, without testing). Therefore I would suggest deleting nigtly.yaml and ci.yaml, keeping the release.yaml. This way you could benefit from artifacts for releases, while keeping travis for CI/pull requests. |
By the way, if there is anything I can help with, let me know. I may have some time next week, and I've seen that the windows port caused issues for other systems through the dependencies. |
Uff, yeah - it was a hot mess but I think I took care of it here: #190 :) If you'd like something else to work on, this has resurfaced recently: #150 |
A proposal of fix for #46.
Saves debug binaries for all OS in Github Action Artifact.
Branched from Windows pull request to test Windows OS builds.
Based on ripgrep