mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
Merge branch 'master' into russh
This commit is contained in:
109
.github/workflows/build.yml
vendored
109
.github/workflows/build.yml
vendored
@@ -13,11 +13,11 @@ jobs:
|
||||
- name: Installing Node
|
||||
uses: actions/setup-node@v3.7.0
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 18
|
||||
|
||||
- name: Install deps
|
||||
run: |
|
||||
npm i -g yarn@1.19.1
|
||||
npm i -g yarn
|
||||
cd app
|
||||
yarn
|
||||
cd ..
|
||||
@@ -55,16 +55,17 @@ jobs:
|
||||
- name: Installing Node
|
||||
uses: actions/setup-node@v3.7.0
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 18
|
||||
|
||||
- run: rustup target add ${{matrix.rust_triple}}
|
||||
|
||||
- name: Install deps
|
||||
run: |
|
||||
sudo -H pip3 install setuptools
|
||||
npm config set python python3
|
||||
sudo npm i -g yarn@1.22.1
|
||||
sudo npm i -g yarn
|
||||
yarn --network-timeout 1000000
|
||||
env:
|
||||
ARCH: ${{matrix.arch}}
|
||||
|
||||
- name: Fix cross build
|
||||
run: |
|
||||
@@ -77,6 +78,8 @@ jobs:
|
||||
|
||||
- name: Prepackage plugins
|
||||
run: scripts/prepackage-plugins.mjs
|
||||
env:
|
||||
ARCH: ${{matrix.arch}}
|
||||
|
||||
- run: sed -i '' 's/updateInfo = await/\/\/updateInfo = await/g' node_modules/app-builder-lib/out/targets/ArchiveTarget.js
|
||||
|
||||
@@ -173,57 +176,49 @@ jobs:
|
||||
|
||||
- run: rustup target add ${{matrix.rust_triple}}
|
||||
|
||||
- name: Install deps (amd64)
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libarchive-tools zsh python3-distutils
|
||||
sudo apt-get install libarchive-tools zsh crossbuild-essential-${{matrix.arch}}
|
||||
|
||||
- name: Setup tar to run as root
|
||||
run: sudo chmod u+s "$(command -v tar)"
|
||||
if: matrix.build-arch != 'x64'
|
||||
|
||||
- name: Download cached sysroot
|
||||
uses: actions/cache@v3
|
||||
id: dl-cached-sysroot
|
||||
if: matrix.build-arch !='x64'
|
||||
with:
|
||||
key: sysroot-${{matrix.build-arch}}
|
||||
path: /${{matrix.build-arch}}-sysroot
|
||||
|
||||
- name: Setup crossbuild sysroot
|
||||
run: |
|
||||
sudo apt-get update -y && sudo apt-get install debootstrap qemu-user-static binfmt-support -y
|
||||
sudo qemu-debootstrap --include=libfontconfig1-dev,libsecret-1-dev,libnss3,libatk1.0-0,libatk-bridge2.0-0,libgdk-pixbuf2.0-0,libgtk-3-0,libgbm1 --variant=buildd --exclude=snapd --components=main,restricted,universe,multiverse --extractor=dpkg-deb --arch ${{matrix.arch}} bionic /${{matrix.build-arch}}-sysroot/ http://ports.ubuntu.com/ubuntu-ports/
|
||||
sudo find /${{matrix.build-arch}}-sysroot -type l -lname '/*' -exec sh -c 'file="$0"; dir=$(dirname "$file"); target=$(readlink "$0"); prefix=$(dirname "$dir" | sed 's@[^/]*@\.\.@g'); newtarget="$prefix$target"; ln -snf $newtarget $file' {} \; ;
|
||||
if: matrix.build-arch != 'x64' && steps.dl-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: Setup env to use ${{matrix.build-arch}} sysroot
|
||||
run: |
|
||||
echo "CFLAGS=--sysroot=/${{matrix.build-arch}}-sysroot/" >> $GITHUB_ENV
|
||||
echo "CXXFLAGS=--sysroot=/${{matrix.build-arch}}-sysroot/" >> $GITHUB_ENV
|
||||
echo "LDFLAGS=--sysroot=/${{matrix.build-arch}}-sysroot/" >> $GITHUB_ENV
|
||||
|
||||
[[ ${npm_config_arch} == 'arm' ]] && echo "npm_config_arch=armv7l" >> $GITHUB_ENV
|
||||
|
||||
if [[ ${{matrix.arch}} == 'armhf' ]]; then
|
||||
echo "PKG_CONFIG_PATH=/${{matrix.build-arch}}-sysroot/usr/lib/pkgconfig/:/${{matrix.build-arch}}-sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig/" >> $GITHUB_ENV
|
||||
elif [[ ${{matrix.arch}} == 'arm64' ]]; then
|
||||
echo "PKG_CONFIG_PATH=/${{matrix.build-arch}}-sysroot/usr/lib/pkgconfig/:/${{matrix.build-arch}}-sysroot/usr/lib/aarch64-linux-gnu/pkgconfig/" >> $GITHUB_ENV
|
||||
fi
|
||||
if: matrix.build-arch != 'x64'
|
||||
|
||||
- name: Install npm_modules (amd64)
|
||||
run: |
|
||||
npm i -g yarn
|
||||
yarn --network-timeout 1000000
|
||||
if: matrix.build-arch == 'x64'
|
||||
|
||||
- name: Setup Crossbuild (${{matrix.arch}})
|
||||
run: |
|
||||
sudo apt-get update -y && sudo apt-get install schroot sbuild debootstrap -y
|
||||
sudo debootstrap --include=git,curl,gnupg,ca-certificates,crossbuild-essential-${{matrix.arch}},python-dev,python3-dev,libarchive-tools,cmake --variant=buildd --exclude=snapd --components=main,restricted,universe,multiverse --extractor=dpkg-deb bionic /build-chroot/
|
||||
echo 'deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse' | sudo tee /build-chroot/etc/apt/sources.list >/dev/null
|
||||
echo 'deb [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports bionic main restricted universe multiverse' | sudo tee -a /build-chroot/etc/apt/sources.list >/dev/null
|
||||
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | sudo tee /build-chroot/etc/apt/trusted.gpg.d/nodesource.gpg >/dev/null
|
||||
echo 'deb http://deb.nodesource.com/node_16.x bionic main' | sudo tee /build-chroot/etc/apt/sources.list.d/nodesource.list >/dev/null
|
||||
echo "[build-chroot]
|
||||
description=Ubuntu 18.04 Build chroot
|
||||
type=directory
|
||||
directory=/build-chroot
|
||||
root-groups=root,sudo
|
||||
profile=buildd
|
||||
personality=linux
|
||||
union-type=overlay" | sudo tee /etc/schroot/chroot.d/build-chroot.pref >/dev/null
|
||||
echo "/home /home none rw,bind 0 0" | sudo tee -a /etc/schroot/buildd/fstab >/dev/null
|
||||
|
||||
if: matrix.build-arch != 'x64'
|
||||
|
||||
- name: Install node_modules & CrossBuild native modules for ${{matrix.arch}}
|
||||
run: |
|
||||
sudo schroot -c build-chroot -u root -- bash -ex -c "apt-get update -y
|
||||
dpkg --add-architecture ${{matrix.arch}}
|
||||
apt-get install -y nodejs libfontconfig-dev:${{matrix.arch}} libsecret-1-dev:${{matrix.arch}} libnss3:${{matrix.arch}} libatk1.0-0:${{matrix.arch}} libatk-bridge2.0-0:${{matrix.arch}} libgdk-pixbuf2.0-0:${{matrix.arch}} libgtk-3-0:${{matrix.arch}} libgbm1:${{matrix.arch}}
|
||||
export CC=${{matrix.triplet}}gcc CXX=${{matrix.triplet}}g++ LD=${{matrix.triplet}}ld
|
||||
if [[ ${{matrix.arch}} == 'arm64' ]]; then
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/aarch64-linux-gnu/pkgconfig/
|
||||
elif [[ ${{matrix.arch}} == 'armhf' ]]; then
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/arm-linux-gnueabihf/pkgconfig/
|
||||
fi
|
||||
export RUSTUP_HOME=/rustup
|
||||
export CARGO_HOME=/cargo
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
source "/cargo/env"
|
||||
rustup target add ${{matrix.rust_triple}}
|
||||
export ARCH=${{matrix.build-arch}} npm_config_arch=${{matrix.build-arch}} npm_config_target_arch=${{matrix.build-arch}} RUST_TARGET_TRIPLE=${{matrix.rust_triple}}
|
||||
npm i -g yarn
|
||||
yarn --network-timeout 1000000 --arch=${{matrix.build-arch}} --target_arch=${{matrix.build-arch}}"
|
||||
if: matrix.build-arch != 'x64'
|
||||
npm i -g yarn node-gyp
|
||||
yarn --network-timeout 1000000 --arch=${{matrix.build-arch}} --target-arch=${{matrix.build-arch}}
|
||||
|
||||
- name: Webpack (${{matrix.arch}})
|
||||
run: yarn run build --arch=${{matrix.build-arch}} --target_arch=${{matrix.build-arch}}
|
||||
@@ -239,7 +234,7 @@ jobs:
|
||||
USE_HARD_LINKS: false
|
||||
# DEBUG: electron-builder,electron-builder:*
|
||||
|
||||
- name: Build web resources
|
||||
- name: Build web resources (amd64 only)
|
||||
run: zsh -c 'tar czf tabby-web.tar.gz (tabby-*|web)/dist'
|
||||
if: matrix.build-arch == 'x64'
|
||||
|
||||
@@ -324,7 +319,7 @@ jobs:
|
||||
- name: Installing Node
|
||||
uses: actions/setup-node@v3.7.0
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 18
|
||||
|
||||
- run: npm i -g npx
|
||||
- run: rustup target add ${{matrix.rust_triple}}
|
||||
@@ -337,10 +332,12 @@ jobs:
|
||||
- name: Build
|
||||
shell: powershell
|
||||
run: |
|
||||
npm i -g yarn@1.19.1
|
||||
npm i -g yar node-gyp
|
||||
yarn --network-timeout 1000000
|
||||
yarn run build
|
||||
node scripts/prepackage-plugins.mjs
|
||||
env:
|
||||
ARCH: ${{matrix.arch}}
|
||||
|
||||
- name: Build and sign packages
|
||||
run: node scripts/build-windows.mjs
|
||||
@@ -355,7 +352,9 @@ jobs:
|
||||
|
||||
- name: Build packages without signing
|
||||
run: node scripts/build-windows.mjs
|
||||
if: "!(github.repository == 'Eugeny/tabby' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')))"
|
||||
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: |
|
||||
|
Reference in New Issue
Block a user