2022-10-20 17:16:15 +08:00
|
|
|
name: Flutter Nightly Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
2022-10-21 08:39:37 +08:00
|
|
|
# schedule build every night
|
|
|
|
- cron: "0 0 * * *"
|
2022-10-20 17:16:15 +08:00
|
|
|
workflow_dispatch:
|
|
|
|
|
2022-10-21 08:51:20 +08:00
|
|
|
env:
|
|
|
|
LLVM_VERSION: "10.0"
|
2022-11-25 10:27:34 +08:00
|
|
|
# Note: currently 3.0.5 does not support arm64 officially, we use latest stable version first.
|
2022-10-21 08:51:20 +08:00
|
|
|
FLUTTER_VERSION: "3.0.5"
|
|
|
|
TAG_NAME: "nightly"
|
2022-11-21 17:10:38 +08:00
|
|
|
# vcpkg version: 2022.05.10
|
|
|
|
# for multiarch gcc compatibility
|
|
|
|
VCPKG_COMMIT_ID: "14e7bb4ae24616ec54ff6b2f6ef4e8659434ea44"
|
2022-11-08 11:16:48 +08:00
|
|
|
VERSION: "1.2.0"
|
2023-01-18 17:34:53 +08:00
|
|
|
# To make a custom build with your own servers set the below secret values
|
2023-01-18 17:35:35 +08:00
|
|
|
RS_PUB_KEY: '${{ secrets.RS_PUB_KEY }}'
|
2023-01-18 17:36:05 +08:00
|
|
|
RENDEZVOUS_SERVER: '${{ secrets.RENDEZVOUS_SERVER }}'
|
2022-10-21 08:51:20 +08:00
|
|
|
|
2022-10-20 17:16:15 +08:00
|
|
|
jobs:
|
2022-10-20 21:11:23 +08:00
|
|
|
build-for-windows:
|
2022-11-19 10:57:17 +08:00
|
|
|
name: ${{ matrix.job.target }} (${{ matrix.job.os }})
|
2022-10-20 21:11:23 +08:00
|
|
|
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 }
|
2022-11-21 17:10:38 +08:00
|
|
|
- { target: x86_64-pc-windows-msvc, os: windows-2019 }
|
2022-10-20 21:11:23 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout source code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install LLVM and Clang
|
|
|
|
uses: KyleMayes/install-llvm-action@v1
|
|
|
|
with:
|
2022-10-21 08:51:20 +08:00
|
|
|
version: ${{ env.LLVM_VERSION }}
|
2022-10-20 21:11:23 +08:00
|
|
|
|
|
|
|
- name: Install flutter
|
|
|
|
uses: subosito/flutter-action@v2
|
|
|
|
with:
|
2022-11-21 17:10:38 +08:00
|
|
|
channel: "stable"
|
2022-10-21 08:51:20 +08:00
|
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
2022-12-04 15:47:06 +08:00
|
|
|
cache: true
|
2022-11-21 17:10:38 +08:00
|
|
|
|
2022-11-10 12:19:44 +08:00
|
|
|
- name: Replace engine with rustdesk custom flutter engine
|
|
|
|
run: |
|
|
|
|
flutter doctor -v
|
2022-11-10 12:29:50 +08:00
|
|
|
flutter precache --windows
|
2022-12-11 23:23:26 +08:00
|
|
|
Invoke-WebRequest -Uri https://github.com/Kingtous/engine/releases/download/v3.0.5-rustdesk.2/windows-x64-flutter-release.zip -OutFile windows-x64-flutter-release.zip
|
|
|
|
Expand-Archive windows-x64-flutter-release.zip -DestinationPath engine
|
2022-11-10 12:29:50 +08:00
|
|
|
mv -Force engine/* C:/hostedtoolcache/windows/flutter/stable-3.0.5-x64/bin/cache/artifacts/engine/windows-x64-release/
|
2022-10-20 21:11:23 +08:00
|
|
|
|
|
|
|
- name: Install Rust toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2022-11-04 20:27:16 +08:00
|
|
|
toolchain: "1.62"
|
2022-10-20 21:11:23 +08:00
|
|
|
target: ${{ matrix.job.target }}
|
|
|
|
override: true
|
2022-11-04 20:51:13 +08:00
|
|
|
components: rustfmt
|
2022-10-20 21:11:23 +08:00
|
|
|
profile: minimal # minimal component installation (ie, no documentation)
|
|
|
|
|
2022-10-21 08:51:20 +08:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
with:
|
|
|
|
prefix-key: ${{ matrix.job.os }}
|
2022-10-20 21:11:23 +08:00
|
|
|
|
|
|
|
- name: Install flutter rust bridge deps
|
|
|
|
run: |
|
|
|
|
dart pub global activate ffigen --version 5.0.1
|
|
|
|
$exists = Test-Path ~/.cargo/bin/flutter_rust_bridge_codegen.exe
|
2022-10-21 08:39:37 +08:00
|
|
|
Push-Location ..
|
|
|
|
git clone https://github.com/SoLongAndThanksForAllThePizza/flutter_rust_bridge --depth=1
|
|
|
|
Push-Location flutter_rust_bridge/frb_codegen ; cargo install --path . ; Pop-Location
|
|
|
|
Pop-Location
|
2022-10-20 21:11:23 +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
|
|
|
|
|
|
|
|
- name: Restore from cache and install vcpkg
|
|
|
|
uses: lukka/run-vcpkg@v7
|
|
|
|
with:
|
|
|
|
setupOnly: true
|
2022-10-21 08:51:20 +08:00
|
|
|
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
|
2022-10-20 21:11:23 +08:00
|
|
|
|
|
|
|
- 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
|
2022-11-19 10:57:17 +08:00
|
|
|
run: python3 .\build.py --portable --hwcodec --flutter
|
2022-10-21 08:51:20 +08:00
|
|
|
|
2022-12-04 15:38:16 +08:00
|
|
|
- name: Sign rustdesk files
|
2022-12-04 17:28:26 +08:00
|
|
|
uses: GermanBluefox/code-sign-action@v7
|
2022-12-04 15:38:16 +08:00
|
|
|
with:
|
|
|
|
certificate: '${{ secrets.WINDOWS_PFX_BASE64 }}'
|
|
|
|
password: '${{ secrets.WINDOWS_PFX_PASSWORD }}'
|
|
|
|
certificatesha1: '${{ secrets.WINDOWS_PFX_SHA1_THUMBPRINT }}'
|
|
|
|
# certificatename: '${{ secrets.CERTNAME }}'
|
|
|
|
folder: './flutter/build/windows/runner/Release/'
|
|
|
|
recursive: true
|
|
|
|
|
|
|
|
- name: Build self-extracted executable
|
2022-10-21 08:51:20 +08:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2022-12-04 15:38:16 +08:00
|
|
|
pushd ./libs/portable
|
2022-12-04 17:28:26 +08:00
|
|
|
python3 ./generate.py -f ../../flutter/build/windows/runner/Release/ -o . -e ../../flutter/build/windows/runner/Release/rustdesk.exe
|
2022-12-04 15:38:16 +08:00
|
|
|
popd
|
|
|
|
mkdir -p ./SignOutput
|
|
|
|
mv ./target/release/rustdesk-portable-packer.exe ./SignOutput/rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}.exe
|
|
|
|
|
|
|
|
# - name: Rename rustdesk
|
|
|
|
# shell: bash
|
|
|
|
# run: |
|
|
|
|
# for name in rustdesk*??-install.exe; do
|
|
|
|
# mv "$name" ./SignOutput/"${name%%-install.exe}-${{ matrix.job.target }}.exe"
|
|
|
|
# done
|
|
|
|
|
|
|
|
- name: Sign rustdesk self-extracted file
|
2022-12-04 17:28:26 +08:00
|
|
|
uses: GermanBluefox/code-sign-action@v7
|
2022-12-04 15:38:16 +08:00
|
|
|
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
|
2022-10-20 21:11:23 +08:00
|
|
|
|
|
|
|
- name: Publish Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
prerelease: true
|
2022-10-21 08:51:20 +08:00
|
|
|
tag_name: ${{ env.TAG_NAME }}
|
2022-10-20 21:11:23 +08:00
|
|
|
files: |
|
2022-12-04 15:38:16 +08:00
|
|
|
./SignOutput/rustdesk-*.exe
|
2022-10-20 21:11:23 +08:00
|
|
|
|
2022-11-21 17:10:38 +08:00
|
|
|
build-for-macOS:
|
2022-11-22 19:48:26 +08:00
|
|
|
name: ${{ matrix.job.target }} (${{ matrix.job.os }}) [${{ matrix.job.extra-build-args }}]
|
2022-11-20 16:40:59 +08:00
|
|
|
runs-on: ${{ matrix.job.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
job:
|
2022-11-21 17:10:38 +08:00
|
|
|
- {
|
|
|
|
target: x86_64-apple-darwin,
|
2023-01-06 10:23:46 +08:00
|
|
|
os: macos-latest,
|
2022-11-21 17:10:38 +08:00
|
|
|
extra-build-args: "",
|
|
|
|
}
|
2022-11-20 16:40:59 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout source code
|
|
|
|
uses: actions/checkout@v3
|
2022-11-21 17:10:38 +08:00
|
|
|
|
2022-12-29 21:17:30 +08:00
|
|
|
- name: Import the codesign cert
|
2023-01-19 10:18:02 +08:00
|
|
|
if: ${{ secrets.MACOS_P12_BASE64== 'true' }}
|
2022-12-29 21:17:30 +08:00
|
|
|
uses: apple-actions/import-codesign-certs@v1
|
|
|
|
with:
|
|
|
|
p12-file-base64: ${{ secrets.MACOS_P12_BASE64 }}
|
|
|
|
p12-password: ${{ secrets.MACOS_P12_PASSWORD }}
|
2022-12-29 22:18:02 +08:00
|
|
|
keychain: rustdesk
|
|
|
|
|
2023-01-05 22:05:24 +08:00
|
|
|
- name: Check sign and import sign key
|
2023-01-19 10:18:02 +08:00
|
|
|
if: ${{ secrets.MACOS_P12_BASE64== 'true' }}
|
2022-12-29 22:18:02 +08:00
|
|
|
run: |
|
|
|
|
security default-keychain -s rustdesk.keychain
|
|
|
|
security find-identity -v
|
2022-12-29 21:17:30 +08:00
|
|
|
|
2023-01-05 22:05:24 +08:00
|
|
|
- name: Import notarize key
|
2023-01-19 10:18:02 +08:00
|
|
|
if: ${{ secrets.MACOS_P12_BASE64== 'true' }}
|
2023-01-05 22:05:24 +08:00
|
|
|
uses: timheuer/base64-to-file@v1.2
|
|
|
|
with:
|
2023-01-06 11:55:48 +08:00
|
|
|
# https://gregoryszorc.com/docs/apple-codesign/stable/apple_codesign_rcodesign.html#notarizing-and-stapling
|
2023-01-05 22:05:24 +08:00
|
|
|
fileName: rustdesk.json
|
|
|
|
fileDir: ${{ github.workspace }}
|
|
|
|
encodedString: ${{ secrets.MACOS_NOTARIZE_JSON }}
|
|
|
|
|
|
|
|
- name: Install rcodesign tool
|
2023-01-19 10:18:02 +08:00
|
|
|
if: ${{ secrets.MACOS_P12_BASE64== 'true' }}
|
2023-01-05 22:05:24 +08:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
pushd /tmp
|
|
|
|
wget https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.22.0/apple-codesign-0.22.0-macos-universal.tar.gz
|
|
|
|
tar -zxvf apple-codesign-0.22.0-macos-universal.tar.gz
|
|
|
|
mv apple-codesign-0.22.0-macos-universal/rcodesign /usr/local/bin
|
|
|
|
popd
|
|
|
|
|
2022-11-20 16:40:59 +08:00
|
|
|
- name: Install build runtime
|
|
|
|
run: |
|
2022-11-20 16:54:54 +08:00
|
|
|
brew install llvm create-dmg nasm yasm cmake gcc wget ninja
|
2022-11-20 16:40:59 +08:00
|
|
|
|
|
|
|
- name: Install flutter
|
|
|
|
uses: subosito/flutter-action@v2
|
|
|
|
with:
|
2022-11-21 17:10:38 +08:00
|
|
|
channel: "stable"
|
2022-11-20 16:40:59 +08:00
|
|
|
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: |
|
|
|
|
dart pub global activate ffigen --version 5.0.1
|
|
|
|
# flutter_rust_bridge
|
2023-01-06 10:40:04 +08:00
|
|
|
pushd /tmp
|
|
|
|
wget https://github.com/Kingtous/flutter_rust_bridge/releases/download/1.32.0-rustdesk/flutter_rust_bridge_codegen-x86_64-darwin.tgz
|
|
|
|
tar -zxvf flutter_rust_bridge_codegen-x86_64-darwin.tgz
|
|
|
|
mkdir -p ~/.cargo/bin
|
|
|
|
mv flutter_rust_bridge_codegen ~/.cargo/bin; chmod +x ~/.cargo/bin/flutter_rust_bridge_codegen
|
|
|
|
popd
|
2022-11-20 16:40:59 +08:00
|
|
|
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
|
2022-11-21 17:10:38 +08:00
|
|
|
|
2022-11-20 16:40:59 +08:00
|
|
|
- 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
|
2022-11-20 16:54:54 +08:00
|
|
|
run: |
|
|
|
|
# --hwcodec not supported on macos yet
|
|
|
|
./build.py --flutter ${{ matrix.job.extra-build-args }}
|
|
|
|
|
2022-12-29 22:18:02 +08:00
|
|
|
- name: Codesign app and create signed dmg
|
2023-01-19 10:18:02 +08:00
|
|
|
if: ${{ secrets.MACOS_P12_BASE64== 'true' }}
|
2022-12-29 22:18:02 +08:00
|
|
|
run: |
|
|
|
|
security default-keychain -s rustdesk.keychain
|
|
|
|
security unlock-keychain -p ${{ secrets.MACOS_P12_PASSWORD }} rustdesk.keychain
|
|
|
|
# start sign the rustdesk.app and dmg
|
|
|
|
rm rustdesk-${{ env.VERSION }}.dmg || true
|
2023-01-14 14:43:33 +08:00
|
|
|
mv ./flutter/build/macos/Build/Products/Release/rustdesk.app ./flutter/build/macos/Build/Products/Release/RustDesk.app
|
|
|
|
codesign --force --options runtime -s ${{ secrets.MACOS_CODESIGN_IDENTITY }} --deep ./flutter/build/macos/Build/Products/Release/RustDesk.app -v
|
|
|
|
create-dmg --icon "RustDesk.app" 200 190 --hide-extension "RustDesk.app" --window-size 800 400 --app-drop-link 600 185 rustdesk-${{ env.VERSION }}.dmg ./flutter/build/macos/Build/Products/Release/RustDesk.app
|
2023-01-06 11:14:54 +08:00
|
|
|
codesign --force --options runtime -s ${{ secrets.MACOS_CODESIGN_IDENTITY }} --deep rustdesk-${{ env.VERSION }}.dmg -v
|
2023-01-05 22:05:24 +08:00
|
|
|
# notarize the rustdesk-${{ env.VERSION }}.dmg
|
|
|
|
rcodesign notary-submit --api-key-path ${{ github.workspace }}/rustdesk.json --staple rustdesk-${{ env.VERSION }}.dmg
|
2022-12-29 22:18:02 +08:00
|
|
|
|
2022-11-20 16:54:54 +08:00
|
|
|
- name: Rename rustdesk
|
|
|
|
run: |
|
|
|
|
for name in rustdesk*??.dmg; do
|
2023-01-10 17:30:21 +08:00
|
|
|
mv "$name" "${name%%.dmg}-${{ matrix.job.target }}.dmg"
|
2022-11-20 16:54:54 +08:00
|
|
|
done
|
|
|
|
|
|
|
|
- name: Publish DMG package
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
prerelease: true
|
|
|
|
tag_name: ${{ env.TAG_NAME }}
|
|
|
|
files: |
|
|
|
|
rustdesk*-${{ matrix.job.target }}.dmg
|
2022-11-20 16:40:59 +08:00
|
|
|
|
2022-11-21 17:10:38 +08:00
|
|
|
build-vcpkg-deps-linux:
|
2022-10-20 17:16:15 +08:00
|
|
|
runs-on: ${{ matrix.job.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
job:
|
2022-11-25 10:27:34 +08:00
|
|
|
# - { arch: armv7, os: ubuntu-20.04 }
|
|
|
|
- { arch: x86_64, os: ubuntu-20.04 }
|
|
|
|
- { arch: aarch64, os: ubuntu-20.04 }
|
2022-10-20 17:16:15 +08:00
|
|
|
steps:
|
2022-11-21 17:10:38 +08:00
|
|
|
- name: Create vcpkg artifacts folder
|
|
|
|
run: mkdir -p /opt/artifacts
|
|
|
|
|
|
|
|
- name: Cache Vcpkg
|
|
|
|
id: cache-vcpkg
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: /opt/artifacts
|
|
|
|
key: vcpkg-${{ matrix.job.arch }}
|
2022-10-20 17:16:15 +08:00
|
|
|
|
2022-11-21 17:10:38 +08:00
|
|
|
- uses: Kingtous/run-on-arch-action@amd64-support
|
|
|
|
name: Run vcpkg install on ${{ matrix.job.arch }}
|
|
|
|
id: vcpkg
|
|
|
|
with:
|
|
|
|
arch: ${{ matrix.job.arch }}
|
|
|
|
distro: ubuntu18.04
|
|
|
|
githubToken: ${{ github.token }}
|
|
|
|
setup: |
|
|
|
|
ls -l "/opt/artifacts"
|
|
|
|
dockerRunArgs: |
|
|
|
|
--volume "/opt/artifacts:/artifacts"
|
|
|
|
shell: /bin/bash
|
|
|
|
install: |
|
|
|
|
apt update -y
|
2022-11-23 23:18:03 +08:00
|
|
|
case "${{ matrix.job.arch }}" in
|
2022-11-23 21:31:37 +08:00
|
|
|
x86_64)
|
|
|
|
# CMake 3.15+
|
|
|
|
apt install -y gpg wget ca-certificates
|
|
|
|
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
|
|
|
|
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
|
|
|
|
apt update -y
|
2022-11-23 23:18:03 +08:00
|
|
|
apt install -y curl zip unzip tar git cmake g++ gcc build-essential pkg-config wget nasm yasm ninja-build libjpeg8-dev
|
2022-11-23 21:31:37 +08:00
|
|
|
;;
|
|
|
|
aarch64|armv7)
|
2022-11-25 10:27:34 +08:00
|
|
|
apt install -y curl zip unzip tar git cmake g++ gcc build-essential pkg-config wget nasm yasm ninja-build libjpeg8-dev automake libtool
|
2022-11-23 21:31:37 +08:00
|
|
|
esac
|
2022-11-21 17:10:38 +08:00
|
|
|
cmake --version
|
|
|
|
gcc -v
|
|
|
|
run: |
|
2022-11-26 09:23:47 +08:00
|
|
|
# disable git safe.directory
|
|
|
|
git config --global --add safe.directory "*"
|
2022-11-23 23:18:03 +08:00
|
|
|
case "${{ matrix.job.arch }}" in
|
2022-11-23 21:31:37 +08:00
|
|
|
x86_64)
|
|
|
|
export VCPKG_FORCE_SYSTEM_BINARIES=1
|
|
|
|
pushd /artifacts
|
|
|
|
git clone https://github.com/microsoft/vcpkg.git || true
|
|
|
|
pushd vcpkg
|
|
|
|
git reset --hard ${{ env.VCPKG_COMMIT_ID }}
|
|
|
|
./bootstrap-vcpkg.sh
|
|
|
|
./vcpkg install libvpx libyuv opus
|
|
|
|
;;
|
|
|
|
aarch64|armv7)
|
2022-11-25 10:27:34 +08:00
|
|
|
pushd /artifacts
|
|
|
|
# libyuv
|
2022-11-23 23:18:03 +08:00
|
|
|
git clone https://chromium.googlesource.com/libyuv/libyuv || true
|
2022-11-23 21:31:37 +08:00
|
|
|
pushd libyuv
|
2022-11-23 23:18:03 +08:00
|
|
|
git pull
|
2022-11-25 10:27:34 +08:00
|
|
|
mkdir -p build
|
2022-11-23 21:31:37 +08:00
|
|
|
pushd build
|
2022-11-23 23:18:03 +08:00
|
|
|
mkdir -p /artifacts/vcpkg/installed
|
|
|
|
cmake .. -DCMAKE_INSTALL_PREFIX=/artifacts/vcpkg/installed
|
2022-11-23 21:31:37 +08:00
|
|
|
make -j4 && make install
|
2022-11-25 10:27:34 +08:00
|
|
|
popd
|
|
|
|
popd
|
|
|
|
# libopus, ubuntu 18.04 prebuilt is not be compiled with -fPIC
|
|
|
|
wget -O opus.tar.gz http://archive.ubuntu.com/ubuntu/pool/main/o/opus/opus_1.1.2.orig.tar.gz
|
|
|
|
tar -zxvf opus.tar.gz; ls -l
|
|
|
|
pushd opus-1.1.2
|
|
|
|
./autogen.sh; ./configure --prefix=/artifacts/vcpkg/installed
|
|
|
|
make -j4; make install
|
2022-11-23 21:31:37 +08:00
|
|
|
;;
|
|
|
|
esac
|
2022-11-21 17:10:38 +08:00
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@master
|
2022-11-17 10:58:23 +08:00
|
|
|
with:
|
2022-11-21 17:10:38 +08:00
|
|
|
name: vcpkg-artifact-${{ matrix.job.arch }}
|
|
|
|
path: |
|
|
|
|
/opt/artifacts/vcpkg/installed
|
|
|
|
|
|
|
|
generate-bridge-linux:
|
|
|
|
name: generate bridge
|
|
|
|
runs-on: ${{ matrix.job.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
job:
|
|
|
|
- {
|
|
|
|
target: x86_64-unknown-linux-gnu,
|
|
|
|
os: ubuntu-18.04,
|
|
|
|
extra-build-args: "",
|
|
|
|
}
|
|
|
|
steps:
|
|
|
|
- name: Checkout source code
|
|
|
|
uses: actions/checkout@v3
|
2022-11-17 10:58:23 +08:00
|
|
|
|
2022-10-20 17:16:15 +08:00
|
|
|
- name: Install prerequisites
|
|
|
|
run: |
|
2022-11-21 17:10:38 +08:00
|
|
|
sudo apt update -y
|
2022-11-28 20:20:45 +08:00
|
|
|
sudo apt install -y g++ gcc git curl wget nasm yasm libgtk-3-dev clang cmake libclang-dev ninja-build llvm-dev libclang-10-dev llvm-10-dev pkg-config
|
2022-10-20 17:16:15 +08:00
|
|
|
|
|
|
|
- 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)
|
|
|
|
|
2022-10-21 08:51:20 +08:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
with:
|
2022-11-21 17:10:38 +08:00
|
|
|
prefix-key: bridge-${{ matrix.job.os }}
|
2022-11-28 20:20:45 +08:00
|
|
|
workspace: "/tmp/flutter_rust_bridge/frb_codegen"
|
2022-11-21 17:10:38 +08:00
|
|
|
|
|
|
|
- name: Cache Bridge
|
|
|
|
id: cache-bridge
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: /tmp/flutter_rust_bridge
|
|
|
|
key: vcpkg-${{ matrix.job.arch }}
|
|
|
|
|
|
|
|
- name: Install flutter
|
|
|
|
uses: subosito/flutter-action@v2
|
|
|
|
with:
|
|
|
|
channel: "stable"
|
|
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
2022-11-28 20:20:45 +08:00
|
|
|
cache: true
|
2022-11-21 17:10:38 +08:00
|
|
|
|
|
|
|
- name: Install ffigen
|
|
|
|
run: |
|
|
|
|
dart pub global activate ffigen --version 5.0.1
|
2022-10-20 17:16:15 +08:00
|
|
|
|
2022-10-20 21:11:23 +08:00
|
|
|
- name: Install flutter rust bridge deps
|
|
|
|
shell: bash
|
2022-10-20 17:16:15 +08:00
|
|
|
run: |
|
2022-11-21 17:10:38 +08:00
|
|
|
pushd /tmp && git clone https://github.com/SoLongAndThanksForAllThePizza/flutter_rust_bridge --depth=1 || true && popd
|
2022-10-21 08:39:37 +08:00
|
|
|
pushd /tmp/flutter_rust_bridge/frb_codegen && cargo install --path . && popd
|
2022-10-20 17:16:15 +08:00
|
|
|
pushd flutter && flutter pub get && popd
|
2022-11-21 17:10:38 +08:00
|
|
|
|
|
|
|
- name: Run flutter rust bridge
|
|
|
|
run: |
|
2022-10-20 17:16:15 +08:00
|
|
|
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart
|
|
|
|
|
2022-12-26 01:21:13 +08:00
|
|
|
- name: Upload Artifact
|
2022-11-21 17:10:38 +08:00
|
|
|
uses: actions/upload-artifact@master
|
2022-10-20 17:16:15 +08:00
|
|
|
with:
|
2022-11-21 17:10:38 +08:00
|
|
|
name: bridge-artifact
|
|
|
|
path: |
|
|
|
|
./src/bridge_generated.rs
|
|
|
|
./flutter/lib/generated_bridge.dart
|
|
|
|
./flutter/lib/generated_bridge.freezed.dart
|
|
|
|
|
2022-11-28 18:54:35 +08:00
|
|
|
build-rustdesk-android-arm64:
|
|
|
|
needs: [generate-bridge-linux]
|
2022-11-28 20:20:45 +08:00
|
|
|
name: build rustdesk android apk ${{ matrix.job.target }} (${{ matrix.job.os }}) [${{ matrix.job.extra-build-features }}]
|
2022-11-28 18:54:35 +08:00
|
|
|
runs-on: ${{ matrix.job.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
job:
|
|
|
|
- {
|
|
|
|
arch: x86_64,
|
|
|
|
target: aarch64-linux-android,
|
|
|
|
os: ubuntu-18.04,
|
|
|
|
extra-build-features: "",
|
|
|
|
}
|
2022-11-28 20:20:45 +08:00
|
|
|
# - {
|
|
|
|
# arch: x86_64,
|
|
|
|
# target: armv7-linux-androideabi,
|
|
|
|
# os: ubuntu-18.04,
|
|
|
|
# extra-build-features: "",
|
|
|
|
# }
|
2022-11-28 18:54:35 +08:00
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
2022-11-28 20:20:45 +08:00
|
|
|
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
|
2022-11-28 18:54:35 +08:00
|
|
|
- name: Checkout source code
|
|
|
|
uses: actions/checkout@v3
|
2022-11-28 20:20:45 +08:00
|
|
|
- name: Install flutter
|
|
|
|
uses: subosito/flutter-action@v2
|
|
|
|
with:
|
|
|
|
channel: "stable"
|
|
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
2022-11-28 18:54:35 +08:00
|
|
|
- uses: nttld/setup-ndk@v1
|
|
|
|
id: setup-ndk
|
|
|
|
with:
|
|
|
|
ndk-version: r22b
|
|
|
|
add-to-path: true
|
|
|
|
|
|
|
|
- name: Download deps
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
pushd /opt
|
|
|
|
wget https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/dep.tar.gz
|
|
|
|
tar xzf dep.tar.gz
|
|
|
|
|
|
|
|
- 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
|
2022-11-28 20:20:45 +08:00
|
|
|
|
|
|
|
- name: Build rustdesk lib
|
2022-11-28 19:56:59 +08:00
|
|
|
env:
|
|
|
|
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
|
|
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
|
|
VCPKG_ROOT: /opt/vcpkg
|
2022-11-28 18:54:35 +08:00
|
|
|
run: |
|
2022-11-28 20:20:45 +08:00
|
|
|
rustup target add ${{ matrix.job.target }}
|
2022-11-28 18:54:35 +08:00
|
|
|
cargo install cargo-ndk
|
2022-11-28 20:20:45 +08:00
|
|
|
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
|
2022-11-28 18:54:35 +08:00
|
|
|
|
|
|
|
- name: Build rustdesk
|
|
|
|
shell: bash
|
2022-11-28 20:20:45 +08:00
|
|
|
env:
|
|
|
|
JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64
|
2022-11-28 18:54:35 +08:00
|
|
|
run: |
|
2022-11-28 20:20:45 +08:00
|
|
|
export PATH=/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH
|
|
|
|
# download so
|
2022-11-28 18:54:35 +08:00
|
|
|
pushd flutter
|
2022-11-28 20:20:45 +08:00
|
|
|
wget -O so.tar.gz https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/so.tar.gz
|
|
|
|
tar xzvf so.tar.gz
|
|
|
|
popd
|
|
|
|
# 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 ./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 ./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
|
2022-11-29 10:46:02 +08:00
|
|
|
popd
|
|
|
|
mkdir -p signed-apk; pushd signed-apk
|
|
|
|
mv ../rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-release.apk .
|
|
|
|
|
|
|
|
- uses: r0adkll/sign-android-release@v1
|
|
|
|
name: Sign app APK
|
2023-01-19 10:18:02 +08:00
|
|
|
if: ${{ secrets.ANDROID_SIGNING_KEY== 'true' }}
|
2022-11-29 10:46:02 +08:00
|
|
|
id: sign-rustdesk
|
|
|
|
with:
|
|
|
|
releaseDirectory: ./signed-apk
|
2022-11-29 11:24:37 +08:00
|
|
|
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
|
|
|
|
alias: ${{ secrets.ANDROID_ALIAS }}
|
|
|
|
keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }}
|
|
|
|
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}
|
2022-11-29 10:46:02 +08:00
|
|
|
env:
|
|
|
|
# override default build-tools version (29.0.3) -- optional
|
|
|
|
BUILD_TOOLS_VERSION: "30.0.2"
|
2022-11-28 18:54:35 +08:00
|
|
|
|
|
|
|
- name: Upload Artifacts
|
2023-01-19 10:18:02 +08:00
|
|
|
if: ${{ secrets.ANDROID_SIGNING_KEY== 'true' }}
|
2022-11-28 18:54:35 +08:00
|
|
|
uses: actions/upload-artifact@master
|
|
|
|
with:
|
2022-11-29 10:46:02 +08:00
|
|
|
name: rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-release-signed.apk
|
|
|
|
path: ${{steps.sign-rustdesk.outputs.signedReleaseFile}}
|
2022-11-28 20:20:45 +08:00
|
|
|
|
2023-01-18 17:34:53 +08:00
|
|
|
- name: Publish signed apk package
|
2023-01-19 10:18:02 +08:00
|
|
|
if: ${{ secrets.ANDROID_SIGNING_KEY== 'true' }}
|
2022-11-28 18:54:35 +08:00
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
prerelease: true
|
|
|
|
tag_name: ${{ env.TAG_NAME }}
|
|
|
|
files: |
|
2022-11-29 10:46:02 +08:00
|
|
|
${{steps.sign-rustdesk.outputs.signedReleaseFile}}
|
2022-11-28 18:54:35 +08:00
|
|
|
|
2023-01-18 17:34:53 +08:00
|
|
|
- name: Publish unsigned apk package
|
2023-01-19 10:18:02 +08:00
|
|
|
if: ${{ secrets.ANDROID_SIGNING_KEY!= 'true' }}
|
2023-01-18 17:34:53 +08:00
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
prerelease: true
|
|
|
|
tag_name: ${{ env.TAG_NAME }}
|
|
|
|
files: |
|
|
|
|
../rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-release.apk
|
|
|
|
|
2022-11-25 10:27:34 +08:00
|
|
|
build-rustdesk-lib-linux-amd64:
|
2022-11-21 17:10:38 +08:00
|
|
|
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: false
|
|
|
|
matrix:
|
2022-11-25 10:27:34 +08:00
|
|
|
# use a high level qemu-user-static
|
2022-11-21 17:10:38 +08:00
|
|
|
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,
|
2022-11-25 10:27:34 +08:00
|
|
|
os: ubuntu-20.04,
|
2022-11-21 17:10:38 +08:00
|
|
|
extra-build-features: "",
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
arch: x86_64,
|
|
|
|
target: x86_64-unknown-linux-gnu,
|
2022-11-25 10:27:34 +08:00
|
|
|
os: ubuntu-20.04,
|
2022-11-21 17:10:38 +08:00
|
|
|
extra-build-features: "flatpak",
|
|
|
|
}
|
2023-01-08 10:27:00 +08:00
|
|
|
- {
|
|
|
|
arch: x86_64,
|
|
|
|
target: x86_64-unknown-linux-gnu,
|
|
|
|
os: ubuntu-20.04,
|
|
|
|
extra-build-features: "appimage",
|
|
|
|
}
|
2022-11-21 17:10:38 +08:00
|
|
|
# - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
|
|
|
steps:
|
2022-11-25 10:27:34 +08:00
|
|
|
- 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
|
|
|
|
|
2022-11-21 17:10:38 +08:00
|
|
|
- name: Checkout source code
|
|
|
|
uses: actions/checkout@v3
|
2022-10-20 17:16:15 +08:00
|
|
|
|
2022-11-25 10:27:34 +08:00
|
|
|
- name: Set Swap Space
|
|
|
|
uses: pierotofy/set-swap-space@master
|
|
|
|
with:
|
|
|
|
swap-size-gb: 12
|
2022-11-21 17:10:38 +08:00
|
|
|
|
2022-11-25 10:27:34 +08:00
|
|
|
- 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 Rust toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
target: ${{ matrix.job.target }}
|
|
|
|
override: true
|
|
|
|
profile: minimal # minimal component installation (ie, no documentation)
|
|
|
|
|
|
|
|
- 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
|
2022-11-21 17:10:38 +08:00
|
|
|
|
|
|
|
- name: Disable rust bridge build
|
|
|
|
run: |
|
|
|
|
sed -i "s/gen_flutter_rust_bridge();/\/\//g" build.rs
|
2022-11-25 10:27:34 +08:00
|
|
|
# only build cdylib
|
|
|
|
sed -i "s/\[\"cdylib\", \"staticlib\", \"rlib\"\]/\[\"cdylib\"\]/g" Cargo.toml
|
2022-11-21 17:10:38 +08:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|
2022-11-23 23:18:03 +08:00
|
|
|
- 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
|
2022-11-25 10:27:34 +08:00
|
|
|
# not ready yet
|
|
|
|
# distro: ubuntu18.04-rustdesk
|
2022-11-23 23:18:03 +08:00
|
|
|
githubToken: ${{ github.token }}
|
|
|
|
setup: |
|
|
|
|
ls -l "${PWD}"
|
2022-11-25 10:27:34 +08:00
|
|
|
ls -l /opt/artifacts/vcpkg/installed
|
2022-11-23 23:18:03 +08:00
|
|
|
dockerRunArgs: |
|
|
|
|
--volume "${PWD}:/workspace"
|
|
|
|
--volume "/opt/artifacts:/opt/artifacts"
|
2022-11-25 10:27:34 +08:00
|
|
|
--volume "/opt/rust-registry:/opt/rust-registry"
|
2022-11-23 23:18:03 +08:00
|
|
|
shell: /bin/bash
|
|
|
|
install: |
|
|
|
|
apt update -y
|
2022-11-25 10:27:34 +08:00
|
|
|
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
|
2022-11-23 23:18:03 +08:00
|
|
|
# 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
|
2022-11-25 10:27:34 +08:00
|
|
|
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
|
2022-11-23 23:18:03 +08:00
|
|
|
pushd /workspace
|
|
|
|
# mock
|
|
|
|
case "${{ matrix.job.arch }}" in
|
|
|
|
x86_64)
|
|
|
|
# no need mock on x86_64
|
|
|
|
export VCPKG_ROOT=/opt/artifacts/vcpkg
|
2022-11-25 10:27:34 +08:00
|
|
|
cargo build --lib --features hwcodec,flutter,${{ matrix.job.extra-build-features }} --release
|
2022-11-23 23:18:03 +08:00
|
|
|
;;
|
2022-11-25 10:27:34 +08:00
|
|
|
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: false
|
|
|
|
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: "",
|
|
|
|
}
|
2023-01-08 17:42:18 +08:00
|
|
|
- {
|
|
|
|
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",
|
|
|
|
}
|
2022-11-25 21:16:03 +08:00
|
|
|
# - { arch: aarch64, target: aarch64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true, extra-build-features: "flatpak" }
|
2022-11-25 10:27:34 +08:00
|
|
|
# - {
|
|
|
|
# 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)
|
|
|
|
|
|
|
|
- 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
|
2022-11-23 23:18:03 +08:00
|
|
|
aarch64)
|
2022-11-25 10:27:34 +08:00
|
|
|
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/
|
2022-11-23 23:18:03 +08:00
|
|
|
mkdir -p /vcpkg/installed/arm64-linux
|
2022-11-25 10:27:34 +08:00
|
|
|
ln -s /usr/lib/aarch64-linux-gnu /vcpkg/installed/arm64-linux/lib
|
2022-11-23 23:18:03 +08:00
|
|
|
ln -s /usr/include /vcpkg/installed/arm64-linux/include
|
|
|
|
export VCPKG_ROOT=/vcpkg
|
2022-11-25 10:27:34 +08:00
|
|
|
# disable hwcodec for compilation
|
|
|
|
cargo build --lib --features flutter,${{ matrix.job.extra-build-features }} --release
|
2022-11-23 23:18:03 +08:00
|
|
|
;;
|
|
|
|
armv7)
|
2022-11-25 10:27:34 +08:00
|
|
|
cp -r /opt/artifacts/vcpkg/installed/lib/* /usr/lib/arm-linux-gnueabihf/
|
|
|
|
cp -r /opt/artifacts/vcpkg/installed/include/* /usr/include/
|
2022-11-23 23:18:03 +08:00
|
|
|
mkdir -p /vcpkg/installed/arm-linux
|
2022-11-25 10:27:34 +08:00
|
|
|
ln -s /usr/lib/arm-linux-gnueabihf /vcpkg/installed/arm-linux/lib
|
2022-11-23 23:18:03 +08:00
|
|
|
ln -s /usr/include /vcpkg/installed/arm-linux/include
|
|
|
|
export VCPKG_ROOT=/vcpkg
|
2022-11-25 10:27:34 +08:00
|
|
|
# disable hwcodec for compilation
|
|
|
|
cargo build --lib --features flutter,${{ matrix.job.extra-build-features }} --release
|
2022-11-23 23:18:03 +08:00
|
|
|
;;
|
|
|
|
esac
|
2022-10-20 17:16:15 +08:00
|
|
|
|
2022-11-21 17:10:38 +08:00
|
|
|
- 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
|
|
|
|
|
2022-11-25 10:27:34 +08:00
|
|
|
build-rustdesk-linux-arm:
|
|
|
|
needs: [build-rustdesk-lib-linux-arm]
|
|
|
|
name: build-rustdesk ${{ matrix.job.target }} (${{ matrix.job.os }}) [${{ matrix.job.extra-build-features }}]
|
2022-11-25 20:55:15 +08:00
|
|
|
runs-on: ubuntu-20.04 # 20.04 has more performance on arm build
|
2022-11-21 17:10:38 +08:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
job:
|
2022-11-25 10:27:34 +08:00
|
|
|
- {
|
|
|
|
arch: aarch64,
|
|
|
|
target: aarch64-unknown-linux-gnu,
|
2022-11-25 20:55:15 +08:00
|
|
|
os: ubuntu-18.04, # just for naming package, not running host
|
2022-11-25 10:27:34 +08:00
|
|
|
use-cross: true,
|
|
|
|
extra-build-features: "",
|
|
|
|
}
|
2023-01-08 17:42:18 +08:00
|
|
|
- {
|
|
|
|
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",
|
|
|
|
}
|
2022-11-25 21:16:03 +08:00
|
|
|
# - {
|
|
|
|
# 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",
|
|
|
|
# }
|
2022-11-25 10:27:34 +08:00
|
|
|
# - { 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" }
|
2022-11-21 17:10:38 +08:00
|
|
|
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
|
2022-11-25 10:27:34 +08:00
|
|
|
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
|
2023-01-09 10:38:43 +08:00
|
|
|
sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev libarchive-tools
|
2022-11-25 10:27:34 +08:00
|
|
|
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: |
|
2022-11-27 00:53:43 +08:00
|
|
|
# disable git safe.directory
|
|
|
|
git config --global --add safe.directory "*"
|
2022-11-25 10:27:34 +08:00
|
|
|
pushd /opt
|
2022-11-27 00:53:43 +08:00
|
|
|
# clone repo and reset to flutter 3.0.5
|
|
|
|
git clone https://github.com/sony/flutter-elinux.git || true
|
|
|
|
pushd flutter-elinux
|
|
|
|
# reset to flutter 3.0.5
|
|
|
|
git fetch
|
|
|
|
git reset --hard b09a90eee643859ce4e676839227edd9fd3feba8
|
|
|
|
popd
|
2022-11-25 10:27:34 +08:00
|
|
|
|
|
|
|
- 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"
|
2022-11-27 00:53:43 +08:00
|
|
|
--volume "/opt/flutter-elinux:/opt/flutter-elinux"
|
2022-11-25 10:27:34 +08:00
|
|
|
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
|
2022-11-27 00:53:43 +08:00
|
|
|
# we use flutter-elinux to build our rustdesk
|
|
|
|
sed -i "s/flutter build linux --release/flutter-elinux build linux/g" ./build.py
|
|
|
|
# Setup flutter-elinux
|
|
|
|
export PATH=/opt/flutter-elinux/bin:$PATH
|
|
|
|
flutter-elinux doctor -v
|
|
|
|
# edit to corresponding arch
|
2022-11-25 10:27:34 +08:00
|
|
|
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
|
|
|
|
# rpm package
|
|
|
|
echo -e "start packaging"
|
|
|
|
pushd /workspace
|
|
|
|
case ${{ matrix.job.arch }} in
|
|
|
|
armv7)
|
|
|
|
sed -i "s/64bit/32bit/g" ./res/rpm-flutter.spec
|
|
|
|
sed -i "s/linux\/x64/linux\/arm/g" ./res/rpm-flutter.spec
|
|
|
|
;;
|
|
|
|
aarch64)
|
|
|
|
sed -i "s/linux\/x64/linux\/arm64/g" ./res/rpm-flutter.spec
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
HBB=`pwd` rpmbuild ./res/rpm-flutter.spec -bb
|
|
|
|
pushd ~/rpmbuild/RPMS/${{ matrix.job.arch }}
|
|
|
|
mkdir -p /opt/artifacts/rpm
|
|
|
|
for name in rustdesk*??.rpm; do
|
|
|
|
mv "$name" "/opt/artifacts/rpm/${name%%.rpm}-fedora28-centos8.rpm"
|
|
|
|
done
|
|
|
|
|
|
|
|
- name: Rename rustdesk
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
for name in rustdesk*??.deb; do
|
2023-01-08 17:42:18 +08:00
|
|
|
cp "$name" "${name%%.deb}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb"
|
2022-11-25 10:27:34 +08:00
|
|
|
done
|
|
|
|
|
|
|
|
- name: Publish debian package
|
2022-11-28 19:56:59 +08:00
|
|
|
if: ${{ matrix.job.extra-build-features == '' }}
|
2022-11-25 10:27:34 +08:00
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
prerelease: true
|
|
|
|
tag_name: ${{ env.TAG_NAME }}
|
|
|
|
files: |
|
|
|
|
rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
2023-01-08 17:42:18 +08:00
|
|
|
|
|
|
|
- name: Build appimage package
|
|
|
|
if: ${{ matrix.job.extra-build-features == 'appimage' }}
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
# set-up appimage-builder
|
|
|
|
pushd /tmp
|
|
|
|
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
|
|
|
|
chmod +x appimage-builder-x86_64.AppImage
|
|
|
|
sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder
|
|
|
|
popd
|
|
|
|
# run appimage-builder
|
|
|
|
pushd appimage
|
|
|
|
sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-${{ matrix.job.arch }}.yml
|
|
|
|
|
|
|
|
- name: Publish appimage package
|
|
|
|
if: ${{ matrix.job.extra-build-features == 'appimage' }}
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
prerelease: true
|
|
|
|
tag_name: ${{ env.TAG_NAME }}
|
|
|
|
files: |
|
|
|
|
./appimage/rustdesk-${{ env.VERSION }}-*.AppImage
|
2022-11-25 10:27:34 +08:00
|
|
|
|
2022-12-26 01:21:13 +08:00
|
|
|
- name: Upload Artifact
|
2022-11-25 10:27:34 +08:00
|
|
|
uses: actions/upload-artifact@master
|
|
|
|
if: ${{ contains(matrix.job.extra-build-features, 'flatpak') }}
|
|
|
|
with:
|
|
|
|
name: rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
|
|
|
path: rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
|
|
|
|
|
|
|
- name: Patch archlinux PKGBUILD
|
|
|
|
if: ${{ matrix.job.extra-build-features == '' }}
|
|
|
|
run: |
|
|
|
|
sed -i "s/arch=('x86_64')/arch=('${{ matrix.job.arch }}')/g" res/PKGBUILD
|
|
|
|
case ${{ matrix.job.arch }} in
|
|
|
|
armv7)
|
|
|
|
sed -i "s/linux\/x64/linux\/arm/g" ./res/PKGBUILD
|
|
|
|
;;
|
|
|
|
aarch64)
|
|
|
|
sed -i "s/linux\/x64/linux\/arm64/g" ./res/PKGBUILD
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Temporary disable for there is no many archlinux arm hosts
|
|
|
|
# - name: Build archlinux package
|
|
|
|
# if: ${{ matrix.job.extra-build-features == '' }}
|
|
|
|
# uses: vufa/arch-makepkg-action@master
|
|
|
|
# with:
|
|
|
|
# packages: >
|
|
|
|
# llvm
|
|
|
|
# clang
|
|
|
|
# libva
|
|
|
|
# libvdpau
|
|
|
|
# rust
|
|
|
|
# gstreamer
|
|
|
|
# unzip
|
|
|
|
# git
|
|
|
|
# cmake
|
|
|
|
# gcc
|
|
|
|
# curl
|
|
|
|
# wget
|
|
|
|
# yasm
|
|
|
|
# nasm
|
|
|
|
# zip
|
|
|
|
# make
|
|
|
|
# pkg-config
|
|
|
|
# clang
|
|
|
|
# gtk3
|
|
|
|
# xdotool
|
|
|
|
# libxcb
|
|
|
|
# libxfixes
|
|
|
|
# alsa-lib
|
|
|
|
# pipewire
|
|
|
|
# python
|
|
|
|
# ttf-arphic-uming
|
|
|
|
# libappindicator-gtk3
|
|
|
|
# scripts: |
|
|
|
|
# cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f
|
|
|
|
|
|
|
|
# - name: Publish archlinux package
|
|
|
|
# if: ${{ matrix.job.extra-build-features == '' }}
|
|
|
|
# uses: softprops/action-gh-release@v1
|
|
|
|
# with:
|
|
|
|
# prerelease: true
|
|
|
|
# tag_name: ${{ env.TAG_NAME }}
|
|
|
|
# files: |
|
|
|
|
# res/rustdesk*.zst
|
|
|
|
|
|
|
|
- name: Publish fedora28/centos8 package
|
|
|
|
if: ${{ matrix.job.extra-build-features == '' }}
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
prerelease: true
|
|
|
|
tag_name: ${{ env.TAG_NAME }}
|
|
|
|
files: |
|
|
|
|
/opt/artifacts/rpm/*.rpm
|
|
|
|
|
|
|
|
build-rustdesk-linux-amd64:
|
|
|
|
needs: [build-rustdesk-lib-linux-amd64]
|
|
|
|
name: build-rustdesk ${{ matrix.job.target }} (${{ matrix.job.os }}) [${{ matrix.job.extra-build-features }}]
|
2022-11-25 20:55:15 +08:00
|
|
|
runs-on: ubuntu-20.04
|
2022-11-25 10:27:34 +08:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
job:
|
2022-11-21 17:10:38 +08:00
|
|
|
# - { 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,
|
2022-11-25 20:55:15 +08:00
|
|
|
os: ubuntu-18.04,
|
2022-11-21 17:10:38 +08:00
|
|
|
extra-build-features: "",
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
arch: x86_64,
|
|
|
|
target: x86_64-unknown-linux-gnu,
|
2022-11-25 20:55:15 +08:00
|
|
|
os: ubuntu-18.04,
|
2022-11-21 17:10:38 +08:00
|
|
|
extra-build-features: "flatpak",
|
|
|
|
}
|
2023-01-08 10:27:00 +08:00
|
|
|
- {
|
|
|
|
arch: x86_64,
|
|
|
|
target: x86_64-unknown-linux-gnu,
|
|
|
|
os: ubuntu-18.04,
|
|
|
|
extra-build-features: "appimage",
|
|
|
|
}
|
2022-11-21 17:10:38 +08:00
|
|
|
# - { 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
|
2022-10-20 17:16:15 +08:00
|
|
|
run: |
|
2022-11-21 17:10:38 +08:00
|
|
|
sudo apt update -y
|
2023-01-08 00:22:15 +08:00
|
|
|
sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev libarchive-tools
|
2022-11-21 17:10:38 +08:00
|
|
|
mkdir -p ./target/release/
|
2022-10-20 17:16:15 +08:00
|
|
|
|
2022-11-22 20:27:20 +08:00
|
|
|
- name: Restore the rustdesk lib file
|
2022-11-21 17:10:38 +08:00
|
|
|
uses: actions/download-artifact@master
|
|
|
|
with:
|
|
|
|
name: librustdesk-${{ matrix.job.arch }}-${{ matrix.job.extra-build-features }}.so
|
2022-11-22 20:27:20 +08:00
|
|
|
path: ./target/release/
|
|
|
|
|
2022-11-21 17:10:38 +08:00
|
|
|
- uses: Kingtous/run-on-arch-action@amd64-support
|
2022-11-22 19:48:26 +08:00
|
|
|
name: Build rustdesk binary for ${{ matrix.job.arch }}
|
2022-11-21 17:10:38 +08:00
|
|
|
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
|
2022-11-25 10:27:34 +08:00
|
|
|
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
|
2022-11-21 17:10:38 +08:00
|
|
|
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
|
2022-11-25 10:27:34 +08:00
|
|
|
# rpm package
|
|
|
|
pushd /workspace
|
|
|
|
case ${{ matrix.job.arch }} in
|
|
|
|
armv7)
|
|
|
|
sed -i "s/64bit/32bit/g" ./res/rpm-flutter.spec
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
HBB=`pwd` rpmbuild ./res/rpm-flutter.spec -bb
|
|
|
|
pushd ~/rpmbuild/RPMS/${{ matrix.job.arch }}
|
|
|
|
mkdir -p /opt/artifacts/rpm
|
|
|
|
for name in rustdesk*??.rpm; do
|
|
|
|
mv "$name" "/opt/artifacts/rpm/${name%%.rpm}-fedora28-centos8.rpm"
|
|
|
|
done
|
2022-10-20 17:16:15 +08:00
|
|
|
|
2022-10-21 08:51:20 +08:00
|
|
|
- name: Rename rustdesk
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
for name in rustdesk*??.deb; do
|
2023-01-08 00:22:15 +08:00
|
|
|
# use cp to duplicate deb files to fit other packages.
|
|
|
|
cp "$name" "${name%%.deb}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb"
|
2022-10-21 08:51:20 +08:00
|
|
|
done
|
|
|
|
|
2022-10-22 12:41:37 +08:00
|
|
|
- name: Publish debian package
|
2023-01-05 16:26:37 +08:00
|
|
|
if: ${{ matrix.job.extra-build-features == '' }}
|
2022-10-20 21:11:23 +08:00
|
|
|
uses: softprops/action-gh-release@v1
|
2022-10-20 17:16:15 +08:00
|
|
|
with:
|
|
|
|
prerelease: true
|
2022-10-21 08:51:20 +08:00
|
|
|
tag_name: ${{ env.TAG_NAME }}
|
2022-10-20 17:16:15 +08:00
|
|
|
files: |
|
2022-11-08 16:52:45 +08:00
|
|
|
rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
2022-11-21 17:10:38 +08:00
|
|
|
|
2022-12-26 01:21:13 +08:00
|
|
|
- name: Upload Artifact
|
2022-11-08 14:55:04 +08:00
|
|
|
uses: actions/upload-artifact@master
|
2022-11-21 17:10:38 +08:00
|
|
|
if: ${{ contains(matrix.job.extra-build-features, 'flatpak') }}
|
2022-11-08 14:55:04 +08:00
|
|
|
with:
|
2022-11-08 16:52:45 +08:00
|
|
|
name: rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
|
|
|
path: rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
2022-10-20 17:16:15 +08:00
|
|
|
|
2022-11-20 16:54:54 +08:00
|
|
|
- name: Patch archlinux PKGBUILD
|
2022-11-21 17:10:38 +08:00
|
|
|
if: ${{ matrix.job.extra-build-features == '' }}
|
2022-11-20 16:54:54 +08:00
|
|
|
run: |
|
2022-11-21 17:10:38 +08:00
|
|
|
sed -i "s/arch=('x86_64')/arch=('${{ matrix.job.arch }}')/g" res/PKGBUILD
|
2022-11-20 16:54:54 +08:00
|
|
|
|
2022-10-22 12:41:37 +08:00
|
|
|
- name: Build archlinux package
|
2022-11-21 17:10:38 +08:00
|
|
|
if: ${{ matrix.job.extra-build-features == '' }}
|
2022-10-22 12:41:37 +08:00
|
|
|
uses: vufa/arch-makepkg-action@master
|
|
|
|
with:
|
|
|
|
packages: >
|
|
|
|
llvm
|
|
|
|
clang
|
|
|
|
libva
|
|
|
|
libvdpau
|
|
|
|
rust
|
|
|
|
gstreamer
|
|
|
|
unzip
|
|
|
|
git
|
|
|
|
cmake
|
|
|
|
gcc
|
|
|
|
curl
|
|
|
|
wget
|
|
|
|
yasm
|
|
|
|
nasm
|
|
|
|
zip
|
|
|
|
make
|
|
|
|
pkg-config
|
|
|
|
clang
|
|
|
|
gtk3
|
|
|
|
xdotool
|
|
|
|
libxcb
|
|
|
|
libxfixes
|
|
|
|
alsa-lib
|
|
|
|
pipewire
|
|
|
|
python
|
|
|
|
ttf-arphic-uming
|
|
|
|
libappindicator-gtk3
|
|
|
|
scripts: |
|
|
|
|
cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f
|
|
|
|
|
|
|
|
- name: Publish archlinux package
|
2022-11-21 17:10:38 +08:00
|
|
|
if: ${{ matrix.job.extra-build-features == '' }}
|
2022-10-22 12:41:37 +08:00
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
prerelease: true
|
|
|
|
tag_name: ${{ env.TAG_NAME }}
|
|
|
|
files: |
|
|
|
|
res/rustdesk*.zst
|
2022-11-08 11:16:48 +08:00
|
|
|
|
2023-01-08 00:22:15 +08:00
|
|
|
- name: Build appimage package
|
2023-01-08 10:27:00 +08:00
|
|
|
if: ${{ matrix.job.extra-build-features == 'appimage' }}
|
2023-01-08 00:22:15 +08:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
# set-up appimage-builder
|
2023-01-08 08:23:06 +08:00
|
|
|
pushd /tmp
|
2023-01-08 00:22:15 +08:00
|
|
|
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
|
|
|
|
chmod +x appimage-builder-x86_64.AppImage
|
|
|
|
sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder
|
2023-01-08 08:23:06 +08:00
|
|
|
popd
|
2023-01-08 00:22:15 +08:00
|
|
|
# run appimage-builder
|
|
|
|
pushd appimage
|
2023-01-08 17:42:18 +08:00
|
|
|
sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-x86_64.yml
|
2023-01-08 00:22:15 +08:00
|
|
|
|
|
|
|
- name: Publish appimage package
|
2023-01-08 10:27:00 +08:00
|
|
|
if: ${{ matrix.job.extra-build-features == 'appimage' }}
|
2023-01-08 00:22:15 +08:00
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
prerelease: true
|
|
|
|
tag_name: ${{ env.TAG_NAME }}
|
|
|
|
files: |
|
|
|
|
./appimage/rustdesk-${{ env.VERSION }}-*.AppImage
|
|
|
|
|
2022-11-17 10:58:23 +08:00
|
|
|
- name: Publish fedora28/centos8 package
|
2022-11-21 17:10:38 +08:00
|
|
|
if: ${{ matrix.job.extra-build-features == '' }}
|
2022-11-17 10:58:23 +08:00
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
prerelease: true
|
|
|
|
tag_name: ${{ env.TAG_NAME }}
|
|
|
|
files: |
|
2022-11-23 23:18:03 +08:00
|
|
|
/opt/artifacts/rpm/*.rpm
|
2022-11-08 16:52:45 +08:00
|
|
|
|
2022-11-25 10:27:34 +08:00
|
|
|
# Temporary disable flatpak arm build
|
|
|
|
#
|
|
|
|
# build-flatpak-arm:
|
|
|
|
# name: Build Flatpak
|
|
|
|
# needs: [build-rustdesk-linux-arm]
|
|
|
|
# runs-on: ${{ matrix.job.os }}
|
|
|
|
# strategy:
|
|
|
|
# fail-fast: false
|
|
|
|
# matrix:
|
|
|
|
# job:
|
|
|
|
# # - { target: aarch64-unknown-linux-gnu , os: ubuntu-18.04, arch: arm64 }
|
|
|
|
# - { target: aarch64-unknown-linux-gnu, os: ubuntu-20.04, arch: arm64 }
|
|
|
|
# steps:
|
|
|
|
# - name: Checkout source code
|
|
|
|
# uses: actions/checkout@v3
|
|
|
|
|
|
|
|
# - name: Download Binary
|
|
|
|
# uses: actions/download-artifact@master
|
|
|
|
# with:
|
|
|
|
# name: rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
|
|
|
# path: .
|
|
|
|
|
|
|
|
# - name: Rename Binary
|
|
|
|
# run: |
|
|
|
|
# mv rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb rustdesk-${{ env.VERSION }}.deb
|
|
|
|
|
|
|
|
# - uses: Kingtous/run-on-arch-action@amd64-support
|
|
|
|
# name: Build rustdesk flatpak package for ${{ matrix.job.arch }}
|
|
|
|
# id: rpm
|
|
|
|
# with:
|
|
|
|
# arch: ${{ matrix.job.arch }}
|
|
|
|
# distro: ubuntu18.04
|
|
|
|
# githubToken: ${{ github.token }}
|
|
|
|
# setup: |
|
|
|
|
# ls -l "${PWD}"
|
|
|
|
# dockerRunArgs: |
|
|
|
|
# --volume "${PWD}:/workspace"
|
|
|
|
# shell: /bin/bash
|
|
|
|
# install: |
|
|
|
|
# apt update -y
|
|
|
|
# apt install -y rpm
|
|
|
|
# run: |
|
|
|
|
# pushd /workspace
|
2022-11-28 20:20:45 +08:00
|
|
|
# # install
|
2022-11-25 10:27:34 +08:00
|
|
|
# apt update -y
|
|
|
|
# apt install -y flatpak flatpak-builder cmake g++ gcc git curl wget nasm yasm libgtk-3-dev git
|
|
|
|
# # flatpak deps
|
|
|
|
# flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
|
|
|
# flatpak --user install -y flathub org.freedesktop.Platform/${{ matrix.job.arch }}/21.08
|
|
|
|
# flatpak --user install -y flathub org.freedesktop.Sdk/${{ matrix.job.arch }}/21.08
|
|
|
|
# # package
|
|
|
|
# pushd flatpak
|
|
|
|
# git clone https://github.com/flathub/shared-modules.git --depth=1
|
|
|
|
# flatpak-builder --user --force-clean --repo=repo ./build ./rustdesk.json
|
|
|
|
# flatpak build-bundle ./repo rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}.flatpak org.rustdesk.rustdesk
|
|
|
|
|
|
|
|
# - name: Publish flatpak package
|
|
|
|
# uses: softprops/action-gh-release@v1
|
|
|
|
# with:
|
|
|
|
# prerelease: true
|
|
|
|
# tag_name: ${{ env.TAG_NAME }}
|
|
|
|
# files: |
|
|
|
|
# flatpak/rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}.flatpak
|
|
|
|
|
|
|
|
build-flatpak-amd64:
|
2022-11-08 14:55:04 +08:00
|
|
|
name: Build Flatpak
|
2022-11-25 10:27:34 +08:00
|
|
|
needs: [build-rustdesk-linux-amd64]
|
2022-11-25 22:10:32 +08:00
|
|
|
runs-on: ubuntu-20.04
|
2022-11-08 11:16:48 +08:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
job:
|
2022-11-25 22:10:32 +08:00
|
|
|
- { target: x86_64-unknown-linux-gnu, os: ubuntu-18.04, arch: x86_64 }
|
2022-11-08 11:16:48 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout source code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Download Binary
|
2022-11-08 14:55:04 +08:00
|
|
|
uses: actions/download-artifact@master
|
|
|
|
with:
|
2022-11-08 16:52:45 +08:00
|
|
|
name: rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb
|
2022-11-08 14:55:04 +08:00
|
|
|
path: .
|
2022-11-21 17:10:38 +08:00
|
|
|
|
|
|
|
- name: Rename Binary
|
2022-11-08 11:16:48 +08:00
|
|
|
run: |
|
2022-11-08 16:52:45 +08:00
|
|
|
mv rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}-${{ matrix.job.os }}.deb rustdesk-${{ env.VERSION }}.deb
|
2022-11-21 17:10:38 +08:00
|
|
|
|
2022-11-25 10:27:34 +08:00
|
|
|
- uses: Kingtous/run-on-arch-action@amd64-support
|
|
|
|
name: Build rustdesk flatpak package for ${{ matrix.job.arch }}
|
|
|
|
id: rpm
|
|
|
|
with:
|
|
|
|
arch: ${{ matrix.job.arch }}
|
|
|
|
distro: ubuntu18.04
|
|
|
|
githubToken: ${{ github.token }}
|
|
|
|
setup: |
|
|
|
|
ls -l "${PWD}"
|
|
|
|
dockerRunArgs: |
|
|
|
|
--volume "${PWD}:/workspace"
|
|
|
|
shell: /bin/bash
|
|
|
|
install: |
|
|
|
|
apt update -y
|
2022-11-26 18:26:01 +08:00
|
|
|
apt install -y rpm git wget curl
|
2022-11-25 10:27:34 +08:00
|
|
|
run: |
|
2022-11-26 09:23:47 +08:00
|
|
|
# disable git safe.directory
|
|
|
|
git config --global --add safe.directory "*"
|
2022-11-25 10:27:34 +08:00
|
|
|
pushd /workspace
|
|
|
|
# install
|
|
|
|
apt update -y
|
|
|
|
apt install -y flatpak flatpak-builder cmake g++ gcc git curl wget nasm yasm libgtk-3-dev git
|
|
|
|
# flatpak deps
|
|
|
|
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
|
|
|
flatpak --user install -y flathub org.freedesktop.Platform/${{ matrix.job.arch }}/21.08
|
|
|
|
flatpak --user install -y flathub org.freedesktop.Sdk/${{ matrix.job.arch }}/21.08
|
|
|
|
# package
|
|
|
|
pushd flatpak
|
|
|
|
git clone https://github.com/flathub/shared-modules.git --depth=1
|
|
|
|
flatpak-builder --user --force-clean --repo=repo ./build ./rustdesk.json
|
|
|
|
flatpak build-bundle ./repo rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}.flatpak org.rustdesk.rustdesk
|
2022-11-08 11:16:48 +08:00
|
|
|
|
|
|
|
- name: Publish flatpak package
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
prerelease: true
|
|
|
|
tag_name: ${{ env.TAG_NAME }}
|
|
|
|
files: |
|
|
|
|
flatpak/rustdesk-${{ env.VERSION }}-${{ matrix.job.target }}.flatpak
|