mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-27 14:59:02 +08:00
refact: ci, bridge (#9899)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
parent
0aa98eac6d
commit
ab89d84a8f
56
.github/workflows/bridge.yml
vendored
56
.github/workflows/bridge.yml
vendored
@ -18,40 +18,15 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
job:
|
job:
|
||||||
- {
|
- {
|
||||||
target: x86_64-unknown-linux-gnu,
|
target: x86_64-apple-darwin,
|
||||||
os: ubuntu-20.04,
|
os: macos-13,
|
||||||
extra-build-args: "",
|
arch: x86_64,
|
||||||
}
|
|
||||||
- {
|
|
||||||
target: aarch64-apple-darwin,
|
|
||||||
os: macos-latest,
|
|
||||||
arch: aarch64,
|
|
||||||
extra-build-args: "",
|
extra-build-args: "",
|
||||||
}
|
}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install prerequisites
|
|
||||||
if: matrix.job.os == 'ubuntu-20.04'
|
|
||||||
run: |
|
|
||||||
sudo apt-get install ca-certificates -y
|
|
||||||
sudo apt-get update -y
|
|
||||||
sudo apt-get install -y \
|
|
||||||
clang \
|
|
||||||
cmake \
|
|
||||||
curl \
|
|
||||||
gcc \
|
|
||||||
git \
|
|
||||||
g++ \
|
|
||||||
libclang-10-dev \
|
|
||||||
libgtk-3-dev \
|
|
||||||
llvm-10-dev \
|
|
||||||
nasm \
|
|
||||||
ninja-build \
|
|
||||||
pkg-config \
|
|
||||||
wget
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@v1
|
uses: dtolnay/rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
@ -85,18 +60,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Run flutter rust bridge
|
- name: Run flutter rust bridge
|
||||||
run: |
|
run: |
|
||||||
case ${{ matrix.job.os }} in
|
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/macos/Runner/bridge_generated.h
|
||||||
ubuntu-20.04)
|
cp ./flutter/macos/Runner/bridge_generated.h ./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
|
|
||||||
;;
|
|
||||||
macos-latest)
|
|
||||||
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/macos/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
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
- name: Upload Artifact(ubuntu)
|
- name: Upload Artifact
|
||||||
if: matrix.job.os == 'ubuntu-20.04'
|
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: bridge-artifact
|
name: bridge-artifact
|
||||||
@ -105,16 +72,5 @@ jobs:
|
|||||||
./src/bridge_generated.io.rs
|
./src/bridge_generated.io.rs
|
||||||
./flutter/lib/generated_bridge.dart
|
./flutter/lib/generated_bridge.dart
|
||||||
./flutter/lib/generated_bridge.freezed.dart
|
./flutter/lib/generated_bridge.freezed.dart
|
||||||
|
|
||||||
- name: Upload Artifact(macos)
|
|
||||||
if: matrix.job.os == 'macos-latest'
|
|
||||||
uses: actions/upload-artifact@master
|
|
||||||
with:
|
|
||||||
name: bridge-artifact-macos
|
|
||||||
path: |
|
|
||||||
./src/bridge_generated.rs
|
|
||||||
./src/bridge_generated.io.rs
|
|
||||||
./flutter/lib/generated_bridge.dart
|
|
||||||
./flutter/lib/generated_bridge.freezed.dart
|
|
||||||
./flutter/macos/Runner/bridge_generated.h
|
./flutter/macos/Runner/bridge_generated.h
|
||||||
./flutter/ios/Runner/bridge_generated.h
|
./flutter/ios/Runner/bridge_generated.h
|
||||||
|
8
.github/workflows/flutter-build.yml
vendored
8
.github/workflows/flutter-build.yml
vendored
@ -408,7 +408,7 @@ jobs:
|
|||||||
- name: Restore bridge files
|
- name: Restore bridge files
|
||||||
uses: actions/download-artifact@master
|
uses: actions/download-artifact@master
|
||||||
with:
|
with:
|
||||||
name: bridge-artifact-macos
|
name: bridge-artifact
|
||||||
path: ./
|
path: ./
|
||||||
|
|
||||||
- name: Build rustdesk
|
- name: Build rustdesk
|
||||||
@ -538,7 +538,7 @@ jobs:
|
|||||||
- name: Restore bridge files
|
- name: Restore bridge files
|
||||||
uses: actions/download-artifact@master
|
uses: actions/download-artifact@master
|
||||||
with:
|
with:
|
||||||
name: bridge-artifact-macos
|
name: bridge-artifact
|
||||||
path: ./
|
path: ./
|
||||||
|
|
||||||
- name: Build rustdesk lib
|
- name: Build rustdesk lib
|
||||||
@ -593,7 +593,7 @@ jobs:
|
|||||||
- name: Restore bridge files
|
- name: Restore bridge files
|
||||||
uses: actions/download-artifact@master
|
uses: actions/download-artifact@master
|
||||||
with:
|
with:
|
||||||
name: bridge-artifact-macos
|
name: bridge-artifact
|
||||||
path: ./
|
path: ./
|
||||||
|
|
||||||
- name: Build rustdesk lib
|
- name: Build rustdesk lib
|
||||||
@ -728,7 +728,7 @@ jobs:
|
|||||||
- name: Restore bridge files
|
- name: Restore bridge files
|
||||||
uses: actions/download-artifact@master
|
uses: actions/download-artifact@master
|
||||||
with:
|
with:
|
||||||
name: bridge-artifact-macos
|
name: bridge-artifact
|
||||||
path: ./
|
path: ./
|
||||||
|
|
||||||
- name: Setup vcpkg with Github Actions binary cache
|
- name: Setup vcpkg with Github Actions binary cache
|
||||||
|
Loading…
Reference in New Issue
Block a user