2021-06-17 21:32:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2023-12-26 07:31:22 +00:00
|
|
|
## Server Test
|
|
|
|
|
2022-03-09 23:47:31 +00:00
|
|
|
# Build Test
|
2022-07-04 20:44:00 +00:00
|
|
|
ARCH="$(dpkg-architecture -qDEB_BUILD_ARCH)"
|
|
|
|
./scripts/setup.sh server "${ARCH}"
|
|
|
|
./scripts/build.sh server "${ARCH}"
|
2022-03-09 23:47:31 +00:00
|
|
|
|
2021-06-17 21:32:24 +00:00
|
|
|
# Add minecraft-pi-reborn-server To PATH
|
2021-11-12 03:52:47 +00:00
|
|
|
export PATH="$(pwd)/out/server-$(dpkg-architecture -qDEB_BUILD_ARCH)/usr/bin:${PATH}"
|
2021-06-17 21:32:24 +00:00
|
|
|
|
|
|
|
# Create Test Directory
|
|
|
|
rm -rf build/test
|
|
|
|
mkdir -p build/test
|
|
|
|
|
|
|
|
# Run Test
|
|
|
|
cd build/test
|
|
|
|
minecraft-pi-reborn-server --only-generate
|
2022-07-08 17:57:48 +00:00
|
|
|
cd ../../
|
|
|
|
|
2023-12-26 07:31:22 +00:00
|
|
|
## Client Test
|
|
|
|
|
2022-07-08 17:57:48 +00:00
|
|
|
# Build Benchmark
|
|
|
|
./scripts/setup.sh client "${ARCH}" -DMCPI_HEADLESS_MODE=ON
|
|
|
|
./scripts/build.sh client "${ARCH}"
|
|
|
|
|
2022-07-16 00:09:51 +00:00
|
|
|
# Add minecraft-pi-reborn-client To PATH
|
2022-07-08 17:57:48 +00:00
|
|
|
export PATH="$(pwd)/out/client-$(dpkg-architecture -qDEB_BUILD_ARCH)/usr/bin:${PATH}"
|
|
|
|
|
2022-07-16 00:09:51 +00:00
|
|
|
# Skip Root Check
|
|
|
|
export _MCPI_SKIP_ROOT_CHECK=1
|
|
|
|
|
2022-07-08 17:57:48 +00:00
|
|
|
# Run Benchmark
|
2022-07-11 22:30:49 +00:00
|
|
|
export HOME="$(pwd)/build/test"
|
2022-09-22 21:43:21 +00:00
|
|
|
minecraft-pi-reborn-client --default --no-cache --benchmark
|
2023-12-26 07:31:22 +00:00
|
|
|
|
|
|
|
## Example Mods Test
|
|
|
|
|
|
|
|
# Build
|
|
|
|
for project in example-mods/*/; do
|
|
|
|
cd "${project}"
|
|
|
|
rm -rf build
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake -GNinja ..
|
|
|
|
cmake --build .
|
|
|
|
cd ../../../
|
|
|
|
done
|