Added default-publish feature and updated build scripts.

This commit is contained in:
Ben Wallis 2021-06-26 16:43:39 +01:00
parent f983295318
commit da319e71ec
3 changed files with 18 additions and 5 deletions

View File

@ -61,7 +61,9 @@ coverage:
script: script:
- ln -s /dockercache/target target - ln -s /dockercache/target target
- rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly - rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
- VELOREN_USERDATA_STRATEGY=executable cargo build --release - export VELOREN_USERDATA_STRATEGY=executable
- cargo build --release -p veloren-voxygen --no-default-features --features default-publish
- cargo build --release -p veloren-server-cli
- cp -r target/release/veloren-server-cli $CI_PROJECT_DIR - cp -r target/release/veloren-server-cli $CI_PROJECT_DIR
- cp -r target/release/veloren-voxygen $CI_PROJECT_DIR - cp -r target/release/veloren-voxygen $CI_PROJECT_DIR
artifacts: artifacts:
@ -79,7 +81,9 @@ coverage:
- update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix - update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
- ln -s /dockercache/target target - ln -s /dockercache/target target
- rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly - rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
- VELOREN_USERDATA_STRATEGY=executable cargo build --target=x86_64-pc-windows-gnu --release - export VELOREN_USERDATA_STRATEGY=executable
- cargo build --target=x86_64-pc-windows-gnu --release -p veloren-voxygen --no-default-features --features default-publish
- cargo build --target=x86_64-pc-windows-gnu --release -p veloren-server-cli
- cp -r target/x86_64-pc-windows-gnu/release/veloren-server-cli.exe $CI_PROJECT_DIR - cp -r target/x86_64-pc-windows-gnu/release/veloren-server-cli.exe $CI_PROJECT_DIR
- cp -r target/x86_64-pc-windows-gnu/release/veloren-voxygen.exe $CI_PROJECT_DIR - cp -r target/x86_64-pc-windows-gnu/release/veloren-voxygen.exe $CI_PROJECT_DIR
- cp /usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/libgcc_s_seh-1.dll $CI_PROJECT_DIR - cp /usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/libgcc_s_seh-1.dll $CI_PROJECT_DIR
@ -107,7 +111,9 @@ coverage:
- export RUSTFLAGS="-D warnings" - export RUSTFLAGS="-D warnings"
script: script:
- export MACOSX_DEPLOYMENT_TARGET="10.13" - export MACOSX_DEPLOYMENT_TARGET="10.13"
- VELOREN_USERDATA_STRATEGY=executable cargo build --release - export VELOREN_USERDATA_STRATEGY=executable
- cargo build --release -p veloren-voxygen --no-default-features --features default-publish
- cargo build --release -p veloren-server-cli
- cp -r target/release/veloren-server-cli $CI_PROJECT_DIR - cp -r target/release/veloren-server-cli $CI_PROJECT_DIR
- cp -r target/release/veloren-voxygen $CI_PROJECT_DIR - cp -r target/release/veloren-voxygen $CI_PROJECT_DIR
artifacts: artifacts:

View File

@ -7,6 +7,8 @@ code-quality:
- ln -s /dockercache/target target - ln -s /dockercache/target target
- rm -r target/debug/incremental/* || echo "all good" # TMP FIX FOR 2021-03-22-nightly - rm -r target/debug/incremental/* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
- cargo clippy --all-targets --locked --features="bin_csv,bin_graphviz,bin_bot,asset_tweak" -- -D warnings - cargo clippy --all-targets --locked --features="bin_csv,bin_graphviz,bin_bot,asset_tweak" -- -D warnings
# Ensure that the veloren-voxygen default-publish feature builds as it excludes some default features
- cargo clippy -p veloren-voxygen --locked --no-default-features --features="default-publish" -- -D warnings
- cargo fmt --all -- --check - cargo fmt --all -- --check
security: security:

View File

@ -28,7 +28,12 @@ simd = ["vek/platform_intrinsics"]
tracy = ["profiling", "profiling/profile-with-tracy", "common-frontend/tracy"] tracy = ["profiling", "profiling/profile-with-tracy", "common-frontend/tracy"]
plugins = ["client/plugins"] plugins = ["client/plugins"]
default = ["singleplayer", "native-dialog", "plugins", "simd"] # We don't ship egui with published release builds so a separate feature is required that excludes it.
# This feature has been added ahead of the egui merge to allow time for Flatpak, AUR and Nix to be updated
# to ensure there isn't any period of time where we're shipping the egui-ui feature enabled by default.
# This comment will be updated after MR 2253 merges.
default-publish = ["singleplayer", "native-dialog", "plugins", "simd"]
default = ["default-publish"]
[dependencies] [dependencies]
client = {package = "veloren-client", path = "../client"} client = {package = "veloren-client", path = "../client"}