Closed f-koehler closed 3 years ago
Thanks @f-koehler -- seems like a good start and won't affect the current release process. What happens to the built artefacts? I assume they're not stored anywhere. Does that mean this will work like a rudimentary CI system, checking each commit builds?
I'll add some unit tests some day....
I just grabbed the default setup-go action and modified it to use multiple go versions as well as architectures. It runs on every push to the master branch as well as on every PR against the master branch. This does not do anything with the build artifacts, they will be deleted afterwards. So it does not interfere with anything (it is just an additional thing that ensures that the code runs fine).
When unit tests (as long as go test
detects them) are added they will also be run and the action will complain if one of them fails. I thought about how to do unit tests and think for such a project and think it is not as straightforward as for other types of codes. I will add my thoughts to #23 when I find the time.
One could take it further from here however and create releases automatically and/or upload to the build artifacts to them. I think something like goreleaser would be very helpful here. They also provide a GitHub action (docs are here).
One could decide how far one wants to take it. In my python projects I now trigger it by adding a special file to the repo that gets deleted by the action. This creates a tag, bumps version numbers and uploads python pacakges to PyPI. But one could also trigger it by creating and pushing a tag. Many thinks are conceivable here.
I think want I created so far is basic enough that it can be merged without causing any problems.
Excellent, thanks. That's the second time I've heard goreleaser mentioned so I'll take a look!
Dear @naggie,
please consider this PR for a Github action that automatically compiles the code (as discussed in #50). Currently it builds for the following architectures:
x86_64
arm
:v5
v6
v7
arm64
(armv8
)Adding more is straightforward. Two different go versions are used:
1.15
1.16
I discovered this nice website which tells you which go versions are supported. It is necessary to manually update the action from time to time.
As a next step it would be nice to add an action to automate releases. I do this for some python projects and it really saves a lot of time. But I think this action is a good start and enough for now.
With my best regards, @f-koehler