feat: reuse nightly
This commit is contained in:
parent
67821f1d42
commit
fffeda30a3
894
.github/workflows/flutter-ci.yml
vendored
894
.github/workflows/flutter-ci.yml
vendored
@ -16,897 +16,9 @@ on:
|
|||||||
- "docs/**"
|
- "docs/**"
|
||||||
- "README.md"
|
- "README.md"
|
||||||
|
|
||||||
env:
|
|
||||||
LLVM_VERSION: "15.0.6"
|
|
||||||
FLUTTER_VERSION: "3.7.5"
|
|
||||||
# vcpkg version: 2022.05.10
|
|
||||||
# for multiarch gcc compatibility
|
|
||||||
VCPKG_COMMIT_ID: "14e7bb4ae24616ec54ff6b2f6ef4e8659434ea44"
|
|
||||||
VERSION: "1.2.0"
|
|
||||||
NDK_VERSION: "r23"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-for-windows-flutter:
|
run-ci:
|
||||||
name: ${{ matrix.job.target }} (${{ matrix.job.os }})
|
uses: ./.github/workflows/flutter-nightly.yml
|
||||||
runs-on: ${{ matrix.job.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
matrix:
|
|
||||||
job:
|
|
||||||
# - { target: i686-pc-windows-msvc , os: windows-2019 }
|
|
||||||
# - { target: x86_64-pc-windows-gnu , os: windows-2019 }
|
|
||||||
- { target: x86_64-pc-windows-msvc, os: windows-2019 }
|
|
||||||
steps:
|
|
||||||
- name: Checkout source code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install LLVM and Clang
|
|
||||||
uses: KyleMayes/install-llvm-action@v1
|
|
||||||
with:
|
with:
|
||||||
version: ${{ env.LLVM_VERSION }}
|
upload-artifact: false
|
||||||
|
|
||||||
- name: Install flutter
|
|
||||||
uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
channel: "stable"
|
|
||||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
||||||
cache: true
|
|
||||||
|
|
||||||
- name: Replace engine with rustdesk custom flutter engine
|
|
||||||
run: |
|
|
||||||
flutter doctor -v
|
|
||||||
flutter precache --windows
|
|
||||||
Invoke-WebRequest -Uri https://github.com/Kingtous/engine/releases/download/v3.7.0-rustdesk/windows-x64-release-flutter.zip -OutFile windows-x64-flutter-release.zip
|
|
||||||
Expand-Archive windows-x64-flutter-release.zip -DestinationPath engine
|
|
||||||
mv -Force engine/* C:/hostedtoolcache/windows/flutter/stable-${{ env.FLUTTER_VERSION }}-x64/bin/cache/artifacts/engine/windows-x64-release/
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
target: ${{ matrix.job.target }}
|
|
||||||
override: true
|
|
||||||
components: rustfmt
|
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
prefix-key: ${{ matrix.job.os }}
|
|
||||||
|
|
||||||
- name: Install flutter rust bridge deps
|
|
||||||
run: |
|
|
||||||
cargo install flutter_rust_bridge_codegen
|
|
||||||
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
|
|
||||||
|
|
||||||
- name: Restore from cache and install vcpkg
|
|
||||||
uses: lukka/run-vcpkg@v7
|
|
||||||
with:
|
|
||||||
setupOnly: true
|
|
||||||
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
|
|
||||||
|
|
||||||
- name: Install vcpkg dependencies
|
|
||||||
run: |
|
|
||||||
$VCPKG_ROOT/vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static opus:x64-windows-static
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Build rustdesk
|
|
||||||
run: python3 .\build.py --portable --hwcodec --flutter
|
|
||||||
|
|
||||||
# The fallback for the flutter version, we use Sciter for 32bit Windows.
|
|
||||||
build-for-windows-sciter:
|
|
||||||
name: ${{ matrix.job.target }} (${{ matrix.job.os }})
|
|
||||||
runs-on: ${{ matrix.job.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
job:
|
|
||||||
# - { target: i686-pc-windows-msvc , os: windows-2019 }
|
|
||||||
# - { target: x86_64-pc-windows-gnu , os: windows-2019 }
|
|
||||||
- { target: i686-pc-windows-msvc, os: windows-2019 }
|
|
||||||
# - { target: aarch64-pc-windows-msvc, os: windows-2019 }
|
|
||||||
steps:
|
|
||||||
- name: Checkout source code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
target: ${{ matrix.job.target }}
|
|
||||||
override: true
|
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
prefix-key: ${{ matrix.job.os }}-sciter
|
|
||||||
|
|
||||||
- name: Restore from cache and install vcpkg
|
|
||||||
uses: lukka/run-vcpkg@v7
|
|
||||||
with:
|
|
||||||
setupOnly: true
|
|
||||||
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
|
|
||||||
|
|
||||||
- name: Install vcpkg dependencies
|
|
||||||
run: |
|
|
||||||
$VCPKG_ROOT/vcpkg install libvpx:x86-windows-static libyuv:x86-windows-static opus:x86-windows-static
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Build rustdesk
|
|
||||||
id: build
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
python3 res/inline-sciter.py
|
|
||||||
# Replace the link for the ico.
|
|
||||||
rm res/icon.ico && cp flutter/windows/runner/resources/app_icon.ico res/icon.ico
|
|
||||||
cargo build --features inline --target=${{ matrix.job.target }} --release
|
|
||||||
mkdir -p ./Release
|
|
||||||
mv ./target/release/rustdesk.exe ./Release/rustdesk.exe
|
|
||||||
wget -O ./Release/sciter.dll https://github.com/c-smile/sciter-sdk/raw/master/bin.win/x32/sciter.dll
|
|
||||||
echo "output_folder=./Release" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Sign rustdesk files
|
|
||||||
uses: GermanBluefox/code-sign-action@v7
|
|
||||||
with:
|
|
||||||
certificate: '${{ secrets.WINDOWS_PFX_BASE64 }}'
|
|
||||||
password: '${{ secrets.WINDOWS_PFX_PASSWORD }}'
|
|
||||||
certificatesha1: '${{ secrets.WINDOWS_PFX_SHA1_THUMBPRINT }}'
|
|
||||||
# certificatename: '${{ secrets.CERTNAME }}'
|
|
||||||
folder: './Release/'
|
|
||||||
recursive: true
|
|
||||||
|
|
||||||
- name: Build self-extracted executable
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
pushd ./libs/portable
|
|
||||||
python3 ./generate.py -f ../../Release/ -o . -e ../../Release/rustdesk.exe
|
|
||||||
popd
|
|
||||||
mkdir -p ./SignOutput
|
|
||||||
mv ./target/release/rustdesk-portable-packer.exe ./SignOutput/rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}.exe
|
|
||||||
|
|
||||||
- name: Sign rustdesk self-extracted file
|
|
||||||
uses: GermanBluefox/code-sign-action@v7
|
|
||||||
with:
|
|
||||||
certificate: '${{ secrets.WINDOWS_PFX_BASE64 }}'
|
|
||||||
password: '${{ secrets.WINDOWS_PFX_PASSWORD }}'
|
|
||||||
certificatesha1: '${{ secrets.WINDOWS_PFX_SHA1_THUMBPRINT }}'
|
|
||||||
# certificatename: '${{ secrets.WINDOWS_PFX_NAME }}'
|
|
||||||
folder: './SignOutput'
|
|
||||||
recursive: false
|
|
||||||
|
|
||||||
- name: Publish Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
prerelease: true
|
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
|
||||||
files: |
|
|
||||||
./SignOutput/rustdesk-*.exe
|
|
||||||
|
|
||||||
build-for-macOS:
|
|
||||||
name: ${{ matrix.job.target }} (${{ matrix.job.os }}) [${{ matrix.job.extra-build-args }}]
|
|
||||||
runs-on: ${{ matrix.job.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
matrix:
|
|
||||||
job:
|
|
||||||
- {
|
|
||||||
target: x86_64-apple-darwin,
|
|
||||||
os: macos-latest,
|
|
||||||
extra-build-args: "",
|
|
||||||
}
|
|
||||||
steps:
|
|
||||||
- name: Checkout source code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install build runtime
|
|
||||||
run: |
|
|
||||||
brew install llvm create-dmg nasm yasm cmake gcc wget ninja pkg-config
|
|
||||||
|
|
||||||
- name: Install flutter
|
|
||||||
uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
channel: "stable"
|
|
||||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
target: ${{ matrix.job.target }}
|
|
||||||
override: true
|
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
prefix-key: ${{ matrix.job.os }}
|
|
||||||
|
|
||||||
- name: Install flutter rust bridge deps
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cargo install flutter_rust_bridge_codegen
|
|
||||||
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
|
|
||||||
|
|
||||||
- name: Restore from cache and install vcpkg
|
|
||||||
uses: lukka/run-vcpkg@v7
|
|
||||||
with:
|
|
||||||
setupOnly: true
|
|
||||||
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
|
|
||||||
|
|
||||||
- name: Install vcpkg dependencies
|
|
||||||
run: |
|
|
||||||
$VCPKG_ROOT/vcpkg install libvpx libyuv opus
|
|
||||||
|
|
||||||
- name: Show version information (Rust, cargo, Clang)
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
clang --version || true
|
|
||||||
rustup -V
|
|
||||||
rustup toolchain list
|
|
||||||
rustup default
|
|
||||||
cargo -V
|
|
||||||
rustc -V
|
|
||||||
|
|
||||||
- name: Build rustdesk
|
|
||||||
run: |
|
|
||||||
# --hwcodec not supported on macos yet
|
|
||||||
./build.py --flutter ${{ matrix.job.extra-build-args }}
|
|
||||||
|
|
||||||
build-vcpkg-deps-linux:
|
|
||||||
uses: ./.github/workflows/vcpkg-deps-linux.yml
|
|
||||||
|
|
||||||
generate-bridge-linux:
|
|
||||||
uses: ./.github/workflows/bridge.yml
|
|
||||||
|
|
||||||
build-rustdesk-android:
|
|
||||||
needs: [generate-bridge-linux]
|
|
||||||
name: build rustdesk android apk ${{ matrix.job.target }} (${{ matrix.job.os }}) [${{ matrix.job.extra-build-features }}]
|
|
||||||
runs-on: ${{ matrix.job.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
matrix:
|
|
||||||
job:
|
|
||||||
- {
|
|
||||||
arch: x86_64,
|
|
||||||
target: aarch64-linux-android,
|
|
||||||
os: ubuntu-20.04,
|
|
||||||
extra-build-features: "",
|
|
||||||
openssl-arch: android-arm64
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
arch: x86_64,
|
|
||||||
target: armv7-linux-androideabi,
|
|
||||||
os: ubuntu-18.04,
|
|
||||||
extra-build-features: "",
|
|
||||||
openssl-arch: android-arm
|
|
||||||
}
|
|
||||||
steps:
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ libc6-dev gcc-multilib g++-multilib openjdk-11-jdk-headless
|
|
||||||
- name: Checkout source code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Install flutter
|
|
||||||
uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
channel: "stable"
|
|
||||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
||||||
- uses: nttld/setup-ndk@v1
|
|
||||||
id: setup-ndk
|
|
||||||
with:
|
|
||||||
ndk-version: ${{ env.NDK_VERSION }}
|
|
||||||
add-to-path: true
|
|
||||||
|
|
||||||
- name: Clone deps
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
pushd /opt
|
|
||||||
git clone https://github.com/Kingtous/rustdesk_thirdparty_lib.git --depth=1
|
|
||||||
|
|
||||||
- name: Restore bridge files
|
|
||||||
uses: actions/download-artifact@master
|
|
||||||
with:
|
|
||||||
name: bridge-artifact
|
|
||||||
path: ./
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
prefix-key: rustdesk-lib-cache
|
|
||||||
key: ${{ matrix.job.target }}-${{ matrix.job.extra-build-features }}
|
|
||||||
|
|
||||||
- name: Disable rust bridge build
|
|
||||||
run: |
|
|
||||||
sed -i "s/gen_flutter_rust_bridge();/\/\//g" build.rs
|
|
||||||
|
|
||||||
- name: Build rustdesk lib
|
|
||||||
env:
|
|
||||||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
||||||
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
||||||
VCPKG_ROOT: /opt/rustdesk_thirdparty_lib/vcpkg
|
|
||||||
run: |
|
|
||||||
rustup target add ${{ matrix.job.target }}
|
|
||||||
cargo install cargo-ndk
|
|
||||||
case ${{ matrix.job.target }} in
|
|
||||||
aarch64-linux-android)
|
|
||||||
./flutter/ndk_arm64.sh
|
|
||||||
mkdir -p ./flutter/android/app/src/main/jniLibs/arm64-v8a
|
|
||||||
cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/librustdesk.so
|
|
||||||
;;
|
|
||||||
armv7-linux-androideabi)
|
|
||||||
./flutter/ndk_arm.sh
|
|
||||||
mkdir -p ./flutter/android/app/src/main/jniLibs/armeabi-v7a
|
|
||||||
cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/librustdesk.so
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
- name: Build rustdesk
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64
|
|
||||||
run: |
|
|
||||||
export PATH=/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH
|
|
||||||
# temporary use debug sign config
|
|
||||||
sed -i "s/signingConfigs.release/signingConfigs.debug/g" ./flutter/android/app/build.gradle
|
|
||||||
case ${{ matrix.job.target }} in
|
|
||||||
aarch64-linux-android)
|
|
||||||
mkdir -p ./flutter/android/app/src/main/jniLibs/arm64-v8a
|
|
||||||
cp /opt/rustdesk_thirdparty_lib/android/app/src/main/jniLibs/arm64-v8a/*.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/
|
|
||||||
cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/librustdesk.so
|
|
||||||
# build flutter
|
|
||||||
pushd flutter
|
|
||||||
flutter build apk --release --target-platform android-arm64 --split-per-abi
|
|
||||||
mv build/app/outputs/flutter-apk/app-arm64-v8a-release.apk ../rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-release.apk
|
|
||||||
;;
|
|
||||||
armv7-linux-androideabi)
|
|
||||||
mkdir -p ./flutter/android/app/src/main/jniLibs/armeabi-v7a
|
|
||||||
cp /opt/rustdesk_thirdparty_lib/android/app/src/main/jniLibs/armeabi-v7a/*.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/
|
|
||||||
cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/librustdesk.so
|
|
||||||
# build flutter
|
|
||||||
pushd flutter
|
|
||||||
flutter build apk --release --target-platform android-arm --split-per-abi
|
|
||||||
mv build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk ../rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-release.apk
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
popd
|
|
||||||
mkdir -p signed-apk; pushd signed-apk
|
|
||||||
mv ../rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-release.apk .
|
|
||||||
|
|
||||||
build-rustdesk-lib-linux-amd64:
|
|
||||||
needs: [generate-bridge-linux, build-vcpkg-deps-linux]
|
|
||||||
name: build-rust-lib ${{ matrix.job.target }} (${{ matrix.job.os }}) [${{ matrix.job.extra-build-features }}]
|
|
||||||
runs-on: ${{ matrix.job.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
matrix:
|
|
||||||
# use a high level qemu-user-static
|
|
||||||
job:
|
|
||||||
# - { target: i686-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
|
|
||||||
# - { target: i686-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
|
||||||
- {
|
|
||||||
arch: x86_64,
|
|
||||||
target: x86_64-unknown-linux-gnu,
|
|
||||||
os: ubuntu-20.04,
|
|
||||||
extra-build-features: "",
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
arch: x86_64,
|
|
||||||
target: x86_64-unknown-linux-gnu,
|
|
||||||
os: ubuntu-20.04,
|
|
||||||
extra-build-features: "flatpak",
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
arch: x86_64,
|
|
||||||
target: x86_64-unknown-linux-gnu,
|
|
||||||
os: ubuntu-20.04,
|
|
||||||
extra-build-features: "appimage",
|
|
||||||
}
|
|
||||||
# - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
|
||||||
steps:
|
|
||||||
- name: Maximize build space
|
|
||||||
run: |
|
|
||||||
sudo rm -rf /opt/ghc
|
|
||||||
sudo rm -rf /usr/local/lib/android
|
|
||||||
sudo rm -rf /usr/share/dotnet
|
|
||||||
sudo apt update -y
|
|
||||||
sudo apt install qemu-user-static
|
|
||||||
|
|
||||||
- name: Checkout source code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set Swap Space
|
|
||||||
uses: pierotofy/set-swap-space@master
|
|
||||||
with:
|
|
||||||
swap-size-gb: 12
|
|
||||||
|
|
||||||
- name: Free Space
|
|
||||||
run: |
|
|
||||||
df
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
target: ${{ matrix.job.target }}
|
|
||||||
override: true
|
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
prefix-key: rustdesk-lib-cache
|
|
||||||
key: ${{ matrix.job.target }}-${{ matrix.job.extra-build-features }}
|
|
||||||
cache-directories: "/opt/rust-registry"
|
|
||||||
|
|
||||||
- name: Install local registry
|
|
||||||
run: |
|
|
||||||
mkdir -p /opt/rust-registry
|
|
||||||
cargo install cargo-local-registry
|
|
||||||
|
|
||||||
- name: Build local registry
|
|
||||||
uses: nick-fields/retry@v2
|
|
||||||
id: build-local-registry
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
max_attempts: 3
|
|
||||||
timeout_minutes: 15
|
|
||||||
retry_on: error
|
|
||||||
command: cargo local-registry --sync ./Cargo.lock /opt/rust-registry
|
|
||||||
|
|
||||||
- name: Disable rust bridge build
|
|
||||||
run: |
|
|
||||||
sed -i "s/gen_flutter_rust_bridge();/\/\//g" build.rs
|
|
||||||
# only build cdylib
|
|
||||||
sed -i "s/\[\"cdylib\", \"staticlib\", \"rlib\"\]/\[\"cdylib\"\]/g" Cargo.toml
|
|
||||||
|
|
||||||
- name: Restore bridge files
|
|
||||||
uses: actions/download-artifact@master
|
|
||||||
with:
|
|
||||||
name: bridge-artifact
|
|
||||||
path: ./
|
|
||||||
|
|
||||||
- name: Restore vcpkg files
|
|
||||||
uses: actions/download-artifact@master
|
|
||||||
with:
|
|
||||||
name: vcpkg-artifact-${{ matrix.job.arch }}
|
|
||||||
path: /opt/artifacts/vcpkg/installed
|
|
||||||
|
|
||||||
- uses: Kingtous/run-on-arch-action@amd64-support
|
|
||||||
name: Build rustdesk library for ${{ matrix.job.arch }}
|
|
||||||
id: vcpkg
|
|
||||||
with:
|
|
||||||
arch: ${{ matrix.job.arch }}
|
|
||||||
distro: ubuntu18.04
|
|
||||||
# not ready yet
|
|
||||||
# distro: ubuntu18.04-rustdesk
|
|
||||||
githubToken: ${{ github.token }}
|
|
||||||
setup: |
|
|
||||||
ls -l "${PWD}"
|
|
||||||
ls -l /opt/artifacts/vcpkg/installed
|
|
||||||
dockerRunArgs: |
|
|
||||||
--volume "${PWD}:/workspace"
|
|
||||||
--volume "/opt/artifacts:/opt/artifacts"
|
|
||||||
--volume "/opt/rust-registry:/opt/rust-registry"
|
|
||||||
shell: /bin/bash
|
|
||||||
install: |
|
|
||||||
apt update -y
|
|
||||||
echo -e "installing deps"
|
|
||||||
apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ gcc libvpx-dev tree > /dev/null
|
|
||||||
# we have libopus compiled by us.
|
|
||||||
apt remove -y libopus-dev || true
|
|
||||||
# output devs
|
|
||||||
ls -l ./
|
|
||||||
tree -L 3 /opt/artifacts/vcpkg/installed
|
|
||||||
run: |
|
|
||||||
# disable git safe.directory
|
|
||||||
git config --global --add safe.directory "*"
|
|
||||||
# rust
|
|
||||||
pushd /opt
|
|
||||||
wget -O rust.tar.gz https://static.rust-lang.org/dist/rust-1.64.0-${{ matrix.job.target }}.tar.gz
|
|
||||||
tar -zxvf rust.tar.gz > /dev/null && rm rust.tar.gz
|
|
||||||
cd rust-1.64.0-${{ matrix.job.target }} && ./install.sh
|
|
||||||
rm -rf rust-1.64.0-${{ matrix.job.target }}
|
|
||||||
# edit config
|
|
||||||
mkdir -p ~/.cargo/
|
|
||||||
echo """
|
|
||||||
[source.crates-io]
|
|
||||||
registry = 'https://github.com/rust-lang/crates.io-index'
|
|
||||||
replace-with = 'local-registry'
|
|
||||||
|
|
||||||
[source.local-registry]
|
|
||||||
local-registry = '/opt/rust-registry/'
|
|
||||||
""" > ~/.cargo/config
|
|
||||||
cat ~/.cargo/config
|
|
||||||
# start build
|
|
||||||
pushd /workspace
|
|
||||||
# mock
|
|
||||||
case "${{ matrix.job.arch }}" in
|
|
||||||
x86_64)
|
|
||||||
# no need mock on x86_64
|
|
||||||
export VCPKG_ROOT=/opt/artifacts/vcpkg
|
|
||||||
cargo build --lib --features hwcodec,flutter,flutter_texture_render,${{ matrix.job.extra-build-features }} --release
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
- name: Upload Artifacts
|
|
||||||
uses: actions/upload-artifact@master
|
|
||||||
with:
|
|
||||||
name: librustdesk-${{ matrix.job.arch }}-${{ matrix.job.extra-build-features }}.so
|
|
||||||
path: target/release/liblibrustdesk.so
|
|
||||||
|
|
||||||
build-rustdesk-lib-linux-arm:
|
|
||||||
needs: [generate-bridge-linux, build-vcpkg-deps-linux]
|
|
||||||
name: build-rust-lib ${{ matrix.job.target }} (${{ matrix.job.os }}) [${{ matrix.job.extra-build-features }}]
|
|
||||||
runs-on: ${{ matrix.job.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
matrix:
|
|
||||||
# use a high level qemu-user-static
|
|
||||||
job:
|
|
||||||
- {
|
|
||||||
arch: aarch64,
|
|
||||||
target: aarch64-unknown-linux-gnu,
|
|
||||||
os: ubuntu-20.04,
|
|
||||||
use-cross: true,
|
|
||||||
extra-build-features: "",
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
arch: aarch64,
|
|
||||||
target: aarch64-unknown-linux-gnu,
|
|
||||||
os: ubuntu-18.04, # just for naming package, not running host
|
|
||||||
use-cross: true,
|
|
||||||
extra-build-features: "appimage",
|
|
||||||
}
|
|
||||||
# - { arch: aarch64, target: aarch64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true, extra-build-features: "flatpak" }
|
|
||||||
# - {
|
|
||||||
# arch: armv7,
|
|
||||||
# target: arm-unknown-linux-gnueabihf,
|
|
||||||
# os: ubuntu-20.04,
|
|
||||||
# use-cross: true,
|
|
||||||
# extra-build-features: "",
|
|
||||||
# }
|
|
||||||
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true, extra-build-features: "flatpak" }
|
|
||||||
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
|
|
||||||
steps:
|
|
||||||
- name: Maximize build space
|
|
||||||
run: |
|
|
||||||
sudo rm -rf /opt/ghc
|
|
||||||
sudo rm -rf /usr/local/lib/android
|
|
||||||
sudo rm -rf /usr/share/dotnet
|
|
||||||
sudo apt update -y
|
|
||||||
sudo apt install qemu-user-static
|
|
||||||
|
|
||||||
- name: Checkout source code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set Swap Space
|
|
||||||
uses: pierotofy/set-swap-space@master
|
|
||||||
with:
|
|
||||||
swap-size-gb: 12
|
|
||||||
|
|
||||||
- name: Free Space
|
|
||||||
run: |
|
|
||||||
df
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
target: ${{ matrix.job.target }}
|
|
||||||
override: true
|
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
prefix-key: rustdesk-lib-cache
|
|
||||||
key: ${{ matrix.job.target }}-${{ matrix.job.extra-build-features }}
|
|
||||||
cache-directories: "/opt/rust-registry"
|
|
||||||
|
|
||||||
- name: Install local registry
|
|
||||||
run: |
|
|
||||||
mkdir -p /opt/rust-registry
|
|
||||||
cargo install cargo-local-registry
|
|
||||||
|
|
||||||
- name: Build local registry
|
|
||||||
uses: nick-fields/retry@v2
|
|
||||||
id: build-local-registry
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
max_attempts: 3
|
|
||||||
timeout_minutes: 15
|
|
||||||
retry_on: error
|
|
||||||
command: cargo local-registry --sync ./Cargo.lock /opt/rust-registry
|
|
||||||
|
|
||||||
- name: Disable rust bridge build
|
|
||||||
run: |
|
|
||||||
sed -i "s/gen_flutter_rust_bridge();/\/\//g" build.rs
|
|
||||||
# only build cdylib
|
|
||||||
sed -i "s/\[\"cdylib\", \"staticlib\", \"rlib\"\]/\[\"cdylib\"\]/g" Cargo.toml
|
|
||||||
|
|
||||||
- name: Restore bridge files
|
|
||||||
uses: actions/download-artifact@master
|
|
||||||
with:
|
|
||||||
name: bridge-artifact
|
|
||||||
path: ./
|
|
||||||
|
|
||||||
- name: Restore vcpkg files
|
|
||||||
uses: actions/download-artifact@master
|
|
||||||
with:
|
|
||||||
name: vcpkg-artifact-${{ matrix.job.arch }}
|
|
||||||
path: /opt/artifacts/vcpkg/installed
|
|
||||||
|
|
||||||
- uses: Kingtous/run-on-arch-action@amd64-support
|
|
||||||
name: Build rustdesk library for ${{ matrix.job.arch }}
|
|
||||||
id: vcpkg
|
|
||||||
with:
|
|
||||||
arch: ${{ matrix.job.arch }}
|
|
||||||
distro: ubuntu18.04-rustdesk
|
|
||||||
githubToken: ${{ github.token }}
|
|
||||||
setup: |
|
|
||||||
ls -l "${PWD}"
|
|
||||||
ls -l /opt/artifacts/vcpkg/installed
|
|
||||||
dockerRunArgs: |
|
|
||||||
--volume "${PWD}:/workspace"
|
|
||||||
--volume "/opt/artifacts:/opt/artifacts"
|
|
||||||
--volume "/opt/rust-registry:/opt/rust-registry"
|
|
||||||
shell: /bin/bash
|
|
||||||
install: |
|
|
||||||
apt update -y
|
|
||||||
echo -e "installing deps"
|
|
||||||
apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ gcc libvpx-dev tree > /dev/null
|
|
||||||
# we have libopus compiled by us.
|
|
||||||
apt remove -y libopus-dev || true
|
|
||||||
# output devs
|
|
||||||
ls -l ./
|
|
||||||
tree -L 3 /opt/artifacts/vcpkg/installed
|
|
||||||
run: |
|
|
||||||
# disable git safe.directory
|
|
||||||
git config --global --add safe.directory "*"
|
|
||||||
# rust
|
|
||||||
pushd /opt
|
|
||||||
wget -O rust.tar.gz https://static.rust-lang.org/dist/rust-1.64.0-${{ matrix.job.target }}.tar.gz
|
|
||||||
tar -zxvf rust.tar.gz > /dev/null && rm rust.tar.gz
|
|
||||||
cd rust-1.64.0-${{ matrix.job.target }} && ./install.sh
|
|
||||||
rm -rf rust-1.64.0-${{ matrix.job.target }}
|
|
||||||
# edit config
|
|
||||||
mkdir -p ~/.cargo/
|
|
||||||
echo """
|
|
||||||
[source.crates-io]
|
|
||||||
registry = 'https://github.com/rust-lang/crates.io-index'
|
|
||||||
replace-with = 'local-registry'
|
|
||||||
|
|
||||||
[source.local-registry]
|
|
||||||
local-registry = '/opt/rust-registry/'
|
|
||||||
""" > ~/.cargo/config
|
|
||||||
cat ~/.cargo/config
|
|
||||||
# start build
|
|
||||||
pushd /workspace
|
|
||||||
# mock
|
|
||||||
case "${{ matrix.job.arch }}" in
|
|
||||||
aarch64)
|
|
||||||
cp -r /opt/artifacts/vcpkg/installed/lib/* /usr/lib/aarch64-linux-gnu/
|
|
||||||
cp -r /opt/artifacts/vcpkg/installed/include/* /usr/include/
|
|
||||||
ls -l /opt/artifacts/vcpkg/installed/lib/
|
|
||||||
mkdir -p /vcpkg/installed/arm64-linux
|
|
||||||
ln -s /usr/lib/aarch64-linux-gnu /vcpkg/installed/arm64-linux/lib
|
|
||||||
ln -s /usr/include /vcpkg/installed/arm64-linux/include
|
|
||||||
export VCPKG_ROOT=/vcpkg
|
|
||||||
# disable hwcodec for compilation
|
|
||||||
cargo build --lib --features flutter,flutter_texture_render,${{ matrix.job.extra-build-features }} --release
|
|
||||||
;;
|
|
||||||
armv7)
|
|
||||||
cp -r /opt/artifacts/vcpkg/installed/lib/* /usr/lib/arm-linux-gnueabihf/
|
|
||||||
cp -r /opt/artifacts/vcpkg/installed/include/* /usr/include/
|
|
||||||
mkdir -p /vcpkg/installed/arm-linux
|
|
||||||
ln -s /usr/lib/arm-linux-gnueabihf /vcpkg/installed/arm-linux/lib
|
|
||||||
ln -s /usr/include /vcpkg/installed/arm-linux/include
|
|
||||||
export VCPKG_ROOT=/vcpkg
|
|
||||||
# disable hwcodec for compilation
|
|
||||||
cargo build --lib --features flutter,flutter_texture_render,${{ matrix.job.extra-build-features }} --release
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
- name: Upload Artifacts
|
|
||||||
uses: actions/upload-artifact@master
|
|
||||||
with:
|
|
||||||
name: librustdesk-${{ matrix.job.arch }}-${{ matrix.job.extra-build-features }}.so
|
|
||||||
path: target/release/liblibrustdesk.so
|
|
||||||
|
|
||||||
build-rustdesk-linux-arm:
|
|
||||||
needs: [build-rustdesk-lib-linux-arm]
|
|
||||||
name: build-rustdesk ${{ matrix.job.target }} (${{ matrix.job.os }}) [${{ matrix.job.extra-build-features }}]
|
|
||||||
runs-on: ubuntu-20.04 # 20.04 has more performance on arm build
|
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
matrix:
|
|
||||||
job:
|
|
||||||
- {
|
|
||||||
arch: aarch64,
|
|
||||||
target: aarch64-unknown-linux-gnu,
|
|
||||||
os: ubuntu-18.04, # just for naming package, not running host
|
|
||||||
use-cross: true,
|
|
||||||
extra-build-features: "",
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
arch: aarch64,
|
|
||||||
target: aarch64-unknown-linux-gnu,
|
|
||||||
os: ubuntu-18.04, # just for naming package, not running host
|
|
||||||
use-cross: true,
|
|
||||||
extra-build-features: "appimage",
|
|
||||||
}
|
|
||||||
# - {
|
|
||||||
# arch: aarch64,
|
|
||||||
# target: aarch64-unknown-linux-gnu,
|
|
||||||
# os: ubuntu-18.04, # just for naming package, not running host
|
|
||||||
# use-cross: true,
|
|
||||||
# extra-build-features: "flatpak",
|
|
||||||
# }
|
|
||||||
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true, extra-build-features: "" }
|
|
||||||
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true, extra-build-features: "flatpak" }
|
|
||||||
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
|
|
||||||
steps:
|
|
||||||
- name: Checkout source code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Restore bridge files
|
|
||||||
uses: actions/download-artifact@master
|
|
||||||
with:
|
|
||||||
name: bridge-artifact
|
|
||||||
path: ./
|
|
||||||
|
|
||||||
- name: Prepare env
|
|
||||||
run: |
|
|
||||||
sudo apt update -y
|
|
||||||
sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev libarchive-tools
|
|
||||||
mkdir -p ./target/release/
|
|
||||||
|
|
||||||
- name: Restore the rustdesk lib file
|
|
||||||
uses: actions/download-artifact@master
|
|
||||||
with:
|
|
||||||
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 3.7.0
|
|
||||||
git clone https://github.com/sony/flutter-elinux.git || true
|
|
||||||
pushd flutter-elinux
|
|
||||||
# reset to flutter 3.7.0
|
|
||||||
git fetch
|
|
||||||
git reset --hard 51a1d685901f79fbac51665a967c3a1a789ecee5
|
|
||||||
popd
|
|
||||||
|
|
||||||
- uses: Kingtous/run-on-arch-action@amd64-support
|
|
||||||
name: Build rustdesk binary for ${{ matrix.job.arch }}
|
|
||||||
id: vcpkg
|
|
||||||
with:
|
|
||||||
arch: ${{ matrix.job.arch }}
|
|
||||||
distro: ubuntu18.04-rustdesk
|
|
||||||
githubToken: ${{ github.token }}
|
|
||||||
setup: |
|
|
||||||
ls -l "${PWD}"
|
|
||||||
dockerRunArgs: |
|
|
||||||
--volume "${PWD}:/workspace"
|
|
||||||
--volume "/opt/artifacts:/opt/artifacts"
|
|
||||||
--volume "/opt/flutter-elinux:/opt/flutter-elinux"
|
|
||||||
shell: /bin/bash
|
|
||||||
install: |
|
|
||||||
apt update -y
|
|
||||||
apt-get -qq install -y git cmake g++ gcc build-essential nasm yasm curl unzip xz-utils python3 wget pkg-config ninja-build pkg-config libgtk-3-dev liblzma-dev clang libappindicator3-dev rpm
|
|
||||||
run: |
|
|
||||||
# disable git safe.directory
|
|
||||||
git config --global --add safe.directory "*"
|
|
||||||
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-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
|
|
||||||
case ${{ matrix.job.arch }} in
|
|
||||||
aarch64)
|
|
||||||
sed -i "s/Architecture: amd64/Architecture: arm64/g" ./build.py
|
|
||||||
sed -i "s/x64\/release/arm64\/release/g" ./build.py
|
|
||||||
;;
|
|
||||||
armv7)
|
|
||||||
sed -i "s/Architecture: amd64/Architecture: arm/g" ./build.py
|
|
||||||
sed -i "s/x64\/release/arm\/release/g" ./build.py
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
python3 ./build.py --flutter --hwcodec --skip-cargo
|
|
||||||
|
|
||||||
build-rustdesk-linux-amd64:
|
|
||||||
needs: [build-rustdesk-lib-linux-amd64]
|
|
||||||
name: build-rustdesk ${{ matrix.job.target }} (${{ matrix.job.os }}) [${{ matrix.job.extra-build-features }}]
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
matrix:
|
|
||||||
job:
|
|
||||||
# - { target: i686-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
|
|
||||||
# - { target: i686-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
|
||||||
- {
|
|
||||||
arch: x86_64,
|
|
||||||
target: x86_64-unknown-linux-gnu,
|
|
||||||
os: ubuntu-20.04,
|
|
||||||
extra-build-features: "",
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
arch: x86_64,
|
|
||||||
target: x86_64-unknown-linux-gnu,
|
|
||||||
os: ubuntu-20.04,
|
|
||||||
extra-build-features: "flatpak",
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
arch: x86_64,
|
|
||||||
target: x86_64-unknown-linux-gnu,
|
|
||||||
os: ubuntu-20.04,
|
|
||||||
extra-build-features: "appimage",
|
|
||||||
}
|
|
||||||
# - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
|
||||||
steps:
|
|
||||||
- name: Checkout source code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Restore bridge files
|
|
||||||
uses: actions/download-artifact@master
|
|
||||||
with:
|
|
||||||
name: bridge-artifact
|
|
||||||
path: ./
|
|
||||||
|
|
||||||
- name: Prepare env
|
|
||||||
run: |
|
|
||||||
sudo apt update -y
|
|
||||||
sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev libarchive-tools
|
|
||||||
mkdir -p ./target/release/
|
|
||||||
|
|
||||||
- name: Restore the rustdesk lib file
|
|
||||||
uses: actions/download-artifact@master
|
|
||||||
with:
|
|
||||||
name: librustdesk-${{ matrix.job.arch }}-${{ matrix.job.extra-build-features }}.so
|
|
||||||
path: ./target/release/
|
|
||||||
|
|
||||||
- uses: Kingtous/run-on-arch-action@amd64-support
|
|
||||||
name: Build rustdesk binary for ${{ matrix.job.arch }}
|
|
||||||
id: vcpkg
|
|
||||||
with:
|
|
||||||
arch: ${{ matrix.job.arch }}
|
|
||||||
distro: ubuntu18.04
|
|
||||||
githubToken: ${{ github.token }}
|
|
||||||
setup: |
|
|
||||||
ls -l "${PWD}"
|
|
||||||
dockerRunArgs: |
|
|
||||||
--volume "${PWD}:/workspace"
|
|
||||||
--volume "/opt/artifacts:/opt/artifacts"
|
|
||||||
shell: /bin/bash
|
|
||||||
install: |
|
|
||||||
apt update -y
|
|
||||||
apt-get -qq install -y git cmake g++ gcc build-essential nasm yasm curl unzip xz-utils python3 wget pkg-config ninja-build pkg-config libgtk-3-dev liblzma-dev clang libappindicator3-dev rpm
|
|
||||||
run: |
|
|
||||||
# disable git safe.directory
|
|
||||||
git config --global --add safe.directory "*"
|
|
||||||
# Setup Flutter
|
|
||||||
pushd /opt
|
|
||||||
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
|
|
||||||
python3 ./build.py --flutter --hwcodec --skip-cargo
|
|
||||||
|
41
.github/workflows/flutter-nightly.yml
vendored
41
.github/workflows/flutter-nightly.yml
vendored
@ -5,6 +5,16 @@ on:
|
|||||||
# schedule build every night
|
# schedule build every night
|
||||||
- cron: "0 0 * * *"
|
- cron: "0 0 * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
upload-artifact:
|
||||||
|
description: "Upload the artifact produced by this workflow to the Release page."
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
upload-artifact:
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
LLVM_VERSION: "15.0.6"
|
LLVM_VERSION: "15.0.6"
|
||||||
@ -21,6 +31,7 @@ env:
|
|||||||
# To make a custom build with your own servers set the below secret values
|
# To make a custom build with your own servers set the below secret values
|
||||||
RS_PUB_KEY: '${{ secrets.RS_PUB_KEY }}'
|
RS_PUB_KEY: '${{ secrets.RS_PUB_KEY }}'
|
||||||
RENDEZVOUS_SERVER: '${{ secrets.RENDEZVOUS_SERVER }}'
|
RENDEZVOUS_SERVER: '${{ secrets.RENDEZVOUS_SERVER }}'
|
||||||
|
UPLOAD_ARTIFACT: '${{ inputs.upload-artifact }}'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-for-windows-flutter:
|
build-for-windows-flutter:
|
||||||
@ -92,6 +103,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Sign rustdesk files
|
- name: Sign rustdesk files
|
||||||
uses: GermanBluefox/code-sign-action@v7
|
uses: GermanBluefox/code-sign-action@v7
|
||||||
|
if: env.UPLOAD_ARTIFACT == 'true'
|
||||||
with:
|
with:
|
||||||
certificate: '${{ secrets.WINDOWS_PFX_BASE64 }}'
|
certificate: '${{ secrets.WINDOWS_PFX_BASE64 }}'
|
||||||
password: '${{ secrets.WINDOWS_PFX_PASSWORD }}'
|
password: '${{ secrets.WINDOWS_PFX_PASSWORD }}'
|
||||||
@ -102,6 +114,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build self-extracted executable
|
- name: Build self-extracted executable
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: env.UPLOAD_ARTIFACT == 'true'
|
||||||
run: |
|
run: |
|
||||||
pushd ./libs/portable
|
pushd ./libs/portable
|
||||||
python3 ./generate.py -f ../../flutter/build/windows/runner/Release/ -o . -e ../../flutter/build/windows/runner/Release/rustdesk.exe
|
python3 ./generate.py -f ../../flutter/build/windows/runner/Release/ -o . -e ../../flutter/build/windows/runner/Release/rustdesk.exe
|
||||||
@ -118,6 +131,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Sign rustdesk self-extracted file
|
- name: Sign rustdesk self-extracted file
|
||||||
uses: GermanBluefox/code-sign-action@v7
|
uses: GermanBluefox/code-sign-action@v7
|
||||||
|
if: env.UPLOAD_ARTIFACT == 'true'
|
||||||
with:
|
with:
|
||||||
certificate: '${{ secrets.WINDOWS_PFX_BASE64 }}'
|
certificate: '${{ secrets.WINDOWS_PFX_BASE64 }}'
|
||||||
password: '${{ secrets.WINDOWS_PFX_PASSWORD }}'
|
password: '${{ secrets.WINDOWS_PFX_PASSWORD }}'
|
||||||
@ -128,6 +142,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Publish Release
|
- name: Publish Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: env.UPLOAD_ARTIFACT == 'true'
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
@ -188,6 +203,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Sign rustdesk files
|
- name: Sign rustdesk files
|
||||||
uses: GermanBluefox/code-sign-action@v7
|
uses: GermanBluefox/code-sign-action@v7
|
||||||
|
if: env.UPLOAD_ARTIFACT == 'true'
|
||||||
with:
|
with:
|
||||||
certificate: '${{ secrets.WINDOWS_PFX_BASE64 }}'
|
certificate: '${{ secrets.WINDOWS_PFX_BASE64 }}'
|
||||||
password: '${{ secrets.WINDOWS_PFX_PASSWORD }}'
|
password: '${{ secrets.WINDOWS_PFX_PASSWORD }}'
|
||||||
@ -217,6 +233,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Publish Release
|
- name: Publish Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: env.UPLOAD_ARTIFACT == 'true'
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
@ -351,6 +368,7 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
- name: Publish DMG package
|
- name: Publish DMG package
|
||||||
|
if: env.UPLOAD_ARTIFACT == 'true'
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
@ -500,14 +518,14 @@ jobs:
|
|||||||
BUILD_TOOLS_VERSION: "30.0.2"
|
BUILD_TOOLS_VERSION: "30.0.2"
|
||||||
|
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
if: env.ANDROID_SIGNING_KEY != null
|
if: env.ANDROID_SIGNING_KEY != null && env.UPLOAD_ARTIFACT == 'true'
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-release-signed.apk
|
name: rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-release-signed.apk
|
||||||
path: ${{steps.sign-rustdesk.outputs.signedReleaseFile}}
|
path: ${{steps.sign-rustdesk.outputs.signedReleaseFile}}
|
||||||
|
|
||||||
- name: Publish signed apk package
|
- name: Publish signed apk package
|
||||||
if: env.ANDROID_SIGNING_KEY != null
|
if: env.ANDROID_SIGNING_KEY != null && env.UPLOAD_ARTIFACT == 'true'
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
@ -516,7 +534,7 @@ jobs:
|
|||||||
${{steps.sign-rustdesk.outputs.signedReleaseFile}}
|
${{steps.sign-rustdesk.outputs.signedReleaseFile}}
|
||||||
|
|
||||||
- name: Publish unsigned apk package
|
- name: Publish unsigned apk package
|
||||||
if: env.ANDROID_SIGNING_KEY == null
|
if: env.ANDROID_SIGNING_KEY == null && env.UPLOAD_ARTIFACT == 'true'
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
@ -978,7 +996,7 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
- name: Publish debian package
|
- name: Publish debian package
|
||||||
if: ${{ matrix.job.extra-build-features == '' }}
|
if: ${{ matrix.job.extra-build-features == '' }} && env.UPLOAD_ARTIFACT == 'true'
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
@ -1151,7 +1169,7 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
- name: Publish debian package
|
- name: Publish debian package
|
||||||
if: ${{ matrix.job.extra-build-features == '' }}
|
if: ${{ matrix.job.extra-build-features == '' }} && env.UPLOAD_ARTIFACT == 'true'
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
@ -1174,7 +1192,7 @@ jobs:
|
|||||||
sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-${{ matrix.job.arch }}.yml
|
sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-${{ matrix.job.arch }}.yml
|
||||||
|
|
||||||
- name: Publish appimage package
|
- name: Publish appimage package
|
||||||
if: ${{ matrix.job.extra-build-features == 'appimage' }}
|
if: ${{ matrix.job.extra-build-features == 'appimage' }} && env.UPLOAD_ARTIFACT == 'true'
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
@ -1248,7 +1266,7 @@ jobs:
|
|||||||
# res/rustdesk*.zst
|
# res/rustdesk*.zst
|
||||||
|
|
||||||
- name: Publish fedora28/centos8 package
|
- name: Publish fedora28/centos8 package
|
||||||
if: ${{ matrix.job.extra-build-features == '' }}
|
if: ${{ matrix.job.extra-build-features == '' }} && env.UPLOAD_ARTIFACT == 'true'
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
@ -1371,7 +1389,7 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
- name: Publish debian package
|
- name: Publish debian package
|
||||||
if: ${{ matrix.job.extra-build-features == '' }}
|
if: ${{ matrix.job.extra-build-features == '' }} && env.UPLOAD_ARTIFACT == 'true'
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
@ -1427,7 +1445,7 @@ jobs:
|
|||||||
cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f
|
cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f
|
||||||
|
|
||||||
- name: Publish archlinux package
|
- name: Publish archlinux package
|
||||||
if: ${{ matrix.job.extra-build-features == '' }}
|
if: ${{ matrix.job.extra-build-features == '' }} && env.UPLOAD_ARTIFACT == 'true'
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
@ -1450,7 +1468,7 @@ jobs:
|
|||||||
sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-x86_64.yml
|
sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-x86_64.yml
|
||||||
|
|
||||||
- name: Publish appimage package
|
- name: Publish appimage package
|
||||||
if: ${{ matrix.job.extra-build-features == 'appimage' }}
|
if: ${{ matrix.job.extra-build-features == 'appimage' }} && env.UPLOAD_ARTIFACT == 'true'
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
@ -1459,7 +1477,7 @@ jobs:
|
|||||||
./appimage/rustdesk-${{ env.VERSION }}-*.AppImage
|
./appimage/rustdesk-${{ env.VERSION }}-*.AppImage
|
||||||
|
|
||||||
- name: Publish fedora28/centos8 package
|
- name: Publish fedora28/centos8 package
|
||||||
if: ${{ matrix.job.extra-build-features == '' }}
|
if: ${{ matrix.job.extra-build-features == '' }} && env.UPLOAD_ARTIFACT == 'true'
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
@ -1588,6 +1606,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Publish flatpak package
|
- name: Publish flatpak package
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: env.UPLOAD_ARTIFACT == 'true'
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user