Add built CMake to PATH in actual RD build step (#8855)
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
This commit is contained in:
parent
aa42bf548e
commit
f67f2be0cb
54
.github/workflows/flutter-build.yml
vendored
54
.github/workflows/flutter-build.yml
vendored
@ -22,6 +22,7 @@ env:
|
|||||||
RUST_VERSION: "1.75" # sciter failed on m1 with 1.78 because of https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
|
RUST_VERSION: "1.75" # sciter failed on m1 with 1.78 because of https://blog.rust-lang.org/2024/03/30/i128-layout-update.html
|
||||||
CARGO_NDK_VERSION: "3.1.2"
|
CARGO_NDK_VERSION: "3.1.2"
|
||||||
SCITER_ARMV7_CMAKE_VERSION: "3.29.7"
|
SCITER_ARMV7_CMAKE_VERSION: "3.29.7"
|
||||||
|
SCITER_NASM_DEBVERSION: "2.14-1"
|
||||||
LLVM_VERSION: "15.0.6"
|
LLVM_VERSION: "15.0.6"
|
||||||
FLUTTER_VERSION: "3.19.6"
|
FLUTTER_VERSION: "3.19.6"
|
||||||
ANDROID_FLUTTER_VERSION: "3.13.9" # >= 3.16 is very slow on my android phone, but work well on most of others. We may switch to new flutter after changing to texture rendering (I believe it can solve my problem).
|
ANDROID_FLUTTER_VERSION: "3.13.9" # >= 3.16 is very slow on my android phone, but work well on most of others. We may switch to new flutter after changing to texture rendering (I believe it can solve my problem).
|
||||||
@ -1384,14 +1385,12 @@ jobs:
|
|||||||
wget \
|
wget \
|
||||||
xz-utils \
|
xz-utils \
|
||||||
zip
|
zip
|
||||||
# install newer nasm for aom
|
# arm-linux needs CMake and vcokg built from source as there
|
||||||
wget --output-document nasm.deb "http://ftp.us.debian.org/debian/pool/main/n/nasm/nasm_2.14-1_${{ matrix.job.deb_arch }}.deb"
|
# are no prebuilts available from Kitware and Microsoft
|
||||||
dpkg -i nasm.deb
|
|
||||||
rm -f nasm.deb
|
|
||||||
# install {gcc,g++}-8 and prebuilt cmake to build vcpkg executable on arm-linux
|
|
||||||
if [ "${{ matrix.job.vcpkg-triplet }}" = "arm-linux" ]; then
|
if [ "${{ matrix.job.vcpkg-triplet }}" = "arm-linux" ]; then
|
||||||
apt-get install -y gcc-8 g++-8
|
# install gcc/g++ 8 for vcpkg and OpenSSL headers for CMake
|
||||||
apt-get install -y libssl-dev
|
apt-get install -y gcc-8 g++-8 libssl-dev
|
||||||
|
# bootstrap CMake amd add it to PATH
|
||||||
git clone --depth 1 https://github.com/kitware/cmake -b "v${{ env.SCITER_ARMV7_CMAKE_VERSION }}" /tmp/cmake
|
git clone --depth 1 https://github.com/kitware/cmake -b "v${{ env.SCITER_ARMV7_CMAKE_VERSION }}" /tmp/cmake
|
||||||
pushd /tmp/cmake
|
pushd /tmp/cmake
|
||||||
./bootstrap --generator='Unix Makefiles' "--prefix=/opt/cmake-${{ env.SCITER_ARMV7_CMAKE_VERSION }}-linux-armhf"
|
./bootstrap --generator='Unix Makefiles' "--prefix=/opt/cmake-${{ env.SCITER_ARMV7_CMAKE_VERSION }}-linux-armhf"
|
||||||
@ -1400,19 +1399,14 @@ jobs:
|
|||||||
rm -rf /tmp/cmake
|
rm -rf /tmp/cmake
|
||||||
export PATH="/opt/cmake-${{ env.SCITER_ARMV7_CMAKE_VERSION }}-linux-armhf/bin:$PATH"
|
export PATH="/opt/cmake-${{ env.SCITER_ARMV7_CMAKE_VERSION }}-linux-armhf/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
run: |
|
# bootstrap vcpkg and set VCPKG_ROOT
|
||||||
# disable git safe.directory
|
|
||||||
git config --global --add safe.directory "*"
|
|
||||||
# Set python3.7 as default python3
|
|
||||||
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
|
|
||||||
# vcpkg
|
|
||||||
export VCPKG_ROOT=/opt/artifacts/vcpkg
|
export VCPKG_ROOT=/opt/artifacts/vcpkg
|
||||||
pushd /opt/artifacts
|
pushd /opt/artifacts
|
||||||
rm -rf vcpkg
|
rm -rf vcpkg
|
||||||
git clone https://github.com/microsoft/vcpkg
|
git clone https://github.com/microsoft/vcpkg
|
||||||
pushd vcpkg
|
pushd vcpkg
|
||||||
git reset --hard ${{ env.VCPKG_COMMIT_ID }}
|
git reset --hard ${{ env.VCPKG_COMMIT_ID }}
|
||||||
# Build vcpkg helper executable with gcc-8 for arm-linux but use prebuilt one on x64-linux
|
# build vcpkg helper executable with gcc-8 for arm-linux but use prebuilt one on x64-linux
|
||||||
if [ "${{ matrix.job.vcpkg-triplet }}" = "arm-linux" ]; then
|
if [ "${{ matrix.job.vcpkg-triplet }}" = "arm-linux" ]; then
|
||||||
CC=/usr/bin/gcc-8 CXX=/usr/bin/g++-8 sh bootstrap-vcpkg.sh -disableMetrics
|
CC=/usr/bin/gcc-8 CXX=/usr/bin/g++-8 sh bootstrap-vcpkg.sh -disableMetrics
|
||||||
export VCPKG_FORCE_SYSTEM_BINARIES=1
|
export VCPKG_FORCE_SYSTEM_BINARIES=1
|
||||||
@ -1421,28 +1415,44 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
popd
|
popd
|
||||||
popd
|
popd
|
||||||
$VCPKG_ROOT/vcpkg install --triplet ${{ matrix.job.vcpkg-triplet }} --x-install-root="$VCPKG_ROOT/installed"
|
|
||||||
# rust
|
# rust
|
||||||
pushd /opt
|
pushd /opt
|
||||||
# do not use rustup, because memory overflow in qemu
|
# do not use rustup, because memory overflow in qemu
|
||||||
wget -O rust.tar.gz https://static.rust-lang.org/dist/rust-${{env.RUST_TOOLCHAIN_VERSION}}-${{ matrix.job.target }}.tar.gz
|
wget --output-document rust.tar.gz https://static.rust-lang.org/dist/rust-${{env.RUST_TOOLCHAIN_VERSION}}-${{ matrix.job.target }}.tar.gz
|
||||||
tar -zxvf rust.tar.gz > /dev/null && rm rust.tar.gz
|
tar -zxvf rust.tar.gz > /dev/null && rm rust.tar.gz
|
||||||
cd rust-${{env.RUST_TOOLCHAIN_VERSION}}-${{ matrix.job.target }} && ./install.sh
|
pushd rust-${{env.RUST_TOOLCHAIN_VERSION}}-${{ matrix.job.target }}
|
||||||
|
./install.sh
|
||||||
|
popd
|
||||||
rm -rf rust-${{env.RUST_TOOLCHAIN_VERSION}}-${{ matrix.job.target }}
|
rm -rf rust-${{env.RUST_TOOLCHAIN_VERSION}}-${{ matrix.job.target }}
|
||||||
# edit config
|
popd
|
||||||
|
# install newer nasm for aom
|
||||||
|
wget --output-document nasm.deb "http://ftp.us.debian.org/debian/pool/main/n/nasm/nasm_${{ env.SCITER_NASM_DEBVERSION }}_${{ matrix.job.deb_arch }}.deb"
|
||||||
|
dpkg -i nasm.deb
|
||||||
|
rm -f nasm.deb
|
||||||
|
run: |
|
||||||
|
# disable git safe.directory
|
||||||
|
git config --global --add safe.directory "*"
|
||||||
|
# set python3.7 as default python3
|
||||||
|
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
|
||||||
|
# add built CMake to PATH for arm-linux
|
||||||
|
if [ "${{ matrix.job.vcpkg-triplet }}" = "arm-linux" ]; then
|
||||||
|
export PATH="/opt/cmake-${{ env.SCITER_ARMV7_CMAKE_VERSION }}-linux-armhf/bin:$PATH"
|
||||||
|
fi
|
||||||
|
# edit cargo config
|
||||||
mkdir -p ~/.cargo/
|
mkdir -p ~/.cargo/
|
||||||
echo """
|
echo """
|
||||||
[source.crates-io]
|
[source.crates-io]
|
||||||
registry = 'https://github.com/rust-lang/crates.io-index'
|
registry = 'https://github.com/rust-lang/crates.io-index'
|
||||||
""" > ~/.cargo/config
|
""" > ~/.cargo/config
|
||||||
cat ~/.cargo/config
|
cat ~/.cargo/config
|
||||||
|
# install dependencies from vcpkg
|
||||||
# build
|
export VCPKG_ROOT=/opt/artifacts/vcpkg
|
||||||
pushd /workspace
|
$VCPKG_ROOT/vcpkg install --triplet ${{ matrix.job.vcpkg-triplet }} --x-install-root="$VCPKG_ROOT/installed"
|
||||||
|
# build rustdesk
|
||||||
python3 ./res/inline-sciter.py
|
python3 ./res/inline-sciter.py
|
||||||
export CARGO_INCREMENTAL=0
|
export CARGO_INCREMENTAL=0
|
||||||
cargo build --features inline${{ matrix.job.extra_features }} --release --bins --jobs 1
|
cargo build --features inline${{ matrix.job.extra_features }} --release --bins --jobs 1
|
||||||
# package
|
# make debian package
|
||||||
mkdir -p ./Release
|
mkdir -p ./Release
|
||||||
mv ./target/release/rustdesk ./Release/rustdesk
|
mv ./target/release/rustdesk ./Release/rustdesk
|
||||||
wget -O ./Release/libsciter-gtk.so https://github.com/c-smile/sciter-sdk/raw/master/bin.lnx/${{ matrix.job.sciter_arch }}/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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user