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

Automatically build binaries for Popular Linux archs #253

Merged
merged 14 commits into from
Dec 8, 2022

Conversation

hardillb
Copy link
Contributor

@hardillb hardillb commented Dec 8, 2022

This GH action uses the golang docker container to build the library for the following platforms:

  • Linux/amd64
  • Linux/arm64
  • Linux/armv7
  • Linux/armv6

Once built it adds them to the release as zip files

Links against version 2.0.15 of mosquitto but it's an env var at the top of the action so easily updated.

I couldn't get x86 to build nicely but less people are using that now and MacOS will take more work but I might see if I can get it going for a follow up PR.

fixes #162

part of FlowFuse/installer#53

@iegomez
Copy link
Owner

iegomez commented Dec 8, 2022

This looks good.
Thanks, @hardillb!

@iegomez iegomez merged commit 06df2d9 into iegomez:master Dec 8, 2022
@hardillb
Copy link
Contributor Author

@iegomez Can you give me a hint to when you might be planning the next release? Just need to decide if I need to build/ship my own builds with the next @flowforge release or if I can just point over here.

Thanks.

@iegomez
Copy link
Owner

iegomez commented Dec 12, 2022

I can release right now with a target of 2.1.0 if that works for you, @hardillb.

Let me know.

@hardillb
Copy link
Contributor Author

That would be great.

Our next release is next week, but need to write the docs and test.

@iegomez
Copy link
Owner

iegomez commented Dec 12, 2022

Ok, you got it.

@iegomez
Copy link
Owner

iegomez commented Dec 12, 2022

There's a problem with the integration for building: https://github.com/iegomez/mosquitto-go-auth/actions/runs/3677500924

If you can't see that, it's basically this:

Run softprops/action-gh-release@v1
[11](https://github.com/iegomez/mosquitto-go-auth/actions/runs/3677500924/jobs/6219542359#step:7:12)
⚠️ Unexpected error fetching GitHub release for tag refs/tags/2.1.0: HttpError: Resource not accessible by integration
[12](https://github.com/iegomez/mosquitto-go-auth/actions/runs/3677500924/jobs/6219542359#step:7:13)
Error: Resource not accessible by integration

I'm terribly busy these next few days, so sorry if I can't give it a look soon.

@hardillb
Copy link
Contributor Author

I'll have a play on my fork and see if I can work out what went wrong.

It was just the last step of adding the zips to release, everything else appears to have worked properly.

@hardillb
Copy link
Contributor Author

You may want to delete the release and tag so we can re-run it cleanly later.

@iegomez
Copy link
Owner

iegomez commented Dec 12, 2022

Yeah, I'm guessing that this may need some secret set in order to have access to publish to the release:

      - name: Release files
        uses: softprops/action-gh-release@v1
        with:
          files: |
            output/linux-amd64.zip
            output/linux-arm64.zip
            output/linux-armv6.zip
            output/linux-armv7.zip

Something similar to what's done in the Docker publishing workflow:

        name: Login to DockerHub
        uses: docker/login-action@v1
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

@iegomez
Copy link
Owner

iegomez commented Dec 12, 2022

You may want to delete the release and tag so we can re-run it cleanly later.

Already did.

@hardillb
Copy link
Contributor Author

Hi, don't suppose you have time to look at this again?

I had a look at my local fork an I don't have any secrets defined for the action to use, the only thing I can think of is that under the project settings -> code and automation -> actions -> general at the bottom I have Workflow Permissions set to Read and Write permissions.

@iegomez
Copy link
Owner

iegomez commented Jan 30, 2023

I'm currently on vacation and coming back on Feb 6 or 7, I can take a look then.

@iegomez
Copy link
Owner

iegomez commented Mar 12, 2023

Ooph, I clearly failed to check on this and only remembered cause Dependabot's auto PRs failed to build Docker images (and that was a couple of weeks ago too, sigh).
I'll open an issue as a reminder to set the credentials and try it.

@iegomez
Copy link
Owner

iegomez commented May 24, 2023

@hardillb I'm glad to announce that after a couple of tweaks I got the binaries release working.
You can see it in this pre-release: https://github.com/iegomez/mosquitto-go-auth/releases/tag/2.0.2-test

I'll go ahead and properly release now.
Thanks again for your contribution.

Cheers!

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.

Provide pre built binaries
2 participants