Skip to content

Add CI job to cross compile all the things#5262

Merged
dmcgowan merged 3 commits intocontainerd:masterfrom
cpuguy83:ci_cross_compile
Mar 25, 2021
Merged

Add CI job to cross compile all the things#5262
dmcgowan merged 3 commits intocontainerd:masterfrom
cpuguy83:ci_cross_compile

Conversation

@cpuguy83
Copy link
Copy Markdown
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 <[email protected]>
@cpuguy83 cpuguy83 requested a review from samuelkarp March 24, 2021 21:37
@cpuguy83 cpuguy83 force-pushed the ci_cross_compile branch 2 times, most recently from 545e0c7 to 27cbd58 Compare March 24, 2021 21:42
Copy link
Copy Markdown
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.

Comment thread .github/workflows/ci.yml Outdated
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
This makes sure we can compile on all the platforms and prevent things
like integer overflows.

Signed-off-by: Brian Goff <[email protected]>
Copy link
Copy Markdown
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

Comment thread .github/workflows/ci.yml
@mxpv
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

9 participants