mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-23 19:49:05 +08:00
ci for linux x86_64 sciter deb and flatpak (#8545)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
parent
e71d86c124
commit
285e974d1a
56
.github/workflows/flutter-build.yml
vendored
56
.github/workflows/flutter-build.yml
vendored
@ -1262,21 +1262,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
|
||||
@ -1340,7 +1350,7 @@ jobs:
|
||||
id: vcpkg
|
||||
with:
|
||||
arch: ${{ matrix.job.arch }}
|
||||
distro: ubuntu18.04-rustdesk
|
||||
distro: ${{ matrix.job.distro }}
|
||||
githubToken: ${{ github.token }}
|
||||
setup: |
|
||||
ls -l "${PWD}"
|
||||
@ -1406,13 +1416,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
|
||||
@ -1432,6 +1442,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]
|
||||
@ -1489,8 +1506,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:
|
||||
@ -1502,6 +1521,14 @@ 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,
|
||||
@ -1509,6 +1536,7 @@ jobs:
|
||||
distro: ubuntu22.04,
|
||||
on: [self-hosted, Linux, ARM64],
|
||||
arch: aarch64,
|
||||
suffix: "",
|
||||
}
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
@ -1517,12 +1545,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 }}
|
||||
@ -1568,7 +1596,7 @@ 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
|
||||
@ -1576,7 +1604,7 @@ jobs:
|
||||
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
|
||||
|
6
build.py
6
build.py
@ -25,8 +25,8 @@ flutter_build_dir_2 = f'flutter/{flutter_build_dir}'
|
||||
skip_cargo = False
|
||||
|
||||
|
||||
def get_arch() -> str:
|
||||
custom_arch = os.environ.get("ARCH")
|
||||
def get_deb_arch() -> str:
|
||||
custom_arch = os.environ.get("DEB_ARCH")
|
||||
if custom_arch is None:
|
||||
return "amd64"
|
||||
return custom_arch
|
||||
@ -294,7 +294,7 @@ Homepage: https://rustdesk.com
|
||||
Depends: libgtk-3-0, libxcb-randr0, libxdo3, libxfixes3, libxcb-shape0, libxcb-xfixes0, libasound2, libsystemd0, curl, libva-drm2, libva-x11-2, libvdpau1, libgstreamer-plugins-base1.0-0, libpam0g, libappindicator3-1, gstreamer1.0-pipewire
|
||||
Description: A remote control software.
|
||||
|
||||
""" % (version, get_arch())
|
||||
""" % (version, get_deb_arch())
|
||||
file = open(control_file_path, "w")
|
||||
file.write(content)
|
||||
file.close()
|
||||
|
Loading…
Reference in New Issue
Block a user