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 CI job to cross compile all the things #5262

Merged
merged 3 commits into from
Mar 25, 2021

Conversation

cpuguy83
Copy link
Member

This makes sure we can compile on all the platforms and prevent things
like integer overflows.

@cpuguy83 cpuguy83 force-pushed the ci_cross_compile branch 7 times, most recently from 539088e to 508cbdd Compare March 24, 2021 21:29
This currently breaks armhf builds.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Copy link
Member

@samuelkarp samuelkarp left a comment

Choose a reason for hiding this comment

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

LGTM, just some questions.

goarch: arm64
- goos: linux
goarch: arm
goarm: "7"
Copy link
Member

Choose a reason for hiding this comment

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

Is 7 the lowest version of 32-bit Arm we want to support?

Copy link
Member Author

Choose a reason for hiding this comment

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

We could add more and maybe worthwhile since I know folks use v5 and v6 with Docker.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll also add windows+armv7 but this is known broken right now.

Copy link
Member

Choose a reason for hiding this comment

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

@alexellis might have opinion on how "low" to go with arm 32-bit based on his connection to that community

Copy link
Member

Choose a reason for hiding this comment

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

I'd suggest 6 is worth adding (that's Pi1 and Pi0, which are fairly popular), but even I'd consider 5 to be "best effort" (and not worth the CPU time to test explicitly).

(my 2¢)

Copy link
Member

Choose a reason for hiding this comment

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

Oh, though cgo means armv6 is not something you'll be able to easily cross-compile from an Ubuntu environment unless you build/download a cross toolchain from elsewhere, so the most you could do is also add 5, which should cover the bases (if the 7 build works and a 5 build works, the odds of 6 having problems are really low -- they'd be toolchain mistakes, not code problems, at that point, like using the wrong C compiler 😄).

Copy link
Member Author

Choose a reason for hiding this comment

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

And got the windows/arm/v7 build fixed as well (see go-winio update), so added that in.

Copy link
Member Author

@cpuguy83 cpuguy83 Mar 24, 2021

Choose a reason for hiding this comment

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

Also added linux/arm/v5, guess I didn't comment on that.

.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This makes sure we can compile on all the platforms and prevent things
like integer overflows.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Copy link
Member

@samuelkarp samuelkarp left a comment

Choose a reason for hiding this comment

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

LGTM

@mxpv
Copy link
Member

mxpv commented Mar 25, 2021

This is very similar to what's happening in nightly build script. Should we consolidate them to maintain the code in one place?

@AkihiroSuda
Copy link
Member

This is very similar to what's happening in nightly build script. Should we consolidate them to maintain the code in one place?

Maybe off-topic here, but I'd also like to see arm64 binaries to be available on https://github.com/containerd/containerd/releases

@kzys
Copy link
Member

kzys commented Mar 25, 2021

@AkihiroSuda +1 and that has been requested since 2018 :) See #2901.

@dmcgowan dmcgowan merged commit 7b17a29 into containerd:master Mar 25, 2021
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.

None yet

9 participants