2023-01-03 17:39:06 +08:00
|
|
|
name: Flutter Windows History Build
|
|
|
|
|
|
|
|
on: [workflow_dispatch]
|
|
|
|
|
|
|
|
env:
|
|
|
|
LLVM_VERSION: "10.0"
|
2024-02-11 00:15:11 +08:00
|
|
|
FLUTTER_VERSION: "3.16.9"
|
2023-01-03 17:39:06 +08:00
|
|
|
TAG_NAME: "tmp"
|
2023-11-01 17:04:32 +08:00
|
|
|
FLUTTER_RUST_BRIDGE_VERSION: "1.80.1"
|
2023-11-04 03:41:48 +08:00
|
|
|
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
|
2023-10-14 11:07:08 +08:00
|
|
|
VERSION: "1.2.4"
|
2023-01-03 17:39:06 +08:00
|
|
|
|
|
|
|
jobs:
|
2023-08-17 18:49:03 +08:00
|
|
|
build-for-history-windows:
|
2023-08-17 21:07:20 +08:00
|
|
|
name: ${{ matrix.job.date }}
|
2023-01-03 17:39:06 +08:00
|
|
|
runs-on: ${{ matrix.job.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
job:
|
2023-08-17 18:49:03 +08:00
|
|
|
- { target: x86_64-pc-windows-msvc, os: windows-2019, arch: x86_64, date: 2023-08-04, ref: 72c198a1e94cc1e0242fce88f92b3f3caedcd0c3 }
|
2023-01-03 17:39:06 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout source code
|
2023-12-13 21:22:38 +08:00
|
|
|
uses: actions/checkout@v4
|
2023-01-03 17:39:06 +08:00
|
|
|
with:
|
2023-08-17 18:49:03 +08:00
|
|
|
ref: ${{ matrix.job.ref }}
|
2023-01-03 17:39:06 +08:00
|
|
|
|
|
|
|
- name: Install LLVM and Clang
|
|
|
|
uses: KyleMayes/install-llvm-action@v1
|
|
|
|
with:
|
|
|
|
version: ${{ env.LLVM_VERSION }}
|
|
|
|
|
|
|
|
- name: Install flutter
|
2024-03-04 09:17:56 +08:00
|
|
|
uses: subosito/flutter-action@v2.12.0 #https://github.com/subosito/flutter-action/issues/277
|
2023-01-03 17:39:06 +08:00
|
|
|
with:
|
|
|
|
channel: "stable"
|
|
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
|
|
cache: true
|
|
|
|
|
2023-01-03 17:54:50 +08:00
|
|
|
- name: Install Rust toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2023-08-17 18:41:47 +08:00
|
|
|
toolchain: stable
|
2023-01-03 17:54:50 +08:00
|
|
|
target: ${{ matrix.job.target }}
|
|
|
|
override: true
|
|
|
|
components: rustfmt
|
|
|
|
profile: minimal # minimal component installation (ie, no documentation)
|
|
|
|
|
|
|
|
- name: Install flutter rust bridge deps
|
|
|
|
run: |
|
2023-08-17 18:41:47 +08:00
|
|
|
cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid"
|
2023-01-03 17:54:50 +08:00
|
|
|
Push-Location flutter ; flutter pub get ; Pop-Location
|
|
|
|
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart
|
|
|
|
|
2023-11-04 03:41:48 +08:00
|
|
|
- name: Setup vcpkg with Github Actions binary cache
|
|
|
|
uses: lukka/run-vcpkg@v11
|
|
|
|
with:
|
|
|
|
vcpkgDirectory: C:\vcpkg
|
|
|
|
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
|
|
|
|
|
2023-01-03 17:54:50 +08:00
|
|
|
- name: Install vcpkg dependencies
|
|
|
|
run: |
|
2023-11-04 03:41:48 +08:00
|
|
|
$VCPKG_ROOT/vcpkg install --x-install-root="$VCPKG_ROOT/installed"
|
|
|
|
shell: bash
|
|
|
|
|
2023-01-03 17:54:50 +08:00
|
|
|
- name: Build rustdesk
|
2024-02-20 03:19:38 +08:00
|
|
|
run: python3 .\build.py --portable --hwcodec --flutter
|
2023-01-03 17:54:50 +08:00
|
|
|
|
|
|
|
- name: Build self-extracted executable
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
pushd ./libs/portable
|
|
|
|
python3 ./generate.py -f ../../flutter/build/windows/runner/Release/ -o . -e ../../flutter/build/windows/runner/Release/rustdesk.exe
|
|
|
|
popd
|
|
|
|
mkdir -p ./SignOutput
|
2023-08-17 18:49:03 +08:00
|
|
|
mv ./target/release/rustdesk-portable-packer.exe ./SignOutput/rustdesk-${{ matrix.job.date }}-${{ matrix.job.target }}.exe
|
2023-11-04 03:41:48 +08:00
|
|
|
|
2023-01-03 17:54:50 +08:00
|
|
|
- name: Publish Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
prerelease: true
|
|
|
|
tag_name: ${{ env.TAG_NAME }}
|
|
|
|
files: |
|
|
|
|
./SignOutput/rustdesk-*.exe
|