fix: ci
This commit is contained in:
parent
98705bb759
commit
1ab65563a4
159
.github/workflows/flutter-nightly.yml
vendored
159
.github/workflows/flutter-nightly.yml
vendored
@ -229,22 +229,22 @@ jobs:
|
|||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
install: |
|
install: |
|
||||||
apt update -y
|
apt update -y
|
||||||
case "${arch}" in
|
case "${{ matrix.job.arch }}" in
|
||||||
x86_64)
|
x86_64)
|
||||||
# CMake 3.15+
|
# CMake 3.15+
|
||||||
apt install -y gpg wget ca-certificates
|
apt install -y gpg wget ca-certificates
|
||||||
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
|
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
|
||||||
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
|
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install -y curl zip unzip tar git cmake g++ gcc build-essential pkg-config wget nasm yasm ninja-build
|
apt install -y curl zip unzip tar git cmake g++ gcc build-essential pkg-config wget nasm yasm ninja-build libjpeg8-dev
|
||||||
;;
|
;;
|
||||||
aarch64|armv7)
|
aarch64|armv7)
|
||||||
apt install -y curl zip unzip tar git cmake g++ gcc build-essential pkg-config wget nasm yasm ninja-build
|
apt install -y curl zip unzip tar git cmake g++ gcc build-essential pkg-config wget nasm yasm ninja-build libjpeg8-dev
|
||||||
esac
|
esac
|
||||||
cmake --version
|
cmake --version
|
||||||
gcc -v
|
gcc -v
|
||||||
run: |
|
run: |
|
||||||
case "${arch}" in
|
case "${{ matrix.job.arch }}" in
|
||||||
x86_64)
|
x86_64)
|
||||||
export VCPKG_FORCE_SYSTEM_BINARIES=1
|
export VCPKG_FORCE_SYSTEM_BINARIES=1
|
||||||
pushd /artifacts
|
pushd /artifacts
|
||||||
@ -256,12 +256,13 @@ jobs:
|
|||||||
./vcpkg install libvpx libyuv opus
|
./vcpkg install libvpx libyuv opus
|
||||||
;;
|
;;
|
||||||
aarch64|armv7)
|
aarch64|armv7)
|
||||||
git clone https://chromium.googlesource.com/libyuv/libyuv
|
git clone https://chromium.googlesource.com/libyuv/libyuv || true
|
||||||
pushd libyuv
|
pushd libyuv
|
||||||
|
git pull
|
||||||
mkdir build
|
mkdir build
|
||||||
pushd build
|
pushd build
|
||||||
mkdir -p /opt/artifacts/vcpkg/installed
|
mkdir -p /artifacts/vcpkg/installed
|
||||||
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/artifacts/vcpkg/installed
|
cmake .. -DCMAKE_INSTALL_PREFIX=/artifacts/vcpkg/installed
|
||||||
make -j4 && make install
|
make -j4 && make install
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -350,8 +351,8 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
job:
|
job:
|
||||||
# - { arch: aarch64, target: aarch64-unknown-linux-gnu , os: ubuntu-18.04, use-cross: true, extra-build-features: "" }
|
- { arch: aarch64, target: aarch64-unknown-linux-gnu , os: ubuntu-18.04, use-cross: true, extra-build-features: "" }
|
||||||
# - { arch: aarch64, target: aarch64-unknown-linux-gnu , os: ubuntu-18.04, use-cross: true, extra-build-features: "flatpak" }
|
- { arch: aarch64, target: aarch64-unknown-linux-gnu , os: ubuntu-18.04, use-cross: true, extra-build-features: "flatpak" }
|
||||||
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-18.04, use-cross: true, extra-build-features: "" }
|
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-18.04, use-cross: true, extra-build-features: "" }
|
||||||
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-18.04, use-cross: true, extra-build-features: "flatpak" }
|
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-18.04, use-cross: true, extra-build-features: "flatpak" }
|
||||||
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
|
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
|
||||||
@ -374,17 +375,17 @@ jobs:
|
|||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
# - name: Install Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
# uses: actions-rs/toolchain@v1
|
||||||
with:
|
# with:
|
||||||
toolchain: stable
|
# toolchain: stable
|
||||||
target: ${{ matrix.job.target }}
|
# target: ${{ matrix.job.target }}
|
||||||
override: true
|
# override: true
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
# profile: minimal # minimal component installation (ie, no documentation)
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
# - uses: Swatinem/rust-cache@v2
|
||||||
with:
|
# with:
|
||||||
prefix-key: bridge-${{ matrix.job.os }}
|
# prefix-key: bridge-${{ matrix.job.os }}
|
||||||
|
|
||||||
- name: Disable rust bridge build
|
- name: Disable rust bridge build
|
||||||
run: |
|
run: |
|
||||||
@ -402,26 +403,56 @@ jobs:
|
|||||||
name: vcpkg-artifact-${{ matrix.job.arch }}
|
name: vcpkg-artifact-${{ matrix.job.arch }}
|
||||||
path: /opt/artifacts/vcpkg/installed
|
path: /opt/artifacts/vcpkg/installed
|
||||||
|
|
||||||
- name: Output devs
|
- uses: Kingtous/run-on-arch-action@amd64-support
|
||||||
run: |
|
name: Build rustdesk library for ${{ matrix.job.arch }}
|
||||||
ls -l ./
|
id: vcpkg
|
||||||
tree -L 3 /opt/artifacts/vcpkg/installed
|
with:
|
||||||
|
arch: ${{ matrix.job.arch }}
|
||||||
- name: Install prerequisites
|
distro: ubuntu18.04
|
||||||
run: |
|
githubToken: ${{ github.token }}
|
||||||
sudo apt update -y
|
setup: |
|
||||||
case ${{ matrix.job.target }} in
|
ls -l "${PWD}"
|
||||||
x86_64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt install -y g++ gcc;;
|
dockerRunArgs: |
|
||||||
arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
|
--volume "${PWD}:/workspace"
|
||||||
aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
|
--volume "/opt/artifacts:/opt/artifacts"
|
||||||
esac
|
shell: /bin/bash
|
||||||
# common package
|
install: |
|
||||||
sudo apt install -y git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree
|
apt update -y
|
||||||
|
apt install -y -qq git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ gcc libvpx-dev libopus-dev tree
|
||||||
- name: Build rustdesk lib
|
# output devs
|
||||||
run: |
|
ls -l ./
|
||||||
export VCPKG_ROOT=/opt/artifacts/vcpkg
|
tree -L 3 /opt/artifacts/vcpkg/installed
|
||||||
cargo build --lib --features hwcodec,flutter,${{ matrix.job.extra-build-features }} --release
|
run: |
|
||||||
|
# disable git safe.directory
|
||||||
|
git config --global --add safe.directory "*"
|
||||||
|
# rust
|
||||||
|
pushd /opt
|
||||||
|
wget -O rust.tar.gz https://static.rust-lang.org/dist/rust-1.65.0-${{ matrix.job.target }}.tar.gz
|
||||||
|
tar -zxvf rust.tar.gz > /dev/null
|
||||||
|
cd rust-1.65.0-${{ matrix.job.target }} && ./install.sh
|
||||||
|
pushd /workspace
|
||||||
|
# mock
|
||||||
|
case "${{ matrix.job.arch }}" in
|
||||||
|
x86_64)
|
||||||
|
# no need mock on x86_64
|
||||||
|
export VCPKG_ROOT=/opt/artifacts/vcpkg
|
||||||
|
;;
|
||||||
|
aarch64)
|
||||||
|
cp -r /opt/artifacts/vcpkg/installed/* /usr
|
||||||
|
mkdir -p /vcpkg/installed/arm64-linux
|
||||||
|
ln -s /usr/lib /vcpkg/installed/arm64-linux/lib
|
||||||
|
ln -s /usr/include /vcpkg/installed/arm64-linux/include
|
||||||
|
export VCPKG_ROOT=/vcpkg
|
||||||
|
;;
|
||||||
|
armv7)
|
||||||
|
cp -r /opt/artifacts/vcpkg/installed/* /usr
|
||||||
|
mkdir -p /vcpkg/installed/arm-linux
|
||||||
|
ln -s /usr/lib /vcpkg/installed/arm-linux/lib
|
||||||
|
ln -s /usr/include /vcpkg/installed/arm-linux/include
|
||||||
|
export VCPKG_ROOT=/vcpkg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
cargo build --lib --features hwcodec,flutter,${{ matrix.job.extra-build-features }} --release
|
||||||
|
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
@ -437,8 +468,8 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
job:
|
job:
|
||||||
# - { arch: aarch64, target: aarch64-unknown-linux-gnu , os: ubuntu-18.04, use-cross: true, extra-build-features: "" }
|
- { arch: aarch64, target: aarch64-unknown-linux-gnu , os: ubuntu-18.04, use-cross: true, extra-build-features: "" }
|
||||||
# - { arch: aarch64, target: aarch64-unknown-linux-gnu , os: ubuntu-18.04, use-cross: true, extra-build-features: "flatpak" }
|
- { arch: aarch64, target: aarch64-unknown-linux-gnu , os: ubuntu-18.04, use-cross: true, extra-build-features: "flatpak" }
|
||||||
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-18.04, use-cross: true, extra-build-features: "" }
|
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-18.04, use-cross: true, extra-build-features: "" }
|
||||||
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-18.04, use-cross: true, extra-build-features: "flatpak" }
|
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-18.04, use-cross: true, extra-build-features: "flatpak" }
|
||||||
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
|
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
|
||||||
@ -470,7 +501,7 @@ jobs:
|
|||||||
- name: Prepare env
|
- name: Prepare env
|
||||||
run: |
|
run: |
|
||||||
sudo apt update -y
|
sudo apt update -y
|
||||||
sudo apt install -y git curl wget nasm yasm libgtk-3-dev
|
sudo apt install -y -qq git curl wget nasm yasm libgtk-3-dev
|
||||||
mkdir -p ./target/release/
|
mkdir -p ./target/release/
|
||||||
|
|
||||||
- name: Restore the rustdesk lib file
|
- name: Restore the rustdesk lib file
|
||||||
@ -494,7 +525,7 @@ jobs:
|
|||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
install: |
|
install: |
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install -y git cmake g++ gcc build-essential nasm yasm curl unzip xz-utils python3 wget pkg-config ninja-build pkg-config libgtk-3-dev liblzma-dev clang libappindicator3-dev
|
apt install -y -qq git cmake g++ gcc build-essential nasm yasm curl unzip xz-utils python3 wget pkg-config ninja-build pkg-config libgtk-3-dev liblzma-dev clang libappindicator3-dev
|
||||||
run: |
|
run: |
|
||||||
# disable git safe.directory
|
# disable git safe.directory
|
||||||
git config --global --add safe.directory "*"
|
git config --global --add safe.directory "*"
|
||||||
@ -579,16 +610,36 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
res/rustdesk*.zst
|
res/rustdesk*.zst
|
||||||
|
|
||||||
- name: Make RPM package
|
- uses: Kingtous/run-on-arch-action@amd64-support
|
||||||
shell: bash
|
name: Build rustdesk rpm package for ${{ matrix.job.arch }}
|
||||||
if: ${{ matrix.job.extra-build-features == '' }}
|
id: rpm
|
||||||
run: |
|
with:
|
||||||
sudo apt install -y rpm
|
arch: ${{ matrix.job.arch }}
|
||||||
HBB=`pwd` rpmbuild ./res/rpm-flutter.spec -bb
|
distro: ubuntu18.04
|
||||||
pushd ~/rpmbuild/RPMS/${{ matrix.job.arch }}
|
githubToken: ${{ github.token }}
|
||||||
for name in rustdesk*??.rpm; do
|
setup: |
|
||||||
mv "$name" "${name%%.rpm}-fedora28-centos8.rpm"
|
ls -l "${PWD}"
|
||||||
done
|
dockerRunArgs: |
|
||||||
|
--volume "${PWD}:/workspace"
|
||||||
|
--volume "/opt/artifacts:/opt/artifacts"
|
||||||
|
shell: /bin/bash
|
||||||
|
install: |
|
||||||
|
apt update -y
|
||||||
|
apt install -y rpm
|
||||||
|
run: |
|
||||||
|
pushd /workspace
|
||||||
|
case ${{ matrix.job.arch }}
|
||||||
|
armv7)
|
||||||
|
sed -i "s/64bit/32bit/g" ./res/rpm-flutter.spec
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
HBB=`pwd` rpmbuild ./res/rpm-flutter.spec -bb
|
||||||
|
pushd ~/rpmbuild/RPMS/${{ matrix.job.arch }}
|
||||||
|
mkdir -p /opt/artifacts/rpm
|
||||||
|
for name in rustdesk*??.rpm; do
|
||||||
|
mv "$name" "/opt/artifacts/rpm/${name%%.rpm}-fedora28-centos8.rpm"
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
- name: Publish fedora28/centos8 package
|
- name: Publish fedora28/centos8 package
|
||||||
if: ${{ matrix.job.extra-build-features == '' }}
|
if: ${{ matrix.job.extra-build-features == '' }}
|
||||||
@ -597,7 +648,7 @@ jobs:
|
|||||||
prerelease: true
|
prerelease: true
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
files: |
|
files: |
|
||||||
/home/runner/rpmbuild/RPMS/${{ matrix.job.arch }}/*.rpm
|
/opt/artifacts/rpm/*.rpm
|
||||||
|
|
||||||
build-flatpak:
|
build-flatpak:
|
||||||
name: Build Flatpak
|
name: Build Flatpak
|
||||||
|
Loading…
x
Reference in New Issue
Block a user