2023-03-23 10:04:44 +08:00
|
|
|
name: Build vcpkg dependencies for linux clients
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-vcpkg-deps-linux:
|
|
|
|
runs-on: ${{ matrix.job.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
|
|
|
matrix:
|
|
|
|
job:
|
2023-03-27 15:26:20 +08:00
|
|
|
- { arch: armv7, os: ubuntu-20.04 }
|
2023-03-23 10:04:44 +08:00
|
|
|
- { arch: x86_64, os: ubuntu-20.04 }
|
|
|
|
- { arch: aarch64, os: ubuntu-20.04 }
|
|
|
|
steps:
|
|
|
|
- name: Create vcpkg artifacts folder
|
|
|
|
run: mkdir -p /opt/artifacts
|
|
|
|
|
|
|
|
- name: Cache Vcpkg
|
|
|
|
id: cache-vcpkg
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: /opt/artifacts
|
|
|
|
key: vcpkg-${{ matrix.job.arch }}
|
|
|
|
|
2023-09-14 11:32:58 +08:00
|
|
|
- uses: rustdesk-org/run-on-arch-action@amd64-support
|
2023-03-23 10:04:44 +08:00
|
|
|
name: Run vcpkg install on ${{ matrix.job.arch }}
|
|
|
|
id: vcpkg
|
|
|
|
with:
|
|
|
|
arch: ${{ matrix.job.arch }}
|
|
|
|
distro: ubuntu18.04
|
|
|
|
githubToken: ${{ github.token }}
|
|
|
|
setup: |
|
|
|
|
ls -l "/opt/artifacts"
|
|
|
|
dockerRunArgs: |
|
|
|
|
--volume "/opt/artifacts:/artifacts"
|
|
|
|
shell: /bin/bash
|
|
|
|
install: |
|
|
|
|
apt update -y
|
|
|
|
case "${{ matrix.job.arch }}" in
|
|
|
|
x86_64)
|
|
|
|
apt update -y
|
2023-09-14 12:03:14 +08:00
|
|
|
apt install -y curl zip unzip tar git g++ gcc build-essential pkg-config wget nasm yasm ninja-build libjpeg8-dev libssl-dev
|
2023-09-16 15:04:06 +08:00
|
|
|
wget https://github.com/Kitware/CMake/releases/download/v3.27.5/cmake-3.27.5.tar.gz
|
2023-09-14 12:03:14 +08:00
|
|
|
apt remove -y --purge cmake
|
2023-09-16 15:04:06 +08:00
|
|
|
tar -zxvf cmake-3.27.5.tar.gz
|
|
|
|
cd cmake-3.27.5
|
2023-09-14 12:03:14 +08:00
|
|
|
./bootstrap
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
cd -
|
2023-03-27 15:26:20 +08:00
|
|
|
cmake --version
|
|
|
|
gcc -v
|
2023-03-23 10:04:44 +08:00
|
|
|
;;
|
|
|
|
aarch64|armv7)
|
2023-03-27 15:26:20 +08:00
|
|
|
apt install -y curl zip unzip git
|
2023-03-23 10:04:44 +08:00
|
|
|
esac
|
|
|
|
run: |
|
|
|
|
# disable git safe.directory
|
|
|
|
git config --global --add safe.directory "*"
|
|
|
|
case "${{ matrix.job.arch }}" in
|
|
|
|
x86_64)
|
|
|
|
export VCPKG_FORCE_SYSTEM_BINARIES=1
|
|
|
|
pushd /artifacts
|
|
|
|
git clone https://github.com/microsoft/vcpkg.git || true
|
|
|
|
pushd vcpkg
|
|
|
|
git reset --hard ${{ env.VCPKG_COMMIT_ID }}
|
|
|
|
./bootstrap-vcpkg.sh
|
2023-05-09 11:40:33 +08:00
|
|
|
./vcpkg install libvpx libyuv opus aom
|
2023-03-23 10:04:44 +08:00
|
|
|
;;
|
2023-03-27 15:26:20 +08:00
|
|
|
aarch64)
|
|
|
|
pushd /artifacts
|
|
|
|
rm -rf rustdesk_thirdparty_lib
|
|
|
|
git clone https://github.com/Kingtous/rustdesk_thirdparty_lib.git --depth=1
|
|
|
|
mkdir -p /artifacts/vcpkg/installed
|
|
|
|
mv ./rustdesk_thirdparty_lib/vcpkg/installed/arm64-linux /artifacts/vcpkg/installed/arm64-linux
|
|
|
|
;;
|
|
|
|
armv7)
|
2023-03-23 10:04:44 +08:00
|
|
|
pushd /artifacts
|
2023-03-27 15:26:20 +08:00
|
|
|
rm -rf rustdesk_thirdparty_lib
|
|
|
|
git clone https://github.com/Kingtous/rustdesk_thirdparty_lib.git --depth=1
|
2023-03-23 10:04:44 +08:00
|
|
|
mkdir -p /artifacts/vcpkg/installed
|
2023-03-27 15:26:20 +08:00
|
|
|
mv ./rustdesk_thirdparty_lib/vcpkg/installed/arm-linux /artifacts/vcpkg/installed/arm-linux
|
2023-03-23 10:04:44 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@master
|
|
|
|
with:
|
|
|
|
name: vcpkg-artifact-${{ matrix.job.arch }}
|
|
|
|
path: |
|
2023-09-14 11:32:58 +08:00
|
|
|
/opt/artifacts/vcpkg/installed
|