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 arm64 CI #2978

Closed
wants to merge 1 commit into from
Closed

add arm64 CI #2978

wants to merge 1 commit into from

Conversation

shawnl
Copy link
Contributor

@shawnl shawnl commented Jul 30, 2019

I already have this set up and working with my own VPS for arm64 testing
at https://gitlab.com/shawnl1/zig/-/jobs
But that is a fork of zig, because I cannot setup the web hook, so that
it will trigger on commits (to any branch) and pull requests and also
show up in the PR interface with the other CIs.

So this also requires some manual coordination with Andrew

https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/github_integration.html

Andrew could also set up an official gitlab mirror, and then just authenticate the arm64 CI runner I've set up. That would probably be the easiest, using those instructions, and then PMing me with the authtication token:

https://docs.gitlab.com/runner/register/index.html.

Please enter the gitlab-ci token for this runner

I already have this set up and working with my own VPS for arm64 testing
at https://gitlab.com/shawnl1/zig/-/jobs
But that is a fork of zig, because I cannot setup the web hook, so that
it will trigger on commits (to any branch) and pull requests and also
show up in the PR interface with the other CIs.
@shawnl shawnl changed the title add gitlab CI add arm64 CI Jul 30, 2019
@andrewrk
Copy link
Member

I had a quick chat with Drew from SourceHut and he said he'd bump up the priority of getting arm64 build images available. Let's give him a week or two and see if that pans out. If not we can go with GitLab for now.

@andrewrk
Copy link
Member

Hmm even if the SourceHut one pans out, I think it's going to be qemu-based builds. So this GitLab Runner idea is probably our best bet, assuming this VPS is native hardware. Thanks for starting this effort @shawnl, I'll try to get this working over the next couple weeks.

@ddevault
Copy link

SourceHut now supports arm64 for debian/stable, debian/unstable, and debian/testing builds.

@shawnl
Copy link
Contributor Author

shawnl commented Jul 31, 2019

@ddevault Is it real hardware? qemu is not worth it, and is more problems that solutions.

@ddevault
Copy link

No, it's qemu. What have been your problems with qemu in practice?

@shawnl
Copy link
Contributor Author

shawnl commented Jul 31, 2019

bugs bugs bugs bugs. Especially with the SIMD. We need to focus on bugs in Zig, not qemu. Also qemu just won't be fast enough, as the test suite is quite long.

@ddevault
Copy link

I haven't heard of any significant bugs with qemu's arm64 emulation, and I'm willing to give it the benefit of the doubt.

@shawnl
Copy link
Contributor Author

shawnl commented Jul 31, 2019

This was also the experience that Mozilla had, and the QA team had to prioritize getting real hardware to avoid their developers spending their time fixing the android emulator (which is almost certainly qemu).

@ddevault
Copy link

I do not give the android emulator the benefit of the doubt. It's based on a grossly outdated version of qemu.

@andrewrk
Copy link
Member

Let's just try it out. If it's problematic, we'll find out soon enough.

@andrewrk
Copy link
Member

Here's a sr.ht build running. Let's see how long it takes. I've set it up to only run bin/zig build test-behavior -Dskip-release for now. For reference, this takes 20 seconds to complete on my dev laptop.

@andrewrk
Copy link
Member

The build timed out after 3 hours, and it didn't even finish compiling the C++ code, so I think it's going to be native arm64 testing for us.

@ddevault
Copy link

ddevault commented Aug 1, 2019

Fair. I'm curious to see how scaleaway fares.

@@ -0,0 +1,10 @@
linux-arm64:
script:
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add tags of linux and arm64.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You know the syntax better.

@@ -0,0 +1,10 @@
linux-arm64:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need multiple jobs for musl vs glibc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the azure script didn't have that, so I didn't think of it.

@@ -0,0 +1,10 @@
linux-arm64:
script:
- uname -a
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove these before merging?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, this is because the logs dont have this data, and when you read the logs it is quite nice to have

- free -h
- mkdir build
- cd build
- PATH=/usr/lib/ccache:$PATH cmake .. -DCMAKE_BUILD_TYPE=Release -GNinja
Copy link
Collaborator

Choose a reason for hiding this comment

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

You assume ccache is installed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this doesn't assume that, but will use it if it is installed

- free -h
- mkdir build
- cd build
- PATH=/usr/lib/ccache:$PATH cmake .. -DCMAKE_BUILD_TYPE=Release -GNinja
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why Ninja?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

automatically detects number of CPUs

@@ -0,0 +1,10 @@
linux-arm64:
Copy link
Collaborator

Choose a reason for hiding this comment

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

What base image do you want?
(please include an image: field)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was just doing a shell job, that way ccache can be used without a bunch of hacks, and it is just much simpler, as Zig has no need for root.

Feel free to do it your own way.

@@ -0,0 +1,10 @@
linux-arm64:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this in an "arm" subdirectory? Doesn't the file have to exist in the root of the repository? (or maybe in a .ci directory? I'm not sure)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't the file have to exist in the root of the repository? (or maybe in a .ci directory? I'm not sure)

There is a gitlab setting to use a differn't path.

@andrewrk
Copy link
Member

andrewrk commented Aug 1, 2019

GitLab doesn't support arm64 yet either: https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/725#note_198579090

@andrewrk andrewrk closed this Aug 1, 2019
@shawnl
Copy link
Contributor Author

shawnl commented Aug 1, 2019 via email

@andrewrk andrewrk reopened this Aug 1, 2019
@andrewrk
Copy link
Member

andrewrk commented Aug 1, 2019

How did you get past the linked issue? The official stance of GitLab is that ARM64 does not work on GitLab Runner yet.

@shawnl
Copy link
Contributor Author

shawnl commented Aug 1, 2019

I used shell mode, and not docker. (This also allows me to use ccache to get really fast build times)

I also turned off the default runners.

@daurnimator daurnimator added the arch-aarch64 64-bit ARM label Aug 2, 2019
@shawnl
Copy link
Contributor Author

shawnl commented Aug 7, 2019

I see there is a branch where this is being worked on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-aarch64 64-bit ARM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants