From d659c2383b487e2a36fee603065ab4d9f3886e94 Mon Sep 17 00:00:00 2001 From: Matthias Weiss Date: Wed, 23 Apr 2025 09:22:42 +0200 Subject: [PATCH 1/4] Update Runners to Ubuntu 24.04 --- .github/workflows/bridge.yml | 2 +- .github/workflows/flutter-build.yml | 20 +++++------ .github/workflows/playground.yml | 17 +++++---- Cargo.lock | 55 +++++++++++++++-------------- 4 files changed, 47 insertions(+), 47 deletions(-) diff --git a/.github/workflows/bridge.yml b/.github/workflows/bridge.yml index 9d56fbe6f2b..8a3a0e8c617 100644 --- a/.github/workflows/bridge.yml +++ b/.github/workflows/bridge.yml @@ -19,7 +19,7 @@ jobs: job: - { target: x86_64-unknown-linux-gnu, - os: ubuntu-20.04, + os: ubuntu-24.04, extra-build-args: "", } steps: diff --git a/.github/workflows/flutter-build.yml b/.github/workflows/flutter-build.yml index 278d0cb3970..e535d37b796 100644 --- a/.github/workflows/flutter-build.yml +++ b/.github/workflows/flutter-build.yml @@ -886,21 +886,21 @@ jobs: - { arch: aarch64, target: aarch64-linux-android, - os: ubuntu-20.04, + os: ubuntu-24.04, reltype: release, suffix: "", } - { arch: armv7, target: armv7-linux-androideabi, - os: ubuntu-20.04, + os: ubuntu-24.04, reltype: release, suffix: "", } - { arch: x86_64, target: x86_64-linux-android, - os: ubuntu-20.04, + os: ubuntu-24.04, reltype: release, suffix: "", } @@ -1176,7 +1176,7 @@ jobs: name: build rustdesk android universal apk if: false # if: ${{ inputs.upload-artifact }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 env: reltype: release x86_target: "" # can be ",android-x86" @@ -1373,7 +1373,7 @@ jobs: arch: x86_64, target: x86_64-unknown-linux-gnu, distro: ubuntu18.04, - on: ubuntu-20.04, + on: ubuntu-24.04, deb_arch: amd64, vcpkg-triplet: x64-linux, } @@ -1697,7 +1697,7 @@ jobs: - { arch: x86_64, target: x86_64-unknown-linux-gnu, - on: ubuntu-20.04, + on: ubuntu-24.04, distro: ubuntu18.04, deb_arch: amd64, sciter_arch: x64, @@ -1891,7 +1891,7 @@ jobs: build-appimage: name: Build appimage ${{ matrix.job.target }} needs: [build-rustdesk-linux] - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 if: ${{ inputs.upload-artifact }} strategy: fail-fast: false @@ -1951,14 +1951,14 @@ jobs: - { target: x86_64-unknown-linux-gnu, distro: ubuntu18.04, - on: ubuntu-20.04, + on: ubuntu-24.04, arch: x86_64, suffix: "", } - { target: x86_64-unknown-linux-gnu, distro: ubuntu18.04, - on: ubuntu-20.04, + on: ubuntu-24.04, arch: x86_64, suffix: "-sciter", } @@ -2033,7 +2033,7 @@ jobs: build-rustdesk-web: if: False name: build-rustdesk-web - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false env: diff --git a/.github/workflows/playground.yml b/.github/workflows/playground.yml index 22afd2dec85..efeb8f4efb7 100644 --- a/.github/workflows/playground.yml +++ b/.github/workflows/playground.yml @@ -2,7 +2,7 @@ name: playground on: #schedule: - # schedule build every night + # schedule build every night # - cron: "0/6 * * * *" workflow_dispatch: @@ -47,7 +47,7 @@ jobs: flutter: "3.13.9", ref: "f6509e3fd6917aa976bad2fc684182601ebf2434", bridge: "1.80.1", - date: "20231219" + date: "20231219", } - { target: x86_64-apple-darwin, @@ -57,7 +57,7 @@ jobs: flutter: "3.10.6", ref: "f6509e3fd6917aa976bad2fc684182601ebf2434", bridge: "1.80.1", - date: "20231219" + date: "20231219", } - { target: x86_64-apple-darwin, @@ -67,7 +67,7 @@ jobs: flutter: "3.10.6", ref: "85ddfc0739f052cab0029c46b899b959ee94eeb8", bridge: "1.80.1", - date: "20231119" + date: "20231119", } - { target: x86_64-apple-darwin, @@ -77,7 +77,7 @@ jobs: flutter: "3.13.9", ref: "85ddfc0739f052cab0029c46b899b959ee94eeb8", bridge: "1.80.1", - date: "20231119" + date: "20231119", } steps: - name: Export GitHub Actions cache environment variables @@ -91,7 +91,7 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ matrix.job.ref }} - + - name: Import the codesign cert if: env.MACOS_P12_BASE64 != null uses: apple-actions/import-codesign-certs@v1 @@ -164,7 +164,7 @@ jobs: - name: Install vcpkg dependencies run: | $VCPKG_ROOT/vcpkg install --x-install-root="$VCPKG_ROOT/installed" - + - name: Restore from cache and install vcpkg uses: lukka/run-vcpkg@v7 if: false @@ -230,7 +230,6 @@ jobs: files: | rustdesk*-${{ matrix.job.arch }}*.dmg - build-rustdesk-android: if: false name: build rustdesk android apk ${{ matrix.job.target }} @@ -242,7 +241,7 @@ jobs: - { arch: aarch64, target: aarch64-linux-android, - os: ubuntu-20.04, + os: ubuntu-24.04, openssl-arch: android-arm64, ref: master, # latest } diff --git a/Cargo.lock b/Cargo.lock index 4a12e18b1dd..4f1e695bc7d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -224,7 +224,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arboard" version = "3.4.0" -source = "git+https://github.com/rustdesk-org/arboard#747ab2d9b40a5c9c5102051cf3b0bb38b4845e60" +source = "git+https://github.com/rustdesk-org/arboard#4e16bad260ea05dd7dcdb68cc7549dad3920b940" dependencies = [ "clipboard-win", "core-graphics 0.23.2", @@ -234,6 +234,7 @@ dependencies = [ "objc2-app-kit", "objc2-foundation", "parking_lot", + "percent-encoding", "serde 1.0.203", "serde_derive", "windows-sys 0.48.0", @@ -723,9 +724,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.16.1" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" [[package]] name = "byteorder" @@ -735,9 +736,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" dependencies = [ "serde 1.0.203", ] @@ -1290,7 +1291,7 @@ dependencies = [ [[package]] name = "cpal" version = "0.15.3" -source = "git+https://github.com/rustdesk-org/cpal?branch=osx-screencapturekit#7cb4ed0bd5546bf209edde0d0e9da5194753f2c0" +source = "git+https://github.com/rustdesk-org/cpal?branch=osx-screencapturekit#6b374bcaed076750ca8fce6da518ab39b882e14a" dependencies = [ "alsa", "cidre", @@ -1697,7 +1698,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.7.4", + "libloading 0.8.4", ] [[package]] @@ -2251,9 +2252,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -2261,9 +2262,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" @@ -2278,9 +2279,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -2312,9 +2313,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.36", @@ -2323,21 +2324,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -3065,7 +3066,7 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hwcodec" version = "0.7.1" -source = "git+https://github.com/rustdesk-org/hwcodec#835e599ed229e4e01b6fa3566e02ea45c73e2e9c" +source = "git+https://github.com/rustdesk-org/hwcodec#0ea7e709d3c48bb6446e33a9cc8fd0e0da5709b9" dependencies = [ "bindgen 0.59.2", "cc", @@ -4163,7 +4164,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 2.0.2", "proc-macro2 1.0.86", "quote 1.0.36", "syn 2.0.68", @@ -4382,9 +4383,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if 1.0.0", @@ -4414,9 +4415,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", From ab6112f52c584872c5ba51a955e8021d2131f085 Mon Sep 17 00:00:00 2001 From: Matthias Weiss Date: Wed, 23 Apr 2025 09:29:06 +0200 Subject: [PATCH 2/4] Update clang dependencies --- .github/workflows/bridge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bridge.yml b/.github/workflows/bridge.yml index 8a3a0e8c617..8c75757da29 100644 --- a/.github/workflows/bridge.yml +++ b/.github/workflows/bridge.yml @@ -37,9 +37,9 @@ jobs: gcc \ git \ g++ \ - libclang-10-dev \ + libclang-18-dev \ libgtk-3-dev \ - llvm-10-dev \ + llvm-18-dev \ nasm \ ninja-build \ pkg-config \ From c285c2ce4f780ce85a522a24f031ba15b94fe17d Mon Sep 17 00:00:00 2001 From: Matthias Weiss Date: Wed, 23 Apr 2025 09:49:21 +0200 Subject: [PATCH 3/4] Use upstream fixes --- .github/workflows/bridge.yml | 6 +- .github/workflows/ci.yml | 301 ++++++++++++++-------------- .github/workflows/flutter-build.yml | 32 +-- .github/workflows/playground.yml | 7 +- 4 files changed, 175 insertions(+), 171 deletions(-) diff --git a/.github/workflows/bridge.yml b/.github/workflows/bridge.yml index 8c75757da29..c8e963f096a 100644 --- a/.github/workflows/bridge.yml +++ b/.github/workflows/bridge.yml @@ -19,7 +19,7 @@ jobs: job: - { target: x86_64-unknown-linux-gnu, - os: ubuntu-24.04, + os: ubuntu-22.04, extra-build-args: "", } steps: @@ -37,9 +37,9 @@ jobs: gcc \ git \ g++ \ - libclang-18-dev \ + libclang-11-dev \ libgtk-3-dev \ - llvm-18-dev \ + llvm-11-dev \ nasm \ ninja-build \ pkg-config \ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90f312968e0..7e910ef8645 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,8 @@ name: CI env: -# MIN_SUPPORTED_RUST_VERSION: "1.46.0" -# CICD_INTERMEDIATES_DIR: "_cicd-intermediates" + # MIN_SUPPORTED_RUST_VERSION: "1.46.0" + # CICD_INTERMEDIATES_DIR: "_cicd-intermediates" VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" # vcpkg version: 2024.06.15 # for multiarch gcc compatibility @@ -80,153 +80,154 @@ jobs: # - { target: x86_64-apple-darwin , os: macos-10.15 } # - { target: x86_64-pc-windows-gnu , os: windows-2022 } # - { target: x86_64-pc-windows-msvc , os: windows-2022 } - - { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04 } + - { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04 } # - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true } steps: - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v6 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - - name: Checkout source code - uses: actions/checkout@v4 - - - name: Install prerequisites - shell: bash - run: | - case ${{ matrix.job.target }} in - x86_64-unknown-linux-gnu) - sudo apt-get -y update - sudo apt-get install -y \ - clang \ - cmake \ - curl \ - gcc \ - git \ - g++ \ - libpam0g-dev \ - libasound2-dev \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev \ - libgtk-3-dev \ - libpulse-dev \ - libva-dev \ - libvdpau-dev \ - libxcb-randr0-dev \ - libxcb-shape0-dev \ - libxcb-xfixes0-dev \ - libxdo-dev \ - libxfixes-dev \ - nasm \ - wget - ;; - # arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;; - # aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;; - esac - - - name: Setup vcpkg with Github Actions binary cache - uses: lukka/run-vcpkg@v11 - with: - vcpkgDirectory: /opt/artifacts/vcpkg - vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }} - - - name: Install vcpkg dependencies - run: | - $VCPKG_ROOT/vcpkg install --x-install-root="$VCPKG_ROOT/installed" - shell: bash - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@v1 - with: - toolchain: stable - targets: ${{ matrix.job.target }} - components: '' - - - name: Show version information (Rust, cargo, GCC) - shell: bash - run: | - gcc --version || true - rustup -V - rustup toolchain list - rustup default - cargo -V - rustc -V - - - uses: Swatinem/rust-cache@v2 - - - name: Build - uses: actions-rs/cargo@v1 - with: - use-cross: ${{ matrix.job.use-cross }} - command: build - args: --locked --target=${{ matrix.job.target }} - - - name: clean - shell: bash - run: | - cargo clean - - # - name: Strip debug information from executable - # id: strip - # shell: bash - # run: | - # # Figure out suffix of binary - # EXE_suffix="" - # case ${{ matrix.job.target }} in - # *-pc-windows-*) EXE_suffix=".exe" ;; - # esac; - - # # Figure out what strip tool to use if any - # STRIP="strip" - # case ${{ matrix.job.target }} in - # arm-unknown-linux-*) STRIP="arm-linux-gnueabihf-strip" ;; - # aarch64-unknown-linux-gnu) STRIP="aarch64-linux-gnu-strip" ;; - # *-pc-windows-msvc) STRIP="" ;; - # esac; - - # # Setup paths - # BIN_DIR="${{ env.CICD_INTERMEDIATES_DIR }}/stripped-release-bin/" - # mkdir -p "${BIN_DIR}" - # BIN_NAME="${{ env.PROJECT_NAME }}${EXE_suffix}" - # BIN_PATH="${BIN_DIR}/${BIN_NAME}" - - # # Copy the release build binary to the result location - # cp "target/${{ matrix.job.target }}/release/${BIN_NAME}" "${BIN_DIR}" - - # # Also strip if possible - # if [ -n "${STRIP}" ]; then - # "${STRIP}" "${BIN_PATH}" - # fi - - # # Let subsequent steps know where to find the (stripped) bin - # echo ::set-output name=BIN_PATH::${BIN_PATH} - # echo ::set-output name=BIN_NAME::${BIN_NAME} - - - name: Set testing options - id: test-options - shell: bash - run: | - # test only library unit tests and binary for arm-type targets - unset CARGO_TEST_OPTIONS - - case ${{ matrix.job.target }} in - arm-* | aarch64-*) - CARGO_TEST_OPTIONS="--lib --bin ${PROJECT_NAME}" - ;; - *) - CARGO_TEST_OPTIONS="--workspace --no-fail-fast -- --skip test_get_cursor_pos --skip test_get_key_state" - ;; - esac; - - #deprecated echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS} - echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_ENV - echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_OUTPUT - - - name: Run tests - uses: actions-rs/cargo@v1 - with: - use-cross: ${{ matrix.job.use-cross }} - command: test - args: --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}} + - name: Export GitHub Actions cache environment variables + uses: actions/github-script@v6 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); + + - name: Checkout source code + uses: actions/checkout@v4 + + - name: Install prerequisites + shell: bash + run: | + case ${{ matrix.job.target }} in + x86_64-unknown-linux-gnu) + sudo apt-get -y update + sudo apt-get install -y \ + clang \ + cmake \ + curl \ + gcc \ + git \ + g++ \ + libpam0g-dev \ + libasound2-dev \ + libunwind-dev \ + libgstreamer1.0-dev \ + libgstreamer-plugins-base1.0-dev \ + libgtk-3-dev \ + libpulse-dev \ + libva-dev \ + libvdpau-dev \ + libxcb-randr0-dev \ + libxcb-shape0-dev \ + libxcb-xfixes0-dev \ + libxdo-dev \ + libxfixes-dev \ + nasm \ + wget + ;; + # arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;; + # aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;; + esac + + - name: Setup vcpkg with Github Actions binary cache + uses: lukka/run-vcpkg@v11 + with: + vcpkgDirectory: /opt/artifacts/vcpkg + vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }} + + - name: Install vcpkg dependencies + run: | + $VCPKG_ROOT/vcpkg install --x-install-root="$VCPKG_ROOT/installed" + shell: bash + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@v1 + with: + toolchain: stable + targets: ${{ matrix.job.target }} + components: "" + + - name: Show version information (Rust, cargo, GCC) + shell: bash + run: | + gcc --version || true + rustup -V + rustup toolchain list + rustup default + cargo -V + rustc -V + + - uses: Swatinem/rust-cache@v2 + + - name: Build + uses: actions-rs/cargo@v1 + with: + use-cross: ${{ matrix.job.use-cross }} + command: build + args: --locked --target=${{ matrix.job.target }} + + - name: clean + shell: bash + run: | + cargo clean + + # - name: Strip debug information from executable + # id: strip + # shell: bash + # run: | + # # Figure out suffix of binary + # EXE_suffix="" + # case ${{ matrix.job.target }} in + # *-pc-windows-*) EXE_suffix=".exe" ;; + # esac; + + # # Figure out what strip tool to use if any + # STRIP="strip" + # case ${{ matrix.job.target }} in + # arm-unknown-linux-*) STRIP="arm-linux-gnueabihf-strip" ;; + # aarch64-unknown-linux-gnu) STRIP="aarch64-linux-gnu-strip" ;; + # *-pc-windows-msvc) STRIP="" ;; + # esac; + + # # Setup paths + # BIN_DIR="${{ env.CICD_INTERMEDIATES_DIR }}/stripped-release-bin/" + # mkdir -p "${BIN_DIR}" + # BIN_NAME="${{ env.PROJECT_NAME }}${EXE_suffix}" + # BIN_PATH="${BIN_DIR}/${BIN_NAME}" + + # # Copy the release build binary to the result location + # cp "target/${{ matrix.job.target }}/release/${BIN_NAME}" "${BIN_DIR}" + + # # Also strip if possible + # if [ -n "${STRIP}" ]; then + # "${STRIP}" "${BIN_PATH}" + # fi + + # # Let subsequent steps know where to find the (stripped) bin + # echo ::set-output name=BIN_PATH::${BIN_PATH} + # echo ::set-output name=BIN_NAME::${BIN_NAME} + + - name: Set testing options + id: test-options + shell: bash + run: | + # test only library unit tests and binary for arm-type targets + unset CARGO_TEST_OPTIONS + + case ${{ matrix.job.target }} in + arm-* | aarch64-*) + CARGO_TEST_OPTIONS="--lib --bin ${PROJECT_NAME}" + ;; + *) + CARGO_TEST_OPTIONS="--workspace --no-fail-fast -- --skip test_get_cursor_pos --skip test_get_key_state" + ;; + esac; + + #deprecated echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS} + echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_ENV + echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_OUTPUT + + - name: Run tests + uses: actions-rs/cargo@v1 + with: + use-cross: ${{ matrix.job.use-cross }} + command: test + args: --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}} diff --git a/.github/workflows/flutter-build.yml b/.github/workflows/flutter-build.yml index e535d37b796..d0ef3cfdd45 100644 --- a/.github/workflows/flutter-build.yml +++ b/.github/workflows/flutter-build.yml @@ -886,21 +886,21 @@ jobs: - { arch: aarch64, target: aarch64-linux-android, - os: ubuntu-24.04, + os: ubuntu-22.04, reltype: release, suffix: "", } - { arch: armv7, target: armv7-linux-androideabi, - os: ubuntu-24.04, + os: ubuntu-22.04, reltype: release, suffix: "", } - { arch: x86_64, target: x86_64-linux-android, - os: ubuntu-24.04, + os: ubuntu-22.04, reltype: release, suffix: "", } @@ -937,7 +937,8 @@ jobs: libayatana-appindicator3-dev \ libasound2-dev \ libc6-dev \ - libclang-10-dev \ + libclang-11-dev \ + libunwind-dev \ libgstreamer1.0-dev \ libgstreamer-plugins-base1.0-dev \ libgtk-3-dev \ @@ -949,7 +950,7 @@ jobs: libxcb-xfixes0-dev \ libxdo-dev \ libxfixes-dev \ - llvm-10-dev \ + llvm-11-dev \ nasm \ ninja-build \ openjdk-17-jdk-headless \ @@ -1176,7 +1177,7 @@ jobs: name: build rustdesk android universal apk if: false # if: ${{ inputs.upload-artifact }} - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 env: reltype: release x86_target: "" # can be ",android-x86" @@ -1214,7 +1215,8 @@ jobs: libayatana-appindicator3-dev \ libasound2-dev \ libc6-dev \ - libclang-10-dev \ + libclang-11-dev \ + libunwind-dev \ libgstreamer1.0-dev \ libgstreamer-plugins-base1.0-dev \ libgtk-3-dev \ @@ -1226,7 +1228,7 @@ jobs: libxcb-xfixes0-dev \ libxdo-dev \ libxfixes-dev \ - llvm-10-dev \ + llvm-11-dev \ nasm \ ninja-build \ openjdk-17-jdk-headless \ @@ -1373,7 +1375,7 @@ jobs: arch: x86_64, target: x86_64-unknown-linux-gnu, distro: ubuntu18.04, - on: ubuntu-24.04, + on: ubuntu-22.04, deb_arch: amd64, vcpkg-triplet: x64-linux, } @@ -1697,7 +1699,7 @@ jobs: - { arch: x86_64, target: x86_64-unknown-linux-gnu, - on: ubuntu-24.04, + on: ubuntu-22.04, distro: ubuntu18.04, deb_arch: amd64, sciter_arch: x64, @@ -1891,7 +1893,7 @@ jobs: build-appimage: name: Build appimage ${{ matrix.job.target }} needs: [build-rustdesk-linux] - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 if: ${{ inputs.upload-artifact }} strategy: fail-fast: false @@ -1917,7 +1919,7 @@ jobs: run: | # install libarchive-tools for bsdtar command used in AppImageBuilder.yml sudo apt-get update -y - sudo apt-get install -y libarchive-tools + sudo apt-get install -y libarchive-tools libfuse2 # 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 @@ -1951,14 +1953,14 @@ jobs: - { target: x86_64-unknown-linux-gnu, distro: ubuntu18.04, - on: ubuntu-24.04, + on: ubuntu-22.04, arch: x86_64, suffix: "", } - { target: x86_64-unknown-linux-gnu, distro: ubuntu18.04, - on: ubuntu-24.04, + on: ubuntu-22.04, arch: x86_64, suffix: "-sciter", } @@ -2033,7 +2035,7 @@ jobs: build-rustdesk-web: if: False name: build-rustdesk-web - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false env: diff --git a/.github/workflows/playground.yml b/.github/workflows/playground.yml index efeb8f4efb7..64b56611e7b 100644 --- a/.github/workflows/playground.yml +++ b/.github/workflows/playground.yml @@ -241,7 +241,7 @@ jobs: - { arch: aarch64, target: aarch64-linux-android, - os: ubuntu-24.04, + os: ubuntu-22.04, openssl-arch: android-arm64, ref: master, # latest } @@ -265,7 +265,8 @@ jobs: libayatana-appindicator3-dev\ libasound2-dev \ libc6-dev \ - libclang-10-dev \ + libclang-11-dev \ + libunwind-dev \ libgstreamer1.0-dev \ libgstreamer-plugins-base1.0-dev \ libgtk-3-dev \ @@ -278,7 +279,7 @@ jobs: libxcb-xfixes0-dev \ libxdo-dev \ libxfixes-dev \ - llvm-10-dev \ + llvm-11-dev \ nasm \ yasm \ ninja-build \ From eec871de301230aabe1024893c810f3c0ab6e04e Mon Sep 17 00:00:00 2001 From: Matthias Weiss Date: Wed, 23 Apr 2025 14:41:54 +0200 Subject: [PATCH 4/4] Correct calling of hwcodec function --- libs/scrap/src/common/hwcodec.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/scrap/src/common/hwcodec.rs b/libs/scrap/src/common/hwcodec.rs index 3d56472eedc..40eefa72c41 100644 --- a/libs/scrap/src/common/hwcodec.rs +++ b/libs/scrap/src/common/hwcodec.rs @@ -193,7 +193,9 @@ impl EncoderApi for HwRamEncoder { } fn support_abr(&self) -> bool { - ["qsv", "vaapi"].iter().all(|&x| !self.config.name.contains(x)) + ["qsv", "vaapi"] + .iter() + .all(|&x| !self.config.name.contains(x)) } fn support_changing_quality(&self) -> bool { @@ -692,8 +694,8 @@ pub fn check_available_hwcodec() -> String { #[cfg(not(feature = "vram"))] let vram_string = "".to_owned(); let c = HwCodecConfig { - ram_encode: Encoder::available_encoders(ctx, Some(vram_string.clone())), - ram_decode: Decoder::available_decoders(Some(vram_string)), + ram_encode: Encoder::available_encoders(ctx, Some(vram_string)), + ram_decode: Decoder::available_decoders(), #[cfg(feature = "vram")] vram_encode: vram.0, #[cfg(feature = "vram")]