Skip to content

Add the ability to build arm64 builds - #4198

Merged
niik merged 6 commits into
desktop:masterfrom
jkleinsc:arm64
Mar 29, 2018
Merged

niik merged 6 commits into
desktop:masterfrom
jkleinsc:arm64

Conversation

@jkleinsc

@jkleinsc jkleinsc commented Mar 7, 2018 •

Copy link
Copy Markdown
Contributor

This PR adds the ability to build arm64 builds of Desktop.

There are a couple of caveats:

  1. It requires Electron 1.8.x because arm64 builds were not available in Electron before 1.8.x
  2. The build needs to be run on arm64 hardware such as a Raspberry Pi 3.
  3. Instead of running yarn to install dependencies, you need to run script/install-arm64-deps.sh because yarn ends up targeting x64 because of this: https://github.com/desktop/desktop/blob/master/app/.npmrc#L4. There are reasons for that, so
    script/install-arm64-deps.sh works around it for arm64 builds.

To test this PR, I used Electron's arm64 CI here:
https://arm64-ci.electronjs.org/blue/organizations/jenkins/desktop/detail/desktop/17/pipeline

@zeke

zeke commented Mar 8, 2018

Copy link
Copy Markdown
Contributor

💪6️⃣:four:

@shiftkey

shiftkey commented Mar 8, 2018

Copy link
Copy Markdown
Member

@jkleinsc thanks for the PR!

It requires Electron 1.8.x because arm64 builds were not available in Electron before 1.8.x

We've got #3958 underway which we'll get in and test before this - I gather should we be testing 1.8.3 as well, given that just landed earlier this week (ping @iAmWillShepherd).

@shiftkey shiftkey mentioned this pull request Mar 8, 2018
4 tasks done
@niik

niik commented Mar 14, 2018

Copy link
Copy Markdown
Member

Hey @jkleinsc #3958 has been merged so this PR needs a little merge from master.

@jkleinsc

Copy link
Copy Markdown
Contributor Author

@iAmWillShepherd

Copy link
Copy Markdown
Contributor

@zeke , @jkleinsc, I'd like to test on an actual device. Am I correct in assuming I can use a Raspberry Pi to test this?

@jkleinsc

Copy link
Copy Markdown
Contributor Author

@iAmWillShepherd you would need a Raspberry PI 3 and it needs to be running a 64 bit OS. Another alternative is a pine64 from https://www.pine64.org/

Comment thread app/package.json Outdated
"deep-equal": "^1.0.1",
"dexie": "^2.0.0",
"dugite": "1.58.0",
"dugite": "1.60.0",

This comment was marked as spam.

This comment was marked as spam.

@jkleinsc

Copy link
Copy Markdown
Contributor Author

@shiftkey shiftkey added this to the 1.2 milestone Mar 15, 2018
@shiftkey

Copy link
Copy Markdown
Member

Moving this into 1.2 as it doesn't seem urgent to merge as part of a bugfix release.

@nerdneha

Copy link
Copy Markdown
Contributor

@shiftkey so we're not holding off a merge for this feature, what are your thoughts on us adding a feature flag for this instead? that way we can merge (we can even default it to false for dev if we're worried)

@shiftkey

shiftkey commented Mar 19, 2018 •

Copy link
Copy Markdown
Member

@nerdneha I don't believe this needs to be feature flagged, I'm just deferring it to after 1.1.x for focus reasons.

Aside from the update to Git (which we should test like usual) the other changes look to be safe to include as-is.

@shiftkey shiftkey added the infrastructure Issues and pull requests related to scripts and tooling for GitHub Desktop label Mar 22, 2018
@shiftkey shiftkey self-assigned this Mar 26, 2018
@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Mar 27, 2018
@shiftkey

Copy link
Copy Markdown
Member

Tested a bunch of the typical Git operations - init, checkout, commit, discard, push/pull - on macOS and Windows. Feeling pretty good about getting this in sooner for the updated Git.

@shiftkey shiftkey removed their assignment Mar 27, 2018
shiftkey
shiftkey previously approved these changes Mar 27, 2018
@shiftkey

Copy link
Copy Markdown
Member

Dropping myself from the review process because I've contributed to this PR.

@niik niik self-assigned this Mar 27, 2018

@niik niik left a comment

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.

Hey @jkleinsc, thanks for contributing this!

I have next to no experience with Docker so this is probably a stupid question but does the Dockerfile.arm64v8 file have to live at the root or is that just a convention?

Additionally, could you please add a little blurb about how to build and run the container over at https://github.com/desktop/desktop/blob/master/docs/contributing/setup.md?

Comment thread Dockerfile.arm64v8 Outdated
FROM arm64v8/ubuntu:16.04

RUN groupadd --gid 114 jenkins \
&& useradd --uid 110 --gid jenkins --shell /bin/bash --create-home jenkins

This comment was marked as spam.

@jkleinsc

Copy link
Copy Markdown
Contributor Author

@niik I have usually seen Dockerfiles at the root of a project, but I'm thinking that the Dockerfile doesn't really belong in this PR. It is not needed to build for arm64, it is the Dockerfile I used to test on https://arm64-ci.electronjs.org/blue/organizations/jenkins/desktop. That's why it has a jenkins user in it. I'll remove that file and I'll add a blurb about how to build on arm64.

@jkleinsc

Copy link
Copy Markdown
Contributor Author

@niik I removed the file and added the documentation. Let me know if the doc additions make sense. Also, I realized in putting together the docs that the option of building the arm64 build through a cross architecture docker image (eg https://hub.docker.com/r/multiarch/debian-debootstrap/) doesn't work. The build needs arm64 hardware.

@niik

niik commented Mar 29, 2018

Copy link
Copy Markdown
Member

@jkleinsc Lovely, thank you so much for going the extra mile and adding that documentation. I'm gonna let this sit for a little bit so that all TZs have a chance to see it before I merge.

@zeke

zeke commented Mar 29, 2018

Copy link
Copy Markdown
Contributor

🍏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Issues and pull requests related to scripts and tooling for GitHub Desktop ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants