Eugeny / tabby

A terminal for a more modern age
https://tabby.sh
MIT License
57.85k stars 3.33k forks source link

Adding linux arm to CI workflows #6355

Closed Jai-JAP closed 1 year ago

Jai-JAP commented 2 years ago

@Eugeny I have successfully got armv7l and arm64 compiled and working here. What do you think about adding docker based build for arm linux builds as it is slow and takes ~ 1.5 - 2 hours to build.

Jai-JAP commented 2 years ago

I'll make a pr with changes required if you agree to add this.

Jai-JAP commented 2 years ago

Also the linux arm64 / armv7l must be uploaded to the packagecloud.io repo but idk how

Eugeny commented 2 years ago

Please do! I'll enable those builds for releases only to save time.

Jai-JAP commented 2 years ago

Please do! I'll enable those builds for releases only to save time.

Also we have to remove patch for builder-util package and update it on a new release of builder-util as I have made an PR upstream adding arm as an alias for armv7l which is now merged. See https://github.com/electron-userland/electron-builder/pull/6845

Jai-JAP commented 2 years ago

@Eugeny do you have an idea how to upload new arm builds to packagecloud repo

Jai-JAP commented 2 years ago

I tried making changes but it gives some errors and fails. See patch-1 branch in my fork for workflow.

See here for logs https://github.com/Jai-JAP/tabby/actions/runs/2285925813

Eugeny commented 2 years ago

@Jai-JAP I suspect that bsdtar might be missing in the ARM image - electron-build needs it. Re packagecloud I'll check it once the build is working, should be straightforward.

Jai-JAP commented 2 years ago

I do install libarchive-tools on arm images https://github.com/Jai-JAP/tabby/blob/8f79b043eedc613720f5b662e9114ddf73b7fbb6/.github/workflows/build.yml#L187 https://github.com/Jai-JAP/tabby/blob/8f79b043eedc613720f5b662e9114ddf73b7fbb6/.github/workflows/build.yml#L164

GitHub
tabby/build.yml at 8f79b043eedc613720f5b662e9114ddf73b7fbb6 · Jai-JAP/tabby
A terminal for a more modern age. Contribute to Jai-JAP/tabby development by creating an account on GitHub.
GitHub
tabby/build.yml at 8f79b043eedc613720f5b662e9114ddf73b7fbb6 · Jai-JAP/tabby
A terminal for a more modern age. Contribute to Jai-JAP/tabby development by creating an account on GitHub.
Jai-JAP commented 2 years ago

https://github.com/electron-userland/electron-builder/releases/tag/v23.0.9 My fix for Unsupported arch arm is now merged amd released time to update electron-builder , builder-utiland app-builder-lib. Also to remove the patch file for builder-util

GitHub
Release v23.0.9 · electron-userland/electron-builder
What's Changed fix: Lock wine version to v6 in docker image by @mmaietta in #6816 fix: incompatible Windows sign tool in end user environment. by @rainbean in #6817 fix: Unable to find latest ver...
Jai-JAP commented 2 years ago

@Eugeny Success Report ;) i got arm64 and armv7l to build in the same workflow as others around a month ago but due to my pi being broken i cant test the artifacts. also i went for a vacation and completely forgot to make a pr to this repo. Today it had some conflicts which i fixed and now i am running the build workflow to see if any errors occur.

Expect a new PR soon

Jai-JAP commented 2 years ago

See #6612

Issues-translate-bot commented 2 years ago

The translator bot has detected that this issue body's language is not English, and has translated it automatically.


See #6612

Eugeny commented 2 years ago

Fantastic! Let me know when it's clear for merge :)

Jai-JAP commented 2 years ago

its ready to merge on the build steps side but still needs testing the build artifacts (Most probably will be working as minimum changes made to build process)

i cant test as my pi is broken

Jai-JAP commented 2 years ago

also i was also reported by some users that they are getting errors

innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:
- /opt/Tabby/resources/app.asar/node_modules/@tabby-gang/node-pty/lib/unixTerminal.js
- /opt/Tabby/resources/app.asar/node_modules/@tabby-gang/node-pty/lib/index.js
- /opt/Tabby/resources/app.asar/dist/main.js
- 
    at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
    at Function.n._resolveFilename (node:electron/js2c/browser_init:249:1105)
    at Module._load (node:internal/modules/cjs/loader:785:27)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (/opt/Tabby/resources/app.asar/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/opt/Tabby/resources/app.asar/node_modules/@tabby-gang/node-pty/lib/unixTerminal.js:33:15)
    at Module._compile (/opt/Tabby/resources/app.asar/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
    at Module.load (node:internal/modules/cjs/loader:988:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/opt/Tabby/resources/app.asar/node_modules/@tabby-gang/node-pty/lib/unixTerminal.js',
    '/opt/Tabby/resources/app.asar/node_modules/@tabby-gang/node-pty/lib/index.js',
    '/opt/Tabby/resources/app.asar/dist/main.js',
    undefined
  ]
}

on the arm build artifacts after the commit that moved ./scripts/build-native.js to postinstall

however manually including scripts/build-native.js to workflow fixed the issue

Jai-JAP commented 2 years ago

@Eugeny

Issues-translate-bot commented 2 years ago

The translator bot has detected that this issue body's language is not English, and has translated it automatically.


@Eugeny

Eugeny commented 2 years ago

@Jai-JAP that error means that pty.module got built for the wrong arch - any idea why running build-native.js from inside the postinstall script would behave any differently?

Jai-JAP commented 2 years ago

Have you seen the PR #6612 ?

Eugeny commented 2 years ago

Yes, the PR looks good to me, but I'll need a confirmation that the builds work on real hardware before merging & releasing.

I was referring to the error in https://github.com/Eugeny/tabby/issues/6355#issuecomment-1157535794 - is it happening in the builds from your PR?

Jai-JAP commented 2 years ago

i dont know whether the issue is present in the builds from the PR as i haven't tested them

Jai-JAP commented 2 years ago

testing needed

nerohmot commented 2 years ago

@Jai-JAP I have an aarch64 machine available, if you tell me what to do I will test for you ;-)

Jai-JAP commented 2 years ago

@nerohmot can you test the linux arm64 artifact here

Jai-JAP commented 2 years ago

Also test the armv7l build from the same workflow run here if possible.