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

build(ci): release artifacts for freebsd #1192

Merged
merged 5 commits into from
Jan 25, 2024

Conversation

kranurag7
Copy link
Contributor

Adds support for oras on freebsd os. It adds make target for compiling oras binary on freebsd and updates goreleaser config to release for freebsd as well.

Note

I've not tested it on a freebsd system. I only tested go compiling the program to an executable.

make targets

$ make build-freebsd
GOARCH=amd64 CGO_ENABLED=0 GOOS=freebsd go build -v --ldflags="-w -X oras.land/oras/internal/version.GitCommit=9ecf303eeb2620dfe3ddf15721999d1f7e8fd4bf -X oras.land/oras/internal/version.GitTreeState=dirty" \
	-o bin/freebsd/amd64/oras oras.land/oras/cmd/oras
$ file bin/freebsd/amd64/oras
bin/freebsd/amd64/oras: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 12.3, FreeBSD-style, Go BuildID=nJPfJNS3LfJNcKUnioi_/X0yuGUxMlHdwTByT063Y/VfH381P8Oh6iX6eAu6qc/FP_dvr9XPXmKk77-JLXA, not stripped

goreleaser snapshot

$ goreleaser release --snapshot
# truncated 
    • creating                                       archive=dist/oras_1.1.0-SNAPSHOT-9ecf303_freebsd_amd64.tar.gz
$ file dist/oras_freebsd_amd64_v1/oras
dist/oras_freebsd_amd64_v1/oras: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 12.3, FreeBSD-style, stripped
$ tar -tf dist/oras_1.1.0-SNAPSHOT-9ecf303_freebsd_amd64.tar.gz
LICENSE
oras

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1179

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

this commit adds support for oras on freebsd os. It adds make target
for compiling oras binary on freebsd and updates goreleaser
config to release for freebsd as well.

Signed-off-by: Anurag <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (616c3e1) 81.68% compared to head (3f5424f) 81.73%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1192      +/-   ##
==========================================
+ Coverage   81.68%   81.73%   +0.05%     
==========================================
  Files          68       68              
  Lines        3806     3806              
==========================================
+ Hits         3109     3111       +2     
+ Misses        489      487       -2     
  Partials      208      208              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@qweeah qweeah changed the title release artifacts for freebsd build(ci): release artifacts for freebsd Nov 24, 2023
@rchincha
Copy link

rchincha commented Dec 5, 2023

cc: @dfr

@dfr
Copy link

dfr commented Dec 6, 2023

cc: @dfr

I can test this on a FreeBSD system - I'll take a look later today.

@FeynmanZhou
Copy link
Member

Thank you @rchincha and @dfr !

@dfr
Copy link

dfr commented Dec 6, 2023

Looks good to me - it builds on FreeBSD natively and that build works well in my ad-hoc testing. I also ran unit tests on a FreeBSD host and that looks fine too.

Copy link
Member

@TerryHowe TerryHowe left a comment

Choose a reason for hiding this comment

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

/lgtm

@dfr
Copy link

dfr commented Dec 7, 2023

It would be nice to have arm64 binaries as well but I haven't tested that so perhaps that could be in a future followup.

@tmaroschik
Copy link

I verified that the build works on our freebsd 13.2 on amd64. Thanks!

@FeynmanZhou
Copy link
Member

I verified that the build works on our freebsd 13.2 on amd64. Thanks!

Thanks @tmaroschik for the verification!

Hi @oras-project/oras-cli maintainers, any luck with reviewing or approving this PR?

@kranurag7
Copy link
Contributor Author

kranurag7 commented Dec 21, 2023

@FeynmanZhou We have one request above about arm64 binaries.

It would be nice to have arm64 binaries as well.

Do you want to proceed with that in this PR? The original issue was only about amd64 binaries, so I skipped other arch.

@dfr
Copy link

dfr commented Dec 21, 2023

@FeynmanZhou We have one request above about arm64 binaries.

It would be nice to have arm64 binaries as well.

Do you want to proceed with that in this PR? The original issue was only about amd64 binaries, so I skipped other arch.

I'm happy to move forward as-is and look into adding arm64 as a followup.

Copy link
Member

@TerryHowe TerryHowe left a comment

Choose a reason for hiding this comment

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

/lgtm

@SamirPS
Copy link
Contributor

SamirPS commented Dec 29, 2023

I think it's would better to have all the compatible arch in this PR but else LGTM

Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

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

LGTM.

ORAS CLI will be guaranteed to build on FreeBSD(see Tier 2 in oras-project/oras-www#277).

@qweeah qweeah merged commit fbd10af into oras-project:main Jan 25, 2024
8 checks passed
FeynmanZhou pushed a commit to FeynmanZhou/oras that referenced this pull request May 11, 2024
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.

FreeBSD builds
9 participants