Revert "opt: remove elinux deps for arm64"

This reverts commit a4f405c18219287388ad632fbfa2a94b05d5d388.
This commit is contained in:
Kingtous 2023-05-22 14:50:43 +08:00
parent aa5b6d7576
commit 97a365e8c6

View File

@ -10,6 +10,9 @@ on:
env:
LLVM_VERSION: "15.0.6"
FLUTTER_VERSION: "3.10.0"
# for arm64 linux
FLUTTER_ELINUX_VERSION: "3.7.0"
FLUTTER_ELINUX_COMMIT_ID: "51a1d685901f79fbac51665a967c3a1a789ecee5"
TAG_NAME: "nightly"
# vcpkg version: 2023.04.15
# for multiarch gcc compatibility
@ -1160,18 +1163,18 @@ jobs:
name: librustdesk-${{ matrix.job.arch }}-${{ matrix.job.extra-build-features }}.so
path: ./target/release/
# - name: Download Flutter
# shell: bash
# run: |
# # disable git safe.directory
# git config --global --add safe.directory "*"
# pushd /opt
# # clone repo and reset to flutter ${{ env.FLUTTER_VERSION }}
# git clone https://github.com/sony/flutter-elinux.git || true
# pushd flutter-elinux
# git fetch
# git reset --hard ${{ env.FLUTTER_ELINUX_COMMIT_ID }}
# popd
- name: Download Flutter
shell: bash
run: |
# disable git safe.directory
git config --global --add safe.directory "*"
pushd /opt
# clone repo and reset to flutter 3.7.0
git clone https://github.com/sony/flutter-elinux.git || true
pushd flutter-elinux
git fetch
git reset --hard ${{ env.FLUTTER_ELINUX_COMMIT_ID }}
popd
- uses: Kingtous/run-on-arch-action@amd64-support
name: Build rustdesk binary for ${{ matrix.job.arch }}
@ -1185,6 +1188,7 @@ jobs:
dockerRunArgs: |
--volume "${PWD}:/workspace"
--volume "/opt/artifacts:/opt/artifacts"
--volume "/opt/flutter-elinux:/opt/flutter-elinux"
shell: /bin/bash
install: |
apt update -y
@ -1192,20 +1196,19 @@ jobs:
run: |
# disable git safe.directory
git config --global --add safe.directory "*"
pushd /opt
# Setup Flutter
wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${{ env.FLUTTER_VERSION }}-stable.tar.xz
tar xf flutter_linux_${{ env.FLUTTER_VERSION }}-stable.tar.xz
ls -l .
export PATH=/opt/flutter/bin:$PATH
flutter doctor -v
pushd /workspace
# we use flutter-elinux to build our rustdesk
export PATH=/opt/flutter-elinux/bin:$PATH
sed -i "s/flutter build linux --release/flutter-elinux build linux/g" ./build.py
# Setup flutter-elinux. Run doctor to check if issues here.
flutter-elinux doctor -v
# Patch arm64 engine for flutter 3.6.0+
flutter precache --linux
# pushd /tmp
# curl -O https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.7.0-stable.tar.xz
# tar -xvf flutter_linux_3.7.0-stable.tar.xz flutter/bin/cache/artifacts/engine/linux-x64/shader_lib
# cp -R flutter/bin/cache/artifacts/engine/linux-x64/shader_lib /opt/flutter-elinux/flutter/bin/cache/artifacts/engine/linux-arm64
# popd
flutter-elinux precache --linux
pushd /tmp
curl -O https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.7.0-stable.tar.xz
tar -xvf flutter_linux_3.7.0-stable.tar.xz flutter/bin/cache/artifacts/engine/linux-x64/shader_lib
cp -R flutter/bin/cache/artifacts/engine/linux-x64/shader_lib /opt/flutter-elinux/flutter/bin/cache/artifacts/engine/linux-arm64
popd
# edit to corresponding arch
case ${{ matrix.job.arch }} in
aarch64)