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 support for arm platforms #5907

Merged
merged 37 commits into from
Mar 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a874a5e
Add Linux armv7l and arm64 support
Jai-JAP Mar 8, 2022
90bd8b4
Manual run
Jai-JAP Mar 8, 2022
ea38943
Fixes
Jai-JAP Mar 8, 2022
d8bec49
Fix Linux pacman uploads
Jai-JAP Mar 8, 2022
690a632
Add windows arm64
Jai-JAP Mar 8, 2022
c533e6c
Update electron-builder.yml
Jai-JAP Mar 8, 2022
d35c03d
Update build.yml
Jai-JAP Mar 8, 2022
e2d4ef5
Update build.yml
Jai-JAP Mar 8, 2022
b70a193
Update build.yml
Jai-JAP Mar 8, 2022
5c325a3
Update build.yml
Jai-JAP Mar 8, 2022
b5506cf
Update build-linux.js
Jai-JAP Mar 9, 2022
1b31187
Update build.yml
Jai-JAP Mar 9, 2022
725edd5
Update build-windows.js
Jai-JAP Mar 9, 2022
8c96788
Merge branch 'Eugeny:master' into master
Jai-JAP Mar 9, 2022
c3e4031
Update build-linux.js
Jai-JAP Mar 9, 2022
b27f5c2
Revert last change
Jai-JAP Mar 9, 2022
38f8a7c
Update build.yml
Jai-JAP Mar 9, 2022
d6bcdbd
Fixes
Jai-JAP Mar 9, 2022
39fbf46
Update build.yml
Jai-JAP Mar 9, 2022
f2f0953
Fix windows
Jai-JAP Mar 9, 2022
26f93f7
Update build-linux.js
Jai-JAP Mar 21, 2022
4aca0fd
Update build-native.js
Jai-JAP Mar 21, 2022
332c5c0
Delete build.yml
Jai-JAP Mar 21, 2022
f18c1f6
Delete docs.yml
Jai-JAP Mar 21, 2022
541c264
Merge branch 'Eugeny:master' into master
Jai-JAP Mar 21, 2022
8c0d681
Revert "Delete docs.yml"
Jai-JAP Mar 21, 2022
2229d54
Revert "Delete build.yml"
Jai-JAP Mar 21, 2022
86effd7
Merge branch 'Eugeny:master' into master
Jai-JAP Mar 25, 2022
0f35b3b
Update build.yml
Jai-JAP Mar 25, 2022
eb6bf28
Update build.yml
Jai-JAP Mar 25, 2022
b2c611f
Update build-native.js
Jai-JAP Mar 25, 2022
37ba06b
Update build-linux.js
Jai-JAP Mar 25, 2022
ead2dbc
Update build-native.js
Jai-JAP Mar 25, 2022
5a66a64
Update build-native.js
Jai-JAP Mar 25, 2022
579c0e9
Update HACKING.md
Jai-JAP Mar 25, 2022
360b756
Update build-native.js
Jai-JAP Mar 25, 2022
48c06fc
Update build-linux.js
Jai-JAP Mar 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
env:
ARCH: ${{matrix.arch}}

- name: Build native deps
- name: Fix cross build
run: |
rm -rf app/node_modules/cpu-features
rm -rf app/node_modules/ssh2/crypto/build
Expand Down Expand Up @@ -199,8 +199,6 @@ jobs:
mv dist/*.rpm artifact-rpm/ || true
mkdir artifact-pacman
mv dist/*.pacman artifact-pacman/ || true
mkdir artifact-snap
mv dist/*.snap artifact-snap/ || true
mkdir artifact-tar.gz
mv dist/*.tar.gz artifact-tar.gz/ || true
mkdir artifact-web
Expand All @@ -209,31 +207,25 @@ jobs:
- uses: actions/upload-artifact@master
name: Upload DEB
with:
name: Linux DEB
name: Linux DEB (x86_64)
path: artifact-deb

- uses: actions/upload-artifact@master
name: Upload RPM
with:
name: Linux RPM
name: Linux RPM (x86_64)
path: artifact-rpm

- uses: actions/upload-artifact@master
name: Upload Pacman Package
with:
name: Linux Pacman
name: Linux Pacman (x86_64)
path: artifact-pacman

- uses: actions/upload-artifact@master
name: Upload Snap
with:
name: Linux Snap
path: artifact-snap

- uses: actions/upload-artifact@master
name: Upload Linux tarball
with:
name: Linux tarball
name: Linux tarball (x86_64)
path: artifact-tar.gz

- uses: actions/upload-artifact@master
Expand All @@ -242,9 +234,15 @@ jobs:
name: Web tarball
path: artifact-web


Windows-Build:
runs-on: windows-2022
needs: Lint
strategy:
matrix:
include:
- arch: x86_64
- arch: arm64

steps:
- name: Checkout
Expand All @@ -270,6 +268,8 @@ jobs:
node scripts/build-native.js
yarn run build
node scripts/prepackage-plugins.js
env:
ARCH: ${{matrix.arch}}

- name: Build and sign packages
run: node scripts/build-windows.js
Expand All @@ -283,6 +283,8 @@ jobs:
- name: Build packages without signing
run: node scripts/build-windows.js
if: "!(github.repository == 'Eugeny/tabby' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')))"
env:
ARCH: ${{matrix.arch}}

- name: Upload symbols
run: |
Expand All @@ -296,18 +298,18 @@ jobs:
- name: Package artifacts
run: |
mkdir artifact-setup
mv dist/*-setup.exe artifact-setup/
mv dist/*-setup-*.exe artifact-setup/
mkdir artifact-portable
mv dist/*-portable.zip artifact-portable/
mv dist/*-portable-*.zip artifact-portable/

- uses: actions/upload-artifact@master
name: Upload installer
with:
name: Windows installer
name: Windows installer (${{matrix.arch}})
path: artifact-setup

- uses: actions/upload-artifact@master
name: Upload portable build
with:
name: Windows portable build
name: Windows portable build (${{matrix.arch}})
path: artifact-portable
2 changes: 2 additions & 0 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ yarn
./scripts/build-native.js
```

**Note: For compiling for Linux armv7l, you need to downgrade electron to 17.0.0 in package.json present in root directory of tabby source**

```
# Linux (Debian/Ubuntu here as an example)
sudo apt install libfontconfig-dev libsecret-1-dev libarchive-tools libnss3 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libgbm1 cmake
Expand Down
6 changes: 3 additions & 3 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ publish:

win:
icon: "./build/windows/icon.ico"
artifactName: tabby-${version}-portable.${ext}
artifactName: tabby-${version}-portable-${env.ARCH}.${ext}
rfc3161TimeStampServer: http://timestamp.sectigo.com
nsis:
oneClick: false
artifactName: tabby-${version}-setup.${ext}
artifactName: tabby-${version}-setup-${env.ARCH}.${ext}
installerIcon: "./build/windows/icon.ico"
allowToChangeInstallationDirectory: true
shortcutName: Tabby Terminal
Expand All @@ -68,7 +68,7 @@ mac:
linux:
category: "Utility;TerminalEmulator;System"
icon: "./build/icons"
artifactName: tabby-${version}-linux.${ext}
artifactName: tabby-${version}-linux-${env.ARCH}.${ext}
executableArgs:
- "--no-sandbox"
desktop:
Expand Down
4 changes: 4 additions & 0 deletions scripts/build-linux.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ const vars = require('./vars')

const isTag = (process.env.GITHUB_REF || '').startsWith('refs/tags/')

process.env.ARCH = process.env.ARCH || process.arch === 'arm' ? 'armv7l' : process.arch

builder({
dir: true,
linux: ['deb', 'tar.gz', 'rpm', 'pacman'],
armv7l: process.env.ARCH === 'armv7l',
arm64: process.env.ARCH === 'arm64',
config: {
extraMetadata: {
version: vars.version,
Expand Down
4 changes: 3 additions & 1 deletion scripts/build-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ const rebuild = require('electron-rebuild').default
const path = require('path')
const vars = require('./vars')

process.env.ARCH = process.env.ARCH || process.arch === 'arm' ? 'armv7l' : process.arch

let lifecycles = []
for (let dir of ['app', 'tabby-core', 'tabby-local', 'tabby-ssh', 'tabby-terminal']) {
const build = rebuild({
buildPath: path.resolve(__dirname, '../' + dir),
electronVersion: vars.electronVersion,
arch: process.env.ARCH ?? process.arch,
arch: process.env.ARCH,
force: true,
})
build.catch(e => {
Expand Down
3 changes: 3 additions & 0 deletions scripts/build-windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ const vars = require('./vars')
const isTag = (process.env.GITHUB_REF || process.env.BUILD_SOURCEBRANCH || '').startsWith('refs/tags/')
const isCI = !!process.env.GITHUB_REF

process.env.ARCH = process.env.ARCH || process.arch

builder({
dir: true,
win: ['nsis', 'zip'],
arm64: process.env.ARCH === 'arm64',
config: {
extraMetadata: {
version: vars.version,
Expand Down