fix: change to run on arch
opt: use windows latest for sciter
This commit is contained in:
parent
b8d8bf0a09
commit
67821f1d42
130
.github/workflows/flutter-nightly.yml
vendored
130
.github/workflows/flutter-nightly.yml
vendored
@ -180,7 +180,7 @@ jobs:
|
|||||||
python3 res/inline-sciter.py
|
python3 res/inline-sciter.py
|
||||||
# Replace the link for the ico.
|
# Replace the link for the ico.
|
||||||
rm res/icon.ico && cp flutter/windows/runner/resources/app_icon.ico res/icon.ico
|
rm res/icon.ico && cp flutter/windows/runner/resources/app_icon.ico res/icon.ico
|
||||||
cargo build --features inline --target=${{ matrix.job.target }} --release
|
cargo build --features inline --target=${{ matrix.job.target }} --release --bins
|
||||||
mkdir -p ./Release
|
mkdir -p ./Release
|
||||||
mv ./target/${{ matrix.job.target }}/release/rustdesk.exe ./Release/rustdesk.exe
|
mv ./target/${{ matrix.job.target }}/release/rustdesk.exe ./Release/rustdesk.exe
|
||||||
wget -O ./Release/sciter.dll https://github.com/c-smile/sciter-sdk/raw/master/bin.win/x32/sciter.dll
|
wget -O ./Release/sciter.dll https://github.com/c-smile/sciter-sdk/raw/master/bin.win/x32/sciter.dll
|
||||||
@ -711,12 +711,12 @@ jobs:
|
|||||||
# - { arch: aarch64, target: aarch64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true, extra-build-features: "flatpak" }
|
# - { arch: aarch64, target: aarch64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true, extra-build-features: "flatpak" }
|
||||||
# - {
|
# - {
|
||||||
# arch: armv7,
|
# arch: armv7,
|
||||||
# target: arm-unknown-linux-gnueabihf,
|
# target: armv7-unknown-linux-gnueabihf,
|
||||||
# os: ubuntu-20.04,
|
# os: ubuntu-20.04,
|
||||||
# use-cross: true,
|
# use-cross: true,
|
||||||
# extra-build-features: "",
|
# extra-build-features: "",
|
||||||
# }
|
# }
|
||||||
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true, extra-build-features: "appimage" }
|
# - { arch: armv7, target: armv7-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true, extra-build-features: "appimage" }
|
||||||
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
|
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
|
||||||
steps:
|
steps:
|
||||||
- name: Maximize build space
|
- name: Maximize build space
|
||||||
@ -832,30 +832,8 @@ jobs:
|
|||||||
cat ~/.cargo/config
|
cat ~/.cargo/config
|
||||||
# start build
|
# start build
|
||||||
pushd /workspace
|
pushd /workspace
|
||||||
# mock
|
export VCPKG_ROOT=/opt/artifacts/vcpkg
|
||||||
case "${{ matrix.job.arch }}" in
|
|
||||||
aarch64)
|
|
||||||
cp -r /opt/artifacts/vcpkg/installed/lib/* /usr/lib/aarch64-linux-gnu/
|
|
||||||
cp -r /opt/artifacts/vcpkg/installed/include/* /usr/include/
|
|
||||||
ls -l /opt/artifacts/vcpkg/installed/lib/
|
|
||||||
mkdir -p /vcpkg/installed/arm64-linux
|
|
||||||
ln -s /usr/lib/aarch64-linux-gnu /vcpkg/installed/arm64-linux/lib
|
|
||||||
ln -s /usr/include /vcpkg/installed/arm64-linux/include
|
|
||||||
export VCPKG_ROOT=/vcpkg
|
|
||||||
# disable hwcodec for compilation
|
|
||||||
cargo build --lib --features flutter,${{ matrix.job.extra-build-features }} --release
|
cargo build --lib --features flutter,${{ matrix.job.extra-build-features }} --release
|
||||||
;;
|
|
||||||
armv7)
|
|
||||||
# cp -r /opt/artifacts/vcpkg/installed/lib/* /usr/lib/arm-linux-gnueabihf/
|
|
||||||
# cp -r /opt/artifacts/vcpkg/installed/include/* /usr/include/
|
|
||||||
# mkdir -p /vcpkg/installed/arm-linux
|
|
||||||
# ln -s /usr/lib/arm-linux-gnueabihf /vcpkg/installed/arm-linux/lib
|
|
||||||
# ln -s /usr/include /vcpkg/installed/arm-linux/include
|
|
||||||
export VCPKG_ROOT=/vcpkg
|
|
||||||
# disable hwcodec for compilation
|
|
||||||
cargo build --lib --features flutter,${{ matrix.job.extra-build-features }} --release
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
@ -874,19 +852,36 @@ jobs:
|
|||||||
job:
|
job:
|
||||||
- {
|
- {
|
||||||
arch: armv7,
|
arch: armv7,
|
||||||
target: arm-unknown-linux-gnueabihf,
|
target: armv7-unknown-linux-gnueabihf,
|
||||||
deb-arch: armhf,
|
deb-arch: armhf,
|
||||||
os: ubuntu-latest,
|
os: ubuntu-latest,
|
||||||
use-cross: true,
|
use-cross: true,
|
||||||
extra-build-features: "",
|
extra-build-features: "",
|
||||||
}
|
}
|
||||||
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true, extra-build-features: "appimage" }
|
# - { arch: armv7, target: armv7-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true, extra-build-features: "appimage" }
|
||||||
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
|
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
- name: Maximize build space
|
||||||
|
run: |
|
||||||
|
sudo rm -rf /opt/ghc
|
||||||
|
sudo rm -rf /usr/local/lib/android
|
||||||
|
sudo rm -rf /usr/share/dotnet
|
||||||
|
sudo apt update -y
|
||||||
|
sudo apt install qemu-user-static
|
||||||
|
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set Swap Space
|
||||||
|
uses: pierotofy/set-swap-space@master
|
||||||
|
with:
|
||||||
|
swap-size-gb: 12
|
||||||
|
|
||||||
|
- name: Free Space
|
||||||
|
run: |
|
||||||
|
df
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@ -901,27 +896,78 @@ jobs:
|
|||||||
key: ${{ matrix.job.target }}-${{ matrix.job.extra-build-features }}
|
key: ${{ matrix.job.target }}-${{ matrix.job.extra-build-features }}
|
||||||
cache-directories: "/opt/rust-registry"
|
cache-directories: "/opt/rust-registry"
|
||||||
|
|
||||||
|
- name: Install local registry
|
||||||
|
run: |
|
||||||
|
mkdir -p /opt/rust-registry
|
||||||
|
cargo install cargo-local-registry
|
||||||
|
|
||||||
|
- name: Build local registry
|
||||||
|
uses: nick-fields/retry@v2
|
||||||
|
id: build-local-registry
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
max_attempts: 3
|
||||||
|
timeout_minutes: 15
|
||||||
|
retry_on: error
|
||||||
|
command: cargo local-registry --sync ./Cargo.lock /opt/rust-registry
|
||||||
|
|
||||||
- name: Restore vcpkg files
|
- name: Restore vcpkg files
|
||||||
uses: actions/download-artifact@master
|
uses: actions/download-artifact@master
|
||||||
with:
|
with:
|
||||||
name: vcpkg-artifact-${{ matrix.job.arch }}
|
name: vcpkg-artifact-${{ matrix.job.arch }}
|
||||||
path: /opt/artifacts/vcpkg/installed
|
path: /opt/artifacts/vcpkg/installed
|
||||||
|
|
||||||
- name: Install cross tool
|
- uses: Kingtous/run-on-arch-action@amd64-support
|
||||||
|
name: Build rustdesk sciter binary for ${{ matrix.job.arch }}
|
||||||
|
id: vcpkg
|
||||||
|
with:
|
||||||
|
arch: ${{ matrix.job.arch }}
|
||||||
|
distro: ubuntu18.04-rustdesk
|
||||||
|
githubToken: ${{ github.token }}
|
||||||
|
setup: |
|
||||||
|
ls -l "${PWD}"
|
||||||
|
dockerRunArgs: |
|
||||||
|
--volume "${PWD}:/workspace"
|
||||||
|
--volume "/opt/artifacts:/opt/artifacts"
|
||||||
|
--volume "/opt/rust-registry:/opt/rust-registry"
|
||||||
|
shell: /bin/bash
|
||||||
|
install: |
|
||||||
|
apt update -y
|
||||||
|
apt-get -qq 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 rpm libclang-dev
|
||||||
|
apt-get -qq install -y libdbus-1-dev pkg-config nasm yasm libglib2.0-dev libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev
|
||||||
|
apt-get -qq install -y libpulse-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvpx-dev libvdpau-dev libva-dev
|
||||||
run: |
|
run: |
|
||||||
wget https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-x86_64-unknown-linux-gnu.tar.gz
|
# disable git safe.directory
|
||||||
tar -zxvf cross-x86_64-unknown-linux-gnu.tar.gz
|
git config --global --add safe.directory "*"
|
||||||
mv cross* /usr/local/bin/
|
# rust
|
||||||
|
pushd /opt
|
||||||
|
wget -O rust.tar.gz https://static.rust-lang.org/dist/rust-1.64.0-${{ matrix.job.target }}.tar.gz
|
||||||
|
tar -zxvf rust.tar.gz > /dev/null && rm rust.tar.gz
|
||||||
|
cd rust-1.64.0-${{ matrix.job.target }} && ./install.sh
|
||||||
|
rm -rf rust-1.64.0-${{ matrix.job.target }}
|
||||||
|
# edit config
|
||||||
|
mkdir -p ~/.cargo/
|
||||||
|
echo """
|
||||||
|
[source.crates-io]
|
||||||
|
registry = 'https://github.com/rust-lang/crates.io-index'
|
||||||
|
replace-with = 'local-registry'
|
||||||
|
|
||||||
- name: Build RustDesk
|
[source.local-registry]
|
||||||
env:
|
local-registry = '/opt/rust-registry/'
|
||||||
ARCH: ${{ matrix.job.deb-arch }}
|
""" > ~/.cargo/config
|
||||||
VCPKG_ROOT: /opt/artifacts/vcpkg
|
cat ~/.cargo/config
|
||||||
run: |
|
|
||||||
|
# build
|
||||||
|
pushd /workspace
|
||||||
python3 ./res/inline-sciter.py
|
python3 ./res/inline-sciter.py
|
||||||
cross build --target ${{ matrix.job.target }} --features inline --release
|
export VCPKG_ROOT=/opt/artifacts/vcpkg
|
||||||
wget -O ./target/${{ matrix.job.target }}/release/libsciter-gtk.so https://github.com/c-smile/sciter-sdk/blob/master/bin.lnx/arm32/libsciter-gtk.so
|
export ARCH=armhf
|
||||||
./build.py --package ./target/${{ matrix.job.target }}/release
|
cargo build --features inline --release --bins
|
||||||
|
# package
|
||||||
|
mkdir -p ./Release
|
||||||
|
mv ./target/release/rustdesk ./Release/rustdesk
|
||||||
|
wget -O ./Release/libsciter-gtk.so https://github.com/c-smile/sciter-sdk/raw/master/bin.lnx/arm32/libsciter-gtk.so
|
||||||
|
./build.py --package ./Release
|
||||||
|
|
||||||
- name: Rename rustdesk
|
- name: Rename rustdesk
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -976,8 +1022,8 @@ jobs:
|
|||||||
# use-cross: true,
|
# use-cross: true,
|
||||||
# extra-build-features: "flatpak",
|
# extra-build-features: "flatpak",
|
||||||
# }
|
# }
|
||||||
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true, extra-build-features: "" }
|
# - { arch: armv7, target: armv7-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true, extra-build-features: "" }
|
||||||
# - { arch: armv7, target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true, extra-build-features: "appimage" }
|
# - { arch: armv7, target: armv7-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true, extra-build-features: "appimage" }
|
||||||
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
|
# - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
|
Loading…
x
Reference in New Issue
Block a user