mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-24 18:40:08 +08:00
ci: add linux/arm64 build (#510)
* feat: add linux/arm64 support * Update build.yml * Update pack_debian.sh * Update build.yml * Update build_go.sh * Update build.yml
This commit is contained in:
parent
6f9b2c69e2
commit
155bfb5c69
30
.github/workflows/build.yml
vendored
30
.github/workflows/build.yml
vendored
@ -28,6 +28,9 @@ jobs:
|
|||||||
- cross_os: linux
|
- cross_os: linux
|
||||||
cross_arch: amd64
|
cross_arch: amd64
|
||||||
go_version: "1.24.4"
|
go_version: "1.24.4"
|
||||||
|
- cross_os: linux
|
||||||
|
cross_arch: arm64
|
||||||
|
go_version: "1.24.4"
|
||||||
- cross_os: darwin
|
- cross_os: darwin
|
||||||
cross_arch: amd64
|
cross_arch: amd64
|
||||||
go_version: "1.24.4"
|
go_version: "1.24.4"
|
||||||
@ -82,6 +85,9 @@ jobs:
|
|||||||
- platform: ubuntu-22.04
|
- platform: ubuntu-22.04
|
||||||
qt_version: "6.9.1"
|
qt_version: "6.9.1"
|
||||||
target: amd64
|
target: amd64
|
||||||
|
- platform: ubuntu-24.04-arm
|
||||||
|
qt_version: "6.9.1"
|
||||||
|
target: arm64
|
||||||
- platform: macos-latest
|
- platform: macos-latest
|
||||||
qt_version: "6.9.1"
|
qt_version: "6.9.1"
|
||||||
target: x86_64
|
target: x86_64
|
||||||
@ -100,9 +106,6 @@ jobs:
|
|||||||
- name: Install mingw
|
- name: Install mingw
|
||||||
if: matrix.platform == 'windows-latest'
|
if: matrix.platform == 'windows-latest'
|
||||||
uses: bwoodsend/setup-winlibs-action@v1.15
|
uses: bwoodsend/setup-winlibs-action@v1.15
|
||||||
- name: Install ninja-build tool
|
|
||||||
uses: seanmiddleditch/gha-setup-ninja@v6
|
|
||||||
|
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
uses: actions/download-artifact@v4.3.0
|
uses: actions/download-artifact@v4.3.0
|
||||||
with:
|
with:
|
||||||
@ -142,14 +145,11 @@ jobs:
|
|||||||
- name: Windows - Generate MakeFile and Build
|
- name: Windows - Generate MakeFile and Build
|
||||||
shell: bash
|
shell: bash
|
||||||
if: matrix.platform == 'windows-latest'
|
if: matrix.platform == 'windows-latest'
|
||||||
env:
|
|
||||||
CC: gcc.exe
|
|
||||||
CXX: g++.exe
|
|
||||||
run: |
|
run: |
|
||||||
export CMAKE_PREFIX_PATH=$PWD/qt6/build/lib/cmake
|
export CMAKE_PREFIX_PATH=$PWD/qt6/build/lib/cmake
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -GNinja -DQT_VERSION_MAJOR=6 -DCMAKE_CXX_FLAGS="-static -DNDEBUG -s" ..
|
cmake -GNinja -DCMAKE_CXX_FLAGS="-static -DNDEBUG -s" ..
|
||||||
ninja -j2
|
ninja -j2
|
||||||
cd ..
|
cd ..
|
||||||
./script/deploy_windows64.sh
|
./script/deploy_windows64.sh
|
||||||
@ -162,12 +162,12 @@ jobs:
|
|||||||
cp NekoraySetup.exe deployment/
|
cp NekoraySetup.exe deployment/
|
||||||
- name: Linux - Generate MakeFile and Build
|
- name: Linux - Generate MakeFile and Build
|
||||||
shell: bash
|
shell: bash
|
||||||
if: matrix.platform == 'ubuntu-22.04'
|
if: contains( matrix.platform, 'ubuntu' )
|
||||||
run: |
|
run: |
|
||||||
sudo apt update && sudo apt upgrade -y
|
sudo apt update && sudo apt upgrade -y
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -GNinja -DQT_VERSION_MAJOR=6 -DCMAKE_BUILD_TYPE=Release ..
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++" ..
|
||||||
ninja
|
ninja
|
||||||
cd ..
|
cd ..
|
||||||
./script/deploy_linux64.sh
|
./script/deploy_linux64.sh
|
||||||
@ -177,7 +177,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -GNinja -DQT_VERSION_MAJOR=6 -DCMAKE_BUILD_TYPE=Release -DNKR_PACKAGE_MACOS=1 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_OSX_ARCHITECTURES=${{ matrix.target }} ..
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DNKR_PACKAGE_MACOS=1 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_OSX_ARCHITECTURES=${{ matrix.target }} ..
|
||||||
ninja
|
ninja
|
||||||
cd ..
|
cd ..
|
||||||
./script/deploy_macos.sh ${{ matrix.target }}
|
./script/deploy_macos.sh ${{ matrix.target }}
|
||||||
@ -219,8 +219,12 @@ jobs:
|
|||||||
mv nekoray.deb $version_standalone-debian-x64.deb
|
mv nekoray.deb $version_standalone-debian-x64.deb
|
||||||
rm -rf nekoray
|
rm -rf nekoray
|
||||||
####
|
####
|
||||||
mv linux64 nekoray
|
mv linux-amd64 nekoray
|
||||||
zip -9 -r $version_standalone-linux64.zip nekoray
|
zip -9 -r $version_standalone-linux-amd64.zip nekoray
|
||||||
|
rm -rf nekoray
|
||||||
|
####
|
||||||
|
mv linux-arm64 nekoray
|
||||||
|
zip -9 -r $version_standalone-linux-arm64.zip nekoray
|
||||||
rm -rf nekoray
|
rm -rf nekoray
|
||||||
####
|
####
|
||||||
mv NekoraySetup.exe $version_standalone-windows64-installer.exe
|
mv NekoraySetup.exe $version_standalone-windows64-installer.exe
|
||||||
@ -244,7 +248,7 @@ jobs:
|
|||||||
cd deployment
|
cd deployment
|
||||||
rm -rf windows-arm64
|
rm -rf windows-arm64
|
||||||
rm -rf linux-arm64
|
rm -rf linux-arm64
|
||||||
rm -rf linux64
|
rm -rf linux-amd64
|
||||||
rm -rf windows64
|
rm -rf windows64
|
||||||
rm -rf macos-amd64
|
rm -rf macos-amd64
|
||||||
rm -rf macos-arm64
|
rm -rf macos-arm64
|
||||||
|
|||||||
@ -4,7 +4,7 @@ set -e
|
|||||||
source script/env_deploy.sh
|
source script/env_deploy.sh
|
||||||
[ "$GOOS" == "windows" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/windows64 || true
|
[ "$GOOS" == "windows" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/windows64 || true
|
||||||
[ "$GOOS" == "windows" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/windows-arm64 || true
|
[ "$GOOS" == "windows" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/windows-arm64 || true
|
||||||
[ "$GOOS" == "linux" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/linux64 || true
|
[ "$GOOS" == "linux" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/linux-amd64 || true
|
||||||
[ "$GOOS" == "linux" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/linux-arm64 || true
|
[ "$GOOS" == "linux" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/linux-arm64 || true
|
||||||
[ "$GOOS" == "darwin" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/macos-amd64 || true
|
[ "$GOOS" == "darwin" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/macos-amd64 || true
|
||||||
[ "$GOOS" == "darwin" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/macos-arm64 || true
|
[ "$GOOS" == "darwin" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/macos-arm64 || true
|
||||||
|
|||||||
@ -3,12 +3,14 @@ set -e
|
|||||||
|
|
||||||
if [[ $(uname -m) == 'aarch64' || $(uname -m) == 'arm64' ]]; then
|
if [[ $(uname -m) == 'aarch64' || $(uname -m) == 'arm64' ]]; then
|
||||||
ARCH="arm64"
|
ARCH="arm64"
|
||||||
|
ARCH1="aarch64"
|
||||||
else
|
else
|
||||||
ARCH="amd64"
|
ARCH="amd64"
|
||||||
|
ARCH1="x86_64"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source script/env_deploy.sh
|
source script/env_deploy.sh
|
||||||
DEST=$DEPLOYMENT/linux64
|
DEST=$DEPLOYMENT/linux-$ARCH
|
||||||
rm -rf $DEST
|
rm -rf $DEST
|
||||||
mkdir -p $DEST
|
mkdir -p $DEST
|
||||||
|
|
||||||
@ -28,14 +30,14 @@ mv $DEPLOYMENT/public_res/* $DEST
|
|||||||
sudo add-apt-repository universe
|
sudo add-apt-repository universe
|
||||||
sudo apt install libfuse2
|
sudo apt install libfuse2
|
||||||
sudo apt install patchelf
|
sudo apt install patchelf
|
||||||
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-x86_64.AppImage
|
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-$ARCH1.AppImage
|
||||||
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20240109-1/linuxdeploy-plugin-qt-x86_64.AppImage
|
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20250213-1/linuxdeploy-plugin-qt-$ARCH1.AppImage
|
||||||
chmod +x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-qt-x86_64.AppImage
|
chmod +x linuxdeploy-$ARCH1.AppImage linuxdeploy-plugin-qt-$ARCH1.AppImage
|
||||||
|
|
||||||
export EXTRA_QT_PLUGINS="iconengines;wayland-shell-integration;wayland-decoration-client;"
|
export EXTRA_QT_PLUGINS="iconengines;wayland-shell-integration;wayland-decoration-client;"
|
||||||
export EXTRA_PLATFORM_PLUGINS="libqwayland-generic.so;"
|
export EXTRA_PLATFORM_PLUGINS="libqwayland-generic.so;"
|
||||||
./linuxdeploy-x86_64.AppImage --appdir $DEST --executable $DEST/nekoray --plugin qt
|
./linuxdeploy-$ARCH1.AppImage --appdir $DEST --executable $DEST/nekoray --plugin qt
|
||||||
rm linuxdeploy-x86_64.AppImage linuxdeploy-plugin-qt-x86_64.AppImage
|
rm linuxdeploy-$ARCH1.AppImage linuxdeploy-plugin-qt-$ARCH1.AppImage
|
||||||
cd $DEST
|
cd $DEST
|
||||||
rm -r ./usr/translations ./usr/bin ./usr/share ./apprun-hooks
|
rm -r ./usr/translations ./usr/bin ./usr/share ./apprun-hooks
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,8 @@ version="$1"
|
|||||||
|
|
||||||
mkdir -p nekoray/DEBIAN
|
mkdir -p nekoray/DEBIAN
|
||||||
mkdir -p nekoray/opt
|
mkdir -p nekoray/opt
|
||||||
cp -r linux64 nekoray/opt
|
cp -r linux-amd64 nekoray/opt
|
||||||
mv nekoray/opt/linux64 nekoray/opt/nekoray
|
mv nekoray/opt/linux-amd64 nekoray/opt/nekoray
|
||||||
|
|
||||||
# basic
|
# basic
|
||||||
cat >nekoray/DEBIAN/control <<-EOF
|
cat >nekoray/DEBIAN/control <<-EOF
|
||||||
@ -37,4 +37,4 @@ sudo chmod 0755 nekoray/DEBIAN/postinst
|
|||||||
|
|
||||||
# desktop && PATH
|
# desktop && PATH
|
||||||
|
|
||||||
sudo dpkg-deb --build nekoray
|
sudo dpkg-deb --build nekoray
|
||||||
|
|||||||
@ -2267,8 +2267,12 @@ void MainWindow::CheckUpdate() {
|
|||||||
search = "windows32";
|
search = "windows32";
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#if defined(Q_OS_LINUX) && defined(Q_PROCESSOR_X86_64)
|
#ifdef Q_OS_LINUX
|
||||||
search = "linux64";
|
# ifdef Q_PROCESSOR_X86_64
|
||||||
|
search = "linux-amd64";
|
||||||
|
# else
|
||||||
|
search = "linux-arm64";
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
# ifdef Q_PROCESSOR_X86_64
|
# ifdef Q_PROCESSOR_X86_64
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user