fix ci
This commit is contained in:
parent
860dc7dbc2
commit
eeffb11841
319
.github/workflows/build-macos-arm64.yml
vendored
319
.github/workflows/build-macos-arm64.yml
vendored
@ -31,212 +31,163 @@ env:
|
|||||||
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
|
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build-flatpak-appimage:
|
||||||
generate-bridge-linux:
|
name: Build Flatpak ${{ matrix.job.target }}
|
||||||
uses: ./.github/workflows/bridge.yml
|
runs-on: ${{ matrix.job.on }}
|
||||||
|
|
||||||
build-rustdesk-android:
|
|
||||||
needs: [generate-bridge-linux]
|
|
||||||
name: build rustdesk android apk ${{ matrix.job.target }} (${{ matrix.job.os }}) [${{ matrix.job.extra-build-features }}]
|
|
||||||
runs-on: ${{ matrix.job.os }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
job:
|
job:
|
||||||
- {
|
- {
|
||||||
arch: aarch64,
|
target: x86_64-unknown-linux-gnu,
|
||||||
target: aarch64-linux-android,
|
distro: ubuntu18.04,
|
||||||
os: ubuntu-20.04,
|
on: ubuntu-20.04,
|
||||||
extra-build-features: "",
|
arch: x86_64,
|
||||||
openssl-arch: android-arm64,
|
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
arch: armv7,
|
target: aarch64-unknown-linux-gnu,
|
||||||
target: armv7-linux-androideabi,
|
# try out newer flatpak since error of "error: Nothing matches org.freedesktop.Platform in remote flathub"
|
||||||
os: ubuntu-20.04,
|
distro: ubuntu22.04,
|
||||||
extra-build-features: "",
|
on: [self-hosted, Linux, ARM64],
|
||||||
openssl-arch: android-arm,
|
arch: aarch64,
|
||||||
}
|
}
|
||||||
steps:
|
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: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y \
|
|
||||||
clang \
|
|
||||||
cmake \
|
|
||||||
curl \
|
|
||||||
gcc-multilib \
|
|
||||||
git \
|
|
||||||
g++ \
|
|
||||||
g++-multilib \
|
|
||||||
libappindicator3-dev \
|
|
||||||
libasound2-dev \
|
|
||||||
libc6-dev \
|
|
||||||
libclang-10-dev \
|
|
||||||
libclang-dev \
|
|
||||||
libgstreamer1.0-dev \
|
|
||||||
libgstreamer-plugins-base1.0-dev \
|
|
||||||
libgtk-3-dev \
|
|
||||||
libpam0g-dev \
|
|
||||||
libpulse-dev \
|
|
||||||
libva-dev \
|
|
||||||
libvdpau-dev \
|
|
||||||
libxcb-randr0-dev \
|
|
||||||
libxcb-shape0-dev \
|
|
||||||
libxcb-xfixes0-dev \
|
|
||||||
libxdo-dev \
|
|
||||||
libxfixes-dev \
|
|
||||||
llvm-10-dev \
|
|
||||||
llvm-dev \
|
|
||||||
nasm \
|
|
||||||
ninja-build \
|
|
||||||
openjdk-11-jdk-headless \
|
|
||||||
pkg-config \
|
|
||||||
tree \
|
|
||||||
wget
|
|
||||||
|
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install flutter
|
|
||||||
uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
channel: "stable"
|
|
||||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
||||||
- uses: nttld/setup-ndk@v1
|
|
||||||
id: setup-ndk
|
|
||||||
with:
|
|
||||||
ndk-version: ${{ env.NDK_VERSION }}
|
|
||||||
add-to-path: true
|
|
||||||
|
|
||||||
- name: Setup vcpkg with Github Actions binary cache
|
- name: Rename Binary
|
||||||
uses: lukka/run-vcpkg@v11
|
|
||||||
with:
|
|
||||||
vcpkgDirectory: /opt/artifacts/vcpkg
|
|
||||||
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
|
|
||||||
|
|
||||||
- name: Install vcpkg dependencies
|
|
||||||
run: |
|
run: |
|
||||||
case ${{ matrix.job.target }} in
|
apt update -y
|
||||||
aarch64-linux-android)
|
apt install -y wget
|
||||||
./flutter/build_android_deps.sh arm64-v8a
|
wget https://github.com/rustdesk/rustdesk/releases/download/nightly/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.deb
|
||||||
;;
|
mv rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.deb rustdesk-${{ env.VERSION }}.deb
|
||||||
armv7-linux-androideabi)
|
|
||||||
./flutter/build_android_deps.sh armeabi-v7a
|
- name: Patch archlinux PKGBUILD
|
||||||
;;
|
run: |
|
||||||
|
sed -i "s/x86_64/${{ matrix.job.arch }}/g" res/PKGBUILD
|
||||||
|
if [[ "${{ matrix.job.arch }}" == "aarch64" ]]; then
|
||||||
|
sed -i "s/linux\/x64/linux\/arm64/g" ./res/PKGBUILD
|
||||||
|
fi
|
||||||
|
bsdtar -zxvf rustdesk-${{ env.VERSION }}.deb
|
||||||
|
tar -xvf ./data.tar.xz
|
||||||
|
case ${{ matrix.job.arch }} in
|
||||||
|
aarch64)
|
||||||
|
mkdir -p flutter/build/linux/arm64/release/bundle
|
||||||
|
cp -rf usr/lib/rustdesk/* flutter/build/linux/arm64/release/bundle/
|
||||||
|
;;
|
||||||
|
x86_64)
|
||||||
|
mkdir -p flutter/build/linux/x64/release/bundle
|
||||||
|
cp -rf usr/lib/rustdesk/* flutter/build/linux/x64/release/bundle/
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
- name: Build archlinux package
|
||||||
|
uses: rustdesk-org/arch-makepkg-action@master
|
||||||
|
with:
|
||||||
|
packages: >
|
||||||
|
llvm
|
||||||
|
clang
|
||||||
|
libva
|
||||||
|
libvdpau
|
||||||
|
rust
|
||||||
|
gstreamer
|
||||||
|
unzip
|
||||||
|
git
|
||||||
|
cmake
|
||||||
|
gcc
|
||||||
|
curl
|
||||||
|
wget
|
||||||
|
nasm
|
||||||
|
zip
|
||||||
|
make
|
||||||
|
pkg-config
|
||||||
|
clang
|
||||||
|
gtk3
|
||||||
|
xdotool
|
||||||
|
libxcb
|
||||||
|
libxfixes
|
||||||
|
alsa-lib
|
||||||
|
pipewire
|
||||||
|
python
|
||||||
|
ttf-arphic-uming
|
||||||
|
libappindicator-gtk3
|
||||||
|
pam
|
||||||
|
gst-plugins-base
|
||||||
|
gst-plugin-pipewire
|
||||||
|
scripts: |
|
||||||
|
cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f
|
||||||
|
|
||||||
|
- name: Publish archlinux package
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
prerelease: true
|
||||||
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
|
files: |
|
||||||
|
res/rustdesk-${{ env.VERSION }}*.zst
|
||||||
|
|
||||||
|
- name: Build appimage package
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Restore bridge files
|
|
||||||
uses: actions/download-artifact@master
|
|
||||||
with:
|
|
||||||
name: bridge-artifact
|
|
||||||
path: ./
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: ${{ env.RUST_VERSION }}
|
|
||||||
components: "rustfmt"
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
prefix-key: rustdesk-lib-cache-android # TODO: drop '-android' part after caches are invalidated
|
|
||||||
key: ${{ matrix.job.target }}-${{ matrix.job.extra-build-features }}
|
|
||||||
|
|
||||||
- name: Build rustdesk lib
|
|
||||||
env:
|
|
||||||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
||||||
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
||||||
run: |
|
run: |
|
||||||
rustup target add ${{ matrix.job.target }}
|
# set-up appimage-builder
|
||||||
cargo install cargo-ndk --version ${{ env.CARGO_NDK_VERSION }}
|
pushd /tmp
|
||||||
case ${{ matrix.job.target }} in
|
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
|
||||||
aarch64-linux-android)
|
chmod +x appimage-builder-x86_64.AppImage
|
||||||
./flutter/ndk_arm64.sh
|
sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder
|
||||||
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
|
|
||||||
|
|
||||||
- name: Build rustdesk
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64
|
|
||||||
run: |
|
|
||||||
export PATH=/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH
|
|
||||||
# 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 ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so ./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.arch }}.apk
|
|
||||||
;;
|
|
||||||
armv7-linux-androideabi)
|
|
||||||
mkdir -p ./flutter/android/app/src/main/jniLibs/armeabi-v7a
|
|
||||||
cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/libc++_shared.so ./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.arch }}.apk
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
popd
|
popd
|
||||||
mkdir -p signed-apk; pushd signed-apk
|
# run appimage-builder
|
||||||
mv ../rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.apk .
|
pushd appimage
|
||||||
|
sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-${{ matrix.job.arch }}.yml
|
||||||
|
|
||||||
- uses: r0adkll/sign-android-release@v1
|
- uses: rustdesk-org/run-on-arch-action@amd64-support
|
||||||
name: Sign app APK
|
name: Build rustdesk flatpak package for ${{ matrix.job.arch }}
|
||||||
if: env.ANDROID_SIGNING_KEY != null
|
id: rpm
|
||||||
id: sign-rustdesk
|
|
||||||
with:
|
with:
|
||||||
releaseDirectory: ./signed-apk
|
arch: ${{ matrix.job.arch }}
|
||||||
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
|
distro: ${{ matrix.job.distro }}
|
||||||
alias: ${{ secrets.ANDROID_ALIAS }}
|
githubToken: ${{ github.token }}
|
||||||
keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }}
|
setup: |
|
||||||
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}
|
ls -l "${PWD}"
|
||||||
env:
|
dockerRunArgs: |
|
||||||
# override default build-tools version (29.0.3) -- optional
|
--volume "${PWD}:/workspace"
|
||||||
BUILD_TOOLS_VERSION: "30.0.2"
|
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: Upload Artifacts
|
- name: Publish flatpak package
|
||||||
if: env.ANDROID_SIGNING_KEY != null && env.UPLOAD_ARTIFACT == 'true'
|
|
||||||
uses: actions/upload-artifact@master
|
|
||||||
with:
|
|
||||||
name: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.apk
|
|
||||||
path: ${{steps.sign-rustdesk.outputs.signedReleaseFile}}
|
|
||||||
|
|
||||||
- name: Publish signed apk package
|
|
||||||
if: env.ANDROID_SIGNING_KEY != null
|
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
files: |
|
files: |
|
||||||
${{steps.sign-rustdesk.outputs.signedReleaseFile}}
|
flatpak/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.flatpak
|
||||||
|
|
||||||
- name: Publish unsigned apk package
|
|
||||||
if: env.ANDROID_SIGNING_KEY == null && env.UPLOAD_ARTIFACT == 'true'
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
prerelease: true
|
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
|
||||||
files: |
|
|
||||||
signed-apk/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.apk
|
|
||||||
|
25
.github/workflows/flutter-build.yml
vendored
25
.github/workflows/flutter-build.yml
vendored
@ -1431,6 +1431,18 @@ jobs:
|
|||||||
if [[ "${{ matrix.job.arch }}" == "aarch64" ]]; then
|
if [[ "${{ matrix.job.arch }}" == "aarch64" ]]; then
|
||||||
sed -i "s/linux\/x64/linux\/arm64/g" ./res/PKGBUILD
|
sed -i "s/linux\/x64/linux\/arm64/g" ./res/PKGBUILD
|
||||||
fi
|
fi
|
||||||
|
bsdtar -zxvf rustdesk-${{ env.VERSION }}.deb
|
||||||
|
tar -xvf ./data.tar.xz
|
||||||
|
case ${{ matrix.job.arch }} in
|
||||||
|
aarch64)
|
||||||
|
mkdir -p flutter/build/linux/arm64/release/bundle
|
||||||
|
cp -rf usr/lib/rustdesk/* flutter/build/linux/arm64/release/bundle/
|
||||||
|
;;
|
||||||
|
x86_64)
|
||||||
|
mkdir -p flutter/build/linux/x64/release/bundle
|
||||||
|
cp -rf usr/lib/rustdesk/* flutter/build/linux/x64/release/bundle/
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
- name: Build archlinux package
|
- name: Build archlinux package
|
||||||
uses: rustdesk-org/arch-makepkg-action@master
|
uses: rustdesk-org/arch-makepkg-action@master
|
||||||
@ -1466,18 +1478,6 @@ jobs:
|
|||||||
gst-plugins-base
|
gst-plugins-base
|
||||||
gst-plugin-pipewire
|
gst-plugin-pipewire
|
||||||
scripts: |
|
scripts: |
|
||||||
bsdtar -zxvf rustdesk-${{ env.VERSION }}.deb
|
|
||||||
tar -xvf ./data.tar.xz
|
|
||||||
case ${{ matrix.job.arch }} in
|
|
||||||
aarch64)
|
|
||||||
mkdir -p flutter/build/linux/arm64/release/bundle
|
|
||||||
cp -rf usr/lib/rustdesk/* flutter/build/linux/arm64/release/bundle/
|
|
||||||
;;
|
|
||||||
x86_64)
|
|
||||||
mkdir -p flutter/build/linux/x64/release/bundle
|
|
||||||
cp -rf usr/lib/rustdesk/* flutter/build/linux/x64/release/bundle/
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f
|
cd res && HBB=`pwd`/.. FLUTTER=1 makepkg -f
|
||||||
|
|
||||||
- name: Publish archlinux package
|
- name: Publish archlinux package
|
||||||
@ -1549,7 +1549,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Publish flatpak package
|
- name: Publish flatpak package
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: env.UPLOAD_ARTIFACT == 'true'
|
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user