Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into sctgdesk
Browse files Browse the repository at this point in the history
  • Loading branch information
aeltorio committed Jul 3, 2024
2 parents 46f825c + a6febb2 commit 9310ddc
Show file tree
Hide file tree
Showing 131 changed files with 4,576 additions and 2,257 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/fdroid.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Fdroid version file generation

on:
workflow_dispatch:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-[0-9]+'

jobs:
# https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/com.carriez.flutter_hbb.yml
# Finds latest release and transforms F-Droid vereion code from version as follows:
# X.Y.Z-A => X * 1e9 + Y * 1e6 + Z * 1e3 + A
update-fdroid-version-file:
name: Publish RustDesk version file for F-Droid updater
runs-on: ubuntu-latest
steps:
- name: Generate RustDesk version file
run: |
UPSTREAM_VERNAME="$(curl https://api.github.com/repos/rustdesk/rustdesk/releases/latest | jq -r .tag_name | sed 's/^v//')"
UPSTREAM_VERCODE="$(echo "$UPSTREAM_VERNAME" | tr '.' ' ' | tr '-' ' ' | while read -r MAJOR MINOR PATCH REV; do [ -z "$MAJOR" ] && MAJOR=0; [ -z "$MINOR" ] && MINOR=0; [ -z "$PATCH" ] && PATCH=0; [ -z "$REV" ] && REV=0; echo "$(( 1000000000 * $MAJOR + 1000000 * $MINOR + 1000 * $PATCH + $REV ))"; done)"
echo "versionName=$UPSTREAM_VERNAME" > rustdesk-version.txt
echo "versionCode=$UPSTREAM_VERCODE" >> rustdesk-version.txt
shell: bash

- name: Publish RustDesk version file
uses: softprops/action-gh-release@v1
with:
prerelease: true
tag_name: "fdroid-version"
files: |
./rustdesk-version.txt
76 changes: 56 additions & 20 deletions .github/workflows/flutter-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ env:
FLUTTER_ELINUX_VERSION: "3.16.9"
TAG_NAME: "${{ inputs.upload-tag }}"
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
# vcpkg version: 2024.03.25
VCPKG_COMMIT_ID: "a34c873a9717a888f58dc05268dea15592c2f0ff"
VERSION: "1.2.6"
# vcpkg version: 2024.06.15
VCPKG_COMMIT_ID: "f7423ee180c4b7f40d43402c2feb3859161ef625"
VERSION: "1.2.7"
NDK_VERSION: "r26d"
#signing keys env variable checks
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
Expand Down Expand Up @@ -163,6 +163,7 @@ jobs:
shell: bash
if: env.UPLOAD_ARTIFACT == 'true'
run: |
sed -i '/dpiAware/d' res/manifest.xml
pushd ./libs/portable
pip3 install -r requirements.txt
python3 ./generate.py -f ../../rustdesk/ -o . -e ../../rustdesk/rustdesk.exe
Expand Down Expand Up @@ -297,6 +298,7 @@ jobs:
- name: Build self-extracted executable
shell: bash
run: |
sed -i '/dpiAware/d' res/manifest.xml
pushd ./libs/portable
pip3 install -r requirements.txt
python3 ./generate.py -f ../../Release/ -o . -e ../../Release/rustdesk.exe
Expand Down Expand Up @@ -966,12 +968,14 @@ jobs:
target: x86_64-unknown-linux-gnu,
distro: ubuntu18.04,
on: ubuntu-20.04,
deb_arch: amd64,
}
- {
arch: aarch64,
target: aarch64-unknown-linux-gnu,
distro: ubuntu18.04,
on: [self-hosted, Linux, ARM64],
deb_arch: arm64,
}
steps:
- name: Export GitHub Actions cache environment variables
Expand Down Expand Up @@ -1006,6 +1010,7 @@ jobs:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'
with:
toolchain: ${{ env.RUST_VERSION }}
targets: ${{ matrix.job.target }}
Expand All @@ -1022,19 +1027,21 @@ jobs:
sed -i "s/\[\"cdylib\", \"staticlib\", \"rlib\"\]/\[\"cdylib\"\]/g" Cargo.toml
- name: Restore bridge files
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'
uses: actions/download-artifact@master
with:
name: bridge-artifact
path: ./

- name: Setup vcpkg with Github Actions binary cache
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: /opt/artifacts/vcpkg
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}

- name: Install vcpkg dependencies
if: env.UPLOAD_ARTIFACT == 'true'
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'
run: |
case ${{ matrix.job.target }} in
aarch64-unknown-linux-gnu)
Expand All @@ -1047,6 +1054,7 @@ jobs:
shell: bash

- name: Restore bridge files
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'
uses: actions/download-artifact@master
with:
name: bridge-artifact
Expand All @@ -1055,7 +1063,7 @@ jobs:
- uses: rustdesk-org/run-on-arch-action@amd64-support
name: Build rustdesk
id: vcpkg
if: env.UPLOAD_ARTIFACT == 'true'
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'
with:
arch: ${{ matrix.job.arch }}
distro: ${{ matrix.job.distro }}
Expand Down Expand Up @@ -1146,7 +1154,6 @@ jobs:
aarch64)
export PATH=/opt/flutter-elinux/bin:$PATH
sed -i "s/flutter build linux --release/flutter-elinux build linux --verbose/g" ./build.py
export ARCH=arm64
sed -i "s/x64\/release/arm64\/release/g" ./build.py
;;
x86_64)
Expand Down Expand Up @@ -1178,6 +1185,7 @@ jobs:
# build flutter
pushd /workspace
export CARGO_INCREMENTAL=0
export DEB_ARCH=${{ matrix.job.deb_arch }}
python3 ./build.py --flutter --skip-cargo
for name in rustdesk*??.deb; do
mv "$name" "${name%%.deb}-${{ matrix.job.arch }}.deb"
Expand Down Expand Up @@ -1256,21 +1264,31 @@ jobs:
files: |
res/rustdesk-${{ env.VERSION }}*.zst
build-rustdesk-sciter-arm:
build-rustdesk-linux-sciter:
if: ${{ inputs.upload-artifact }}
needs: build-rustdesk-linux # not for dep, just make it run later for parallelism
runs-on: [self-hosted, Linux, ARM64]
name: build-rustdesk-sciter-arm ${{ matrix.job.target }}
runs-on: ${{ matrix.job.on }}
name: build-rustdesk-linux-sciter ${{ matrix.job.target }}
strategy:
fail-fast: false
matrix:
# use a high level qemu-user-static
job:
- {
arch: x86_64,
target: x86_64-unknown-linux-gnu,
on: ubuntu-20.04,
distro: ubuntu18.04,
deb_arch: amd64,
sciter_arch: x64,
}
- {
arch: armv7,
target: armv7-unknown-linux-gnueabihf,
deb-arch: armhf,
use-cross: true,
on: [self-hosted, Linux, ARM64],
distro: ubuntu18.04-rustdesk,
deb_arch: armhf,
sciter_arch: arm32,
}
steps:
- name: Export GitHub Actions cache environment variables
Expand Down Expand Up @@ -1334,7 +1352,7 @@ jobs:
id: vcpkg
with:
arch: ${{ matrix.job.arch }}
distro: ubuntu18.04-rustdesk
distro: ${{ matrix.job.distro }}
githubToken: ${{ github.token }}
setup: |
ls -l "${PWD}"
Expand Down Expand Up @@ -1400,13 +1418,13 @@ jobs:
pushd /workspace
python3 ./res/inline-sciter.py
export VCPKG_ROOT=/opt/artifacts/vcpkg
export ARCH=armhf
export CARGO_INCREMENTAL=0
cargo build --features inline --release --bins --jobs 1
# package
mkdir -p ./Release
mv ./target/release/rustdesk ./Release/rustdesk
wget -O ./Release/libsciter-gtk.so https://github.com/c-smile/sciter-sdk/raw/master/bin.lnx/arm32/libsciter-gtk.so
wget -O ./Release/libsciter-gtk.so https://github.com/c-smile/sciter-sdk/raw/master/bin.lnx/${{ matrix.job.sciter_arch }}/libsciter-gtk.so
export DEB_ARCH=${{ matrix.job.deb_arch }}
./build.py --package ./Release
- name: Rename rustdesk
Expand All @@ -1426,6 +1444,13 @@ jobs:
files: |
rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}-sciter.deb
- name: Upload deb
uses: actions/upload-artifact@master
if: env.UPLOAD_ARTIFACT == 'true'
with:
name: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}-sciter.deb
path: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}-sciter.deb

build-appimage:
name: Build appimage ${{ matrix.job.target }}
needs: [build-rustdesk-linux]
Expand Down Expand Up @@ -1483,8 +1508,10 @@ jobs:
./appimage/rustdesk-${{ env.VERSION }}-*.AppImage
build-flatpak:
name: Build flatpak ${{ matrix.job.target }}
needs: [build-rustdesk-linux]
name: Build flatpak ${{ matrix.job.target }}${{ matrix.job.suffix }}
needs:
- build-rustdesk-linux
- build-rustdesk-linux-sciter
runs-on: ${{ matrix.job.on }}
if: ${{ inputs.upload-artifact }}
strategy:
Expand All @@ -1496,13 +1523,22 @@ jobs:
distro: ubuntu18.04,
on: ubuntu-20.04,
arch: x86_64,
suffix: "",
}
- {
target: x86_64-unknown-linux-gnu,
distro: ubuntu18.04,
on: ubuntu-20.04,
arch: x86_64,
suffix: "-sciter",
}
- {
target: aarch64-unknown-linux-gnu,
# try out newer flatpak since error of "error: Nothing matches org.freedesktop.Platform in remote flathub"
distro: ubuntu22.04,
on: [self-hosted, Linux, ARM64],
arch: aarch64,
suffix: "",
}
steps:
- name: Checkout source code
Expand All @@ -1511,12 +1547,12 @@ jobs:
- name: Download Binary
uses: actions/download-artifact@master
with:
name: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.deb
name: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.deb
path: .

- name: Rename Binary
run: |
mv rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.deb flatpak/rustdesk.deb
mv rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.deb flatpak/rustdesk.deb
- uses: rustdesk-org/run-on-arch-action@amd64-support
name: Build rustdesk flatpak package for ${{ matrix.job.arch }}
Expand Down Expand Up @@ -1562,15 +1598,15 @@ jobs:
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.arch }}.flatpak com.rustdesk.RustDesk
flatpak build-bundle ./repo rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.flatpak com.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.arch }}.flatpak
flatpak/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.flatpak
build-rustdesk-web:
if: False
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ env:
FLUTTER_ELINUX_VERSION: "3.16.9"
TAG_NAME: "nightly"
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
# vcpkg version: 2024.03.25
VCPKG_COMMIT_ID: "a34c873a9717a888f58dc05268dea15592c2f0ff"
VERSION: "1.2.6"
# vcpkg version: 2024.06.15
VCPKG_COMMIT_ID: "f7423ee180c4b7f40d43402c2feb3859161ef625"
VERSION: "1.2.7"
NDK_VERSION: "r26d"
#signing keys env variable checks
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/winget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: vedantmgoyal2009/winget-releaser@v2
- uses: vedantmgoyal9/winget-releaser@main
with:
identifier: RustDesk.RustDesk
version: ${{ github.event.release.tag_name }}
Expand Down
Loading

0 comments on commit 9310ddc

Please sign in to comment.