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

Add binary build and release workflow #77

Merged
merged 11 commits into from
Mar 9, 2022

Conversation

micxer
Copy link
Contributor

@micxer micxer commented Jul 21, 2021

This adds a workflow (or actually several parallel ones) that gets triggered for a new tag. It builds binaries for several different platforms, creates a release and attaches them as downloads. I wasn't able to make this work for arm64 (because of ring) therefore I commented that part for now.

You can have a look at my fork for how these releases will look like.

Fixes #59.

Copy link
Collaborator

@qdm12 qdm12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! A few comments 😉

Cross.toml Outdated Show resolved Hide resolved
.github/workflows/release-binaries.yml Outdated Show resolved Hide resolved
.github/workflows/release-binaries.yml Outdated Show resolved Hide resolved
.github/workflows/release-binaries.yml Show resolved Hide resolved
.github/workflows/release-binaries.yml Outdated Show resolved Hide resolved
.github/workflows/release-binaries.yml Show resolved Hide resolved
.github/workflows/release-binaries.yml Outdated Show resolved Hide resolved
.github/workflows/release-binaries.yml Outdated Show resolved Hide resolved
@micxer micxer force-pushed the add-binary-build-and-release branch 2 times, most recently from 9a92e62 to fe5155c Compare July 24, 2021 19:28
@micxer
Copy link
Contributor Author

micxer commented Jul 24, 2021

So, I should work as expected. I also fixed a bug in the checksumming.

On a side note: I have no idea about rust and am working with github actions for the first time. Probably my DevOps background and countless hours with Jenkins helped a little 😆

@micxer micxer requested a review from qdm12 July 26, 2021 18:46

# - target: armv7-unknown-linux-musleabi
# os: ubuntu-latest
# name: prometheus_wireguard_exporter-armv7-unknown-linux-musleabi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this one commented? 🤔

It's quite an important one, I think most arm devices are armv7 today

Copy link
Contributor Author

@micxer micxer Aug 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't make this work. Any suggestion of someone more experienced with Rust and Cargo is welcome. My issue here is cross compiling ping. And from the looking around I'm not the only one having issues with that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 I had the same issue when adding cross compiled Rust binaries for the Docker image and solved it somehow.. Now I don't remember how even when looking at my Dockerfile 😢

What's the error log you get? It's also rather strange you get the error for armv7 but not arm for example.

Regarding the apple-aarch64 I'm not sure since I'm not building it for Docker, so maybe it's another issue. But the Dockerfile is definitely building the binary for armv7-unknown-linux-musleabi so we should be able to solve it.

.github/workflows/release-binaries.yml Show resolved Hide resolved
.github/workflows/release-binaries.yml Show resolved Hide resolved
Cross.toml Outdated
@@ -0,0 +1,2 @@
[target.x86_64-unknown-freebsd]
image = "docker.io/rustembedded/cross:x86_64-unknown-freebsd"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is the same as .cargo/config.toml, but it might be. Maybe move that to https://github.com/MindFlavor/prometheus_wireguard_exporter/blob/master/.cargo/config.toml?

Would it be possible that the existing .cargo.config.yml conflicts with e.g. the armv7 build you're trying to achieve? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

@micxer micxer force-pushed the add-binary-build-and-release branch from fe5155c to df7ac37 Compare August 27, 2021 21:41
@MindFlavor MindFlavor requested a review from qdm12 November 3, 2021 14:03
@micxer
Copy link
Contributor Author

micxer commented Mar 9, 2022

Nothing new here? @qdm12 anything missing?

@qdm12
Copy link
Collaborator

qdm12 commented Mar 9, 2022

Let's merge as is, sorry I left this for so long, I got caught up in other stuff 😅

We can adjust with more PRs later down the line.

@qdm12 qdm12 merged commit d987baf into MindFlavor:master Mar 9, 2022
@micxer micxer deleted the add-binary-build-and-release branch May 10, 2023 12:53
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.

It would be nice if github releases had binaries for download
3 participants