commit
14ec8c4bea
57
.github/workflows/flutter-build.yml
vendored
57
.github/workflows/flutter-build.yml
vendored
@ -15,6 +15,9 @@ env:
|
|||||||
LLVM_VERSION: "15.0.6"
|
LLVM_VERSION: "15.0.6"
|
||||||
FLUTTER_VERSION: "3.13.9"
|
FLUTTER_VERSION: "3.13.9"
|
||||||
FLUTTER_RUST_BRIDGE_VERSION: "1.80.1"
|
FLUTTER_RUST_BRIDGE_VERSION: "1.80.1"
|
||||||
|
# for arm64 linux because official Dart SDK does not work
|
||||||
|
FLUTTER_ELINUX_VERSION: "3.13.9"
|
||||||
|
FLUTTER_ELINUX_COMMIT_ID: "f4d4205893c16b0aa9cb6ba46b9f32b639d3b057"
|
||||||
TAG_NAME: "${{ inputs.upload-tag }}"
|
TAG_NAME: "${{ inputs.upload-tag }}"
|
||||||
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
|
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
|
||||||
# vcpkg version: 2023.10.19
|
# vcpkg version: 2023.10.19
|
||||||
@ -428,7 +431,6 @@ jobs:
|
|||||||
|
|
||||||
build-rustdesk-ios:
|
build-rustdesk-ios:
|
||||||
if: ${{ inputs.upload-artifact }}
|
if: ${{ inputs.upload-artifact }}
|
||||||
needs: [generate-bridge-linux]
|
|
||||||
name: build rustdesk ios ipa ${{ matrix.job.target }} (${{ matrix.job.os }}) [${{ matrix.job.extra-build-features }}]
|
name: build rustdesk ios ipa ${{ matrix.job.target }} (${{ matrix.job.os }}) [${{ matrix.job.extra-build-features }}]
|
||||||
runs-on: ${{ matrix.job.os }}
|
runs-on: ${{ matrix.job.os }}
|
||||||
strategy:
|
strategy:
|
||||||
@ -470,12 +472,6 @@ jobs:
|
|||||||
$VCPKG_ROOT/vcpkg install --triplet arm64-ios --x-install-root="$VCPKG_ROOT/installed"
|
$VCPKG_ROOT/vcpkg install --triplet arm64-ios --x-install-root="$VCPKG_ROOT/installed"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Restore bridge files
|
|
||||||
uses: actions/download-artifact@master
|
|
||||||
with:
|
|
||||||
name: bridge-artifact
|
|
||||||
path: ./
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@ -489,13 +485,12 @@ jobs:
|
|||||||
prefix-key: rustdesk-lib-cache-ios
|
prefix-key: rustdesk-lib-cache-ios
|
||||||
key: ${{ matrix.job.target }}-${{ matrix.job.extra-build-features }}
|
key: ${{ matrix.job.target }}-${{ matrix.job.extra-build-features }}
|
||||||
|
|
||||||
# TODO: Re-evaluate caching bridge with flutter-rust-bridge >= 1.81.0
|
- name: Install flutter rust bridge deps
|
||||||
# - name: Install flutter rust bridge deps
|
shell: bash
|
||||||
# shell: bash
|
run: |
|
||||||
# run: |
|
cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid"
|
||||||
# cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid"
|
pushd flutter && flutter pub get && popd
|
||||||
# pushd flutter && flutter pub get && popd
|
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/ios/Runner/bridge_generated.h
|
||||||
# ~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/ios/Runner/bridge_generated.h
|
|
||||||
|
|
||||||
- name: Build rustdesk lib
|
- name: Build rustdesk lib
|
||||||
run: |
|
run: |
|
||||||
@ -1398,6 +1393,19 @@ jobs:
|
|||||||
name: librustdesk-${{ matrix.job.arch }}-${{ matrix.job.extra-build-features }}.so
|
name: librustdesk-${{ matrix.job.arch }}-${{ matrix.job.extra-build-features }}.so
|
||||||
path: ./target/release/
|
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
|
||||||
|
|
||||||
- uses: rustdesk-org/run-on-arch-action@amd64-support
|
- uses: rustdesk-org/run-on-arch-action@amd64-support
|
||||||
name: Build rustdesk binary for ${{ matrix.job.arch }}
|
name: Build rustdesk binary for ${{ matrix.job.arch }}
|
||||||
id: vcpkg
|
id: vcpkg
|
||||||
@ -1410,6 +1418,7 @@ jobs:
|
|||||||
dockerRunArgs: |
|
dockerRunArgs: |
|
||||||
--volume "${PWD}:/workspace"
|
--volume "${PWD}:/workspace"
|
||||||
--volume "/opt/artifacts:/opt/artifacts"
|
--volume "/opt/artifacts:/opt/artifacts"
|
||||||
|
--volume "/opt/flutter-elinux:/opt/flutter-elinux"
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
install: |
|
install: |
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
@ -1436,14 +1445,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# disable git safe.directory
|
# disable git safe.directory
|
||||||
git config --global --add safe.directory "*"
|
git config --global --add safe.directory "*"
|
||||||
# Setup Flutter
|
pushd /workspace
|
||||||
pushd /opt
|
# we use flutter-elinux to build our rustdesk
|
||||||
wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${{ env.FLUTTER_VERSION }}-stable.tar.xz
|
export PATH=/opt/flutter-elinux/bin:$PATH
|
||||||
tar xf flutter_linux_${{ env.FLUTTER_VERSION }}-stable.tar.xz
|
sed -i "s/flutter build linux --release/flutter-elinux build linux/g" ./build.py
|
||||||
ls -l .
|
# Setup flutter-elinux. Run doctor to check if issues here.
|
||||||
export PATH=/opt/flutter/bin:$PATH
|
flutter-elinux doctor -v
|
||||||
flutter doctor -v
|
# Patch arm64 engine for flutter 3.6.0+
|
||||||
flutter precache --linux
|
flutter-elinux precache --linux
|
||||||
|
pushd /tmp
|
||||||
|
curl -O https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${{ env.FLUTTER_ELINUX_VERSION }}-stable.tar.xz
|
||||||
|
tar -xvf flutter_linux_${{ env.FLUTTER_ELINUX_VERSION }}-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
|
popd
|
||||||
# edit to corresponding arch
|
# edit to corresponding arch
|
||||||
case ${{ matrix.job.arch }} in
|
case ${{ matrix.job.arch }} in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user