fix: move linux_headless to a new option

This commit is contained in:
Kingtous 2023-04-10 09:48:16 +08:00
parent a767df185f
commit 48caef0952

View File

@ -545,19 +545,22 @@ jobs:
arch: x86_64,
target: x86_64-unknown-linux-gnu,
os: ubuntu-20.04,
extra-build-features: "linux_headless",
extra-build-features: "",
enable-headless: true
}
- {
arch: x86_64,
target: x86_64-unknown-linux-gnu,
os: ubuntu-20.04,
extra-build-features: "flatpak",
enable-headless: false
}
- {
arch: x86_64,
target: x86_64-unknown-linux-gnu,
os: ubuntu-20.04,
extra-build-features: "appimage",
enable-headless: false
}
# - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
steps:
@ -681,7 +684,11 @@ jobs:
x86_64)
# no need mock on x86_64
export VCPKG_ROOT=/opt/artifacts/vcpkg
cargo build --lib --features hwcodec,flutter,flutter_texture_render,${{ matrix.job.extra-build-features }} --release
export DEFAULT_FEAT=""
if ${{ matrix.job.enable-headless }}; then
export DEFAULT_FEAT=linux_headless
fi
cargo build --lib --features hwcodec,flutter,flutter_texture_render,${{ matrix.job.extra-build-features }},$DEFAULT_FEAT --release
;;
esac
@ -706,6 +713,7 @@ jobs:
os: ubuntu-20.04, # just for naming package, not running host
use-cross: true,
extra-build-features: "",
enable-headless: true
}
- {
arch: aarch64,
@ -713,6 +721,7 @@ jobs:
os: ubuntu-20.04, # just for naming package, not running host
use-cross: true,
extra-build-features: "appimage",
enable-headless: false
}
# - { arch: aarch64, target: aarch64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true, extra-build-features: "flatpak" }
# - {
@ -839,7 +848,11 @@ jobs:
# start build
pushd /workspace
export VCPKG_ROOT=/opt/artifacts/vcpkg
cargo build --lib --features flutter,${{ matrix.job.extra-build-features }} --release
export DEFAULT_FEAT=""
if ${{ matrix.job.enable-headless }}; then
export DEFAULT_FEAT=linux_headless
fi
cargo build --lib --features flutter,${{ matrix.job.extra-build-features }},$DEFAULT_FEAT --release
- name: Upload Artifacts
uses: actions/upload-artifact@master
@ -863,6 +876,7 @@ jobs:
os: ubuntu-latest,
use-cross: true,
extra-build-features: "",
enable-headless: true
}
# - { 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 }
@ -968,7 +982,11 @@ jobs:
python3 ./res/inline-sciter.py
export VCPKG_ROOT=/opt/artifacts/vcpkg
export ARCH=armhf
cargo build --features inline --release --bins
export DEFAULT_FEAT=""
if ${{ matrix.job.enable-headless }}; then
export DEFAULT_FEAT=linux_headless
fi
cargo build --features inline,${{ matrix.job.extra-build-features }},$DEFAULT_FEAT --release --bins
# package
mkdir -p ./Release
mv ./target/release/rustdesk ./Release/rustdesk