diff --git a/.github/workflows/flutter-build.yml b/.github/workflows/flutter-build.yml index 6123e8e44..8451a2a19 100644 --- a/.github/workflows/flutter-build.yml +++ b/.github/workflows/flutter-build.yml @@ -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)