mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-18 13:37:52 +08:00
106 lines
3.6 KiB
YAML
106 lines
3.6 KiB
YAML
name: Flutter Nightly MacOS Arm64 Build
|
|
|
|
on:
|
|
#schedule:
|
|
# schedule build every night
|
|
# - cron: "0/6 * * * *"
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CARGO_NDK_VERSION: "3.1.2"
|
|
LLVM_VERSION: "15.0.6"
|
|
FLUTTER_VERSION: "3.16.9"
|
|
FLUTTER_RUST_BRIDGE_VERSION: "1.80.1"
|
|
# for arm64 linux because official Dart SDK does not work
|
|
FLUTTER_ELINUX_VERSION: "3.16.9"
|
|
FLUTTER_ELINUX_COMMIT_ID: "c02bd16e1630f5bd690b85c5c2456ac1920e25af"
|
|
TAG_NAME: "nightly"
|
|
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
|
|
# vcpkg version: 2023.10.19
|
|
# for multiarch gcc compatibility
|
|
VCPKG_COMMIT_ID: "8eb57355a4ffb410a2e94c07b4dca2dffbee8e50"
|
|
VERSION: "1.2.4"
|
|
NDK_VERSION: "r26b"
|
|
#signing keys env variable checks
|
|
ANDROID_SIGNING_KEY: '${{ secrets.ANDROID_SIGNING_KEY }}'
|
|
MACOS_P12_BASE64: '${{ secrets.MACOS_P12_BASE64 }}'
|
|
# To make a custom build with your own servers set the below secret values
|
|
RS_PUB_KEY: '${{ secrets.RS_PUB_KEY }}'
|
|
RENDEZVOUS_SERVER: '${{ secrets.RENDEZVOUS_SERVER }}'
|
|
API_SERVER: '${{ secrets.API_SERVER }}'
|
|
UPLOAD_ARTIFACT: true
|
|
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
|
|
|
|
jobs:
|
|
build-rustdesk-ios:
|
|
runs-on: [self-hosted, macOS, ARM64]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
job:
|
|
- {
|
|
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,
|
|
}
|
|
steps:
|
|
- name: Checkout source code
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: rustdesk-org/run-on-arch-action@amd64-support
|
|
name: Build rustdesk flatpak package for ${{ matrix.job.arch }}
|
|
id: rpm
|
|
with:
|
|
arch: ${{ matrix.job.arch }}
|
|
distro: ${{ matrix.job.distro }}
|
|
githubToken: ${{ github.token }}
|
|
setup: |
|
|
ls -l "${PWD}"
|
|
dockerRunArgs: |
|
|
--volume "${PWD}:/workspace"
|
|
shell: /bin/bash
|
|
install: |
|
|
apt-get update -y
|
|
apt-get install -y \
|
|
curl \
|
|
git \
|
|
rpm \
|
|
wget
|
|
run: |
|
|
# disable git safe.directory
|
|
git config --global --add safe.directory "*"
|
|
pushd /workspace
|
|
# install
|
|
apt-get update -y
|
|
apt-get install -y \
|
|
cmake \
|
|
curl \
|
|
flatpak \
|
|
flatpak-builder \
|
|
gcc \
|
|
git \
|
|
g++ \
|
|
libgtk-3-dev \
|
|
nasm \
|
|
wget
|
|
# 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 }}/23.08
|
|
flatpak --user install -y flathub org.freedesktop.Sdk/${{ matrix.job.arch }}/23.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.arch }}.flatpak com.rustdesk.RustDesk
|
|
|
|
- name: Publish flatpak package
|
|
uses: softprops/action-gh-release@v1
|
|
if: env.UPLOAD_ARTIFACT == 'true'
|
|
with:
|
|
prerelease: true
|
|
tag_name: ${{ env.TAG_NAME }}
|
|
files: |
|
|
flatpak/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.flatpak
|