ci: add aarch64 build workflow
* Patches v8 to build on arm64 * Upgrades to node20
This commit is contained in:
parent
1bc8990bd6
commit
6394157ebb
3 changed files with 117 additions and 2 deletions
83
.forgejo/workflows/release-build-aarch64.yaml
Normal file
83
.forgejo/workflows/release-build-aarch64.yaml
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release-build:
|
||||||
|
runs-on: aarch64
|
||||||
|
container:
|
||||||
|
image: ubuntu:22.04
|
||||||
|
env:
|
||||||
|
pkgver: 9.0.4
|
||||||
|
buildno: 54
|
||||||
|
qtver: 5.15.3
|
||||||
|
steps:
|
||||||
|
- name: Environment setup
|
||||||
|
run: |
|
||||||
|
cat /etc/os-release
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y git make g++ bzip2 sudo patch curl lsb-release p7zip-full qtbase5-dev debhelper clang-14 lld-14 wget
|
||||||
|
update-alternatives --install /usr/bin/python python /usr/bin/python3 1
|
||||||
|
# node version set in build_tools/scripts/build_server variable pkg_target
|
||||||
|
curl -sL https://deb.nodesource.com/setup_20.x | bash -
|
||||||
|
apt-get install -y nodejs
|
||||||
|
npm install -g grunt grunt-cli
|
||||||
|
- name: Getting patches
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Fetching sources
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/ONLYOFFICE/DocumentServer --recursive -b v$pkgver build
|
||||||
|
git clone https://github.com/ONLYOFFICE/build_tools.git -b v$pkgver.$buildno build/build_tools
|
||||||
|
git clone https://github.com/ONLYOFFICE/document-server-integration -b v$pkgver.$buildno build/document-server-integration
|
||||||
|
git clone https://github.com/ONLYOFFICE/document-templates -b v$pkgver.$buildno build/document-templates
|
||||||
|
git clone https://github.com/ONLYOFFICE/onlyoffice.github.io build/onlyoffice.github.io
|
||||||
|
git clone https://github.com/ONLYOFFICE/document-server-package.git -b v$pkgver.$buildno build/document-server-package
|
||||||
|
- name: Applying patches
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
git apply -v --ignore-space-change --ignore-whitespace $GITHUB_WORKSPACE/core_v8-use-system-clang.patch
|
||||||
|
git apply -v --ignore-space-change --ignore-whitespace $GITHUB_WORKSPACE/disable-licensing-limits.patch
|
||||||
|
- name: Build setup
|
||||||
|
run: |
|
||||||
|
# sets up directory structure for --qt-dir argument
|
||||||
|
mkdir -p build/build_tools/system_qt-$qtver/gcc_64
|
||||||
|
ln -s /usr/lib/aarch64-linux-gnu build/build_tools/system_qt-$qtver/gcc_64/lib
|
||||||
|
ln -s /usr/lib/aarch64-linux-gnu/qt5/bin build/build_tools/system_qt-$qtver/gcc_64/bin
|
||||||
|
ln -s /usr/lib/aarch64-linux-gnu/qt5/plugins build/build_tools/system_qt-$qtver/gcc_64/plugins
|
||||||
|
# depot_tools gn is built for x86
|
||||||
|
wget http://ftp.us.debian.org/debian/pool/main/g/generate-ninja/generate-ninja_0.0~git20210128.09c9e5e-1_arm64.deb
|
||||||
|
apt install ./generate-ninja_0.0~git20210128.09c9e5e-1_arm64.deb
|
||||||
|
# keeps from untar and adding to PATH x86_64 python3
|
||||||
|
cd build/build_tools/tools/linux
|
||||||
|
mkdir python3
|
||||||
|
# installs build deps
|
||||||
|
./deps.py
|
||||||
|
- name: Build server
|
||||||
|
run: |
|
||||||
|
cd build/build_tools
|
||||||
|
./configure.py --update 0 --platform linux_arm64 --module "server" --qt-dir $(pwd)/system_qt-$qtver
|
||||||
|
./make.py
|
||||||
|
- name: Build package
|
||||||
|
run: |
|
||||||
|
cd build/document-server-package
|
||||||
|
PRODUCT_VERSION=$pkgver BUILD_NUMBER=$buildno make deb
|
||||||
|
- name: Package upload
|
||||||
|
uses: forgejo/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: documentserver-deb
|
||||||
|
path: build/document-server-package/deb/onlyoffice-documentserver_*.deb
|
||||||
|
release-deploy:
|
||||||
|
needs: [release-build]
|
||||||
|
runs-on: aarch64
|
||||||
|
container:
|
||||||
|
image: alpine:latest
|
||||||
|
steps:
|
||||||
|
- name: Setting up environment
|
||||||
|
run: apk add nodejs curl
|
||||||
|
- name: Package download
|
||||||
|
uses: forgejo/download-artifact@v3
|
||||||
|
- name: Package deployment
|
||||||
|
run: curl --user ${{ vars.FORGE_REPO_USER }}:${{ secrets.FORGE_REPO_PRIVKEY }} --upload-file */onlyoffice-documentserver_*.deb https://forge.ilot.io/api/packages/ilot/debian/pool/jammy/main/upload
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,21 @@
|
||||||
diff --git a/build_tools/scripts/core_common/modules/v8_89.py b/build_tools/scripts/core_common/modules/v8_89.py
|
diff --git a/build_tools/scripts/core_common/modules/v8_89.py b/build_tools/scripts/core_common/modules/v8_89.py
|
||||||
index 2c920a4..61dcafc 100644
|
index 2c920a4..42d21db 100644
|
||||||
--- a/build_tools/scripts/core_common/modules/v8_89.py
|
--- a/build_tools/scripts/core_common/modules/v8_89.py
|
||||||
+++ b/build_tools/scripts/core_common/modules/v8_89.py
|
+++ b/build_tools/scripts/core_common/modules/v8_89.py
|
||||||
@@ -55,6 +55,8 @@ def make_args(args, platform, is_64=True, is_debug=False):
|
@@ -43,7 +43,11 @@ def make_args(args, platform, is_64=True, is_debug=False):
|
||||||
|
args_copy = args[:]
|
||||||
|
args_copy.append("target_cpu=\\\"arm64\\\"")
|
||||||
|
args_copy.append("v8_target_cpu=\\\"arm64\\\"")
|
||||||
|
- args_copy.append("use_sysroot=true")
|
||||||
|
+ args_copy.append("is_clang=true")
|
||||||
|
+ args_copy.append("use_custom_libcxx=false")
|
||||||
|
+ args_copy.append("clang_base_path=\\\"/usr/lib/llvm-14\\\"")
|
||||||
|
+ args_copy.append("clang_use_chrome_plugins=false")
|
||||||
|
+ args_copy.append("use_sysroot=false")
|
||||||
|
|
||||||
|
if is_debug:
|
||||||
|
args_copy.append("is_debug=true")
|
||||||
|
@@ -55,6 +59,8 @@ def make_args(args, platform, is_64=True, is_debug=False):
|
||||||
linux_clang = False
|
linux_clang = False
|
||||||
if (platform == "linux"):
|
if (platform == "linux"):
|
||||||
args_copy.append("is_clang=true")
|
args_copy.append("is_clang=true")
|
||||||
|
@ -11,3 +24,22 @@ index 2c920a4..61dcafc 100644
|
||||||
if "1" == config.option("use-clang"):
|
if "1" == config.option("use-clang"):
|
||||||
args_copy.append("use_sysroot=true")
|
args_copy.append("use_sysroot=true")
|
||||||
linux_clang = True
|
linux_clang = True
|
||||||
|
@@ -127,7 +133,7 @@ def make():
|
||||||
|
base.cmd("git", ["clone", "https://chromium.googlesource.com/chromium/tools/depot_tools.git"])
|
||||||
|
change_bootstrap()
|
||||||
|
|
||||||
|
- os.environ["PATH"] = base_dir + "/depot_tools" + os.pathsep + os.environ["PATH"]
|
||||||
|
+ os.environ["PATH"] = os.environ["PATH"] + os.pathsep + base_dir + "/depot_tools"
|
||||||
|
|
||||||
|
if ("windows" == base.host_platform()):
|
||||||
|
base.set_env("DEPOT_TOOLS_WIN_TOOLCHAIN", "0")
|
||||||
|
@@ -180,8 +186,7 @@ def make():
|
||||||
|
base.cmd("ninja", ["-C", "out.gn/linux_32"])
|
||||||
|
|
||||||
|
if config.check_option("platform", "linux_arm64"):
|
||||||
|
- base.cmd("build/linux/sysroot_scripts/install-sysroot.py", ["--arch=arm64"], False)
|
||||||
|
- base.cmd2("gn", ["gen", "out.gn/linux_arm64", make_args(gn_args, "linux_arm64", False)])
|
||||||
|
+ base.cmd2("gn", ["gen", "out.gn/linux_arm64", make_args(gn_args, "linux_arm64")])
|
||||||
|
base.cmd("ninja", ["-C", "out.gn/linux_arm64"])
|
||||||
|
|
||||||
|
if config.check_option("platform", "mac_64"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue