mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
70 lines
1.9 KiB
Bash
Executable File
70 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
sudo chown eqemu:eqemu /drone/src/ * -R
|
|
sudo chown eqemu:eqemu /home/eqemu/.ccache/ * -R
|
|
|
|
chmod +x ./utils/scripts/build/source-db-build.sh
|
|
utils/scripts/build/source-db-build.sh &
|
|
|
|
git submodule init && git submodule update
|
|
|
|
perl utils/scripts/build/tag-version.pl
|
|
|
|
mkdir -p build && cd build && \
|
|
cmake -DEQEMU_BUILD_TESTS=ON \
|
|
-DEQEMU_BUILD_STATIC=ON \
|
|
-DEQEMU_BUILD_LOGIN=ON \
|
|
-DEQEMU_BUILD_LUA=ON \
|
|
-DEQEMU_BUILD_PERL=ON \
|
|
-DCMAKE_CXX_FLAGS:STRING="-O1 -g -Wno-everything" \
|
|
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-O1 -g -Wno-everything" \
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
|
-G 'Unix Makefiles' \
|
|
.. && make -j$((`nproc`-12))
|
|
|
|
curl https://raw.githubusercontent.com/Akkadius/eqemu-install-v2/master/eqemu_config.json --output eqemu_config.json
|
|
./bin/tests
|
|
|
|
ldd ./bin/zone
|
|
|
|
echo "Waiting for MariaDB to be ready..."
|
|
while ! mysqladmin ping -uroot -peqemu -hlocalhost --silent; do
|
|
sleep 1
|
|
done
|
|
|
|
echo "# Cloning quests repository"
|
|
git -C ./quests pull 2> /dev/null || git clone https://github.com/ProjectEQ/projecteqquests.git quests
|
|
|
|
mkdir maps
|
|
mkdir logs
|
|
|
|
ln -s ./quests/lua_modules ./lua_modules
|
|
ln -s ./quests/plugins ./plugins
|
|
|
|
echo "# Running world database updates"
|
|
FORCE_INTERACTIVE=1 ./bin/world database:updates --skip-backup --force
|
|
|
|
echo "# Running shared_memory"
|
|
./bin/shared_memory
|
|
|
|
echo "# Running NPC hand-in tests"
|
|
./bin/zone tests:npc-handins
|
|
|
|
# shellcheck disable=SC2164
|
|
cd /drone/src/
|
|
|
|
chmod +x ./utils/scripts/build/should-release/should-release
|
|
./utils/scripts/build/should-release/should-release || exit
|
|
|
|
rm ./build/bin/*.a
|
|
zip -j eqemu-server-linux-x64.zip ./build/bin/*
|
|
|
|
# shellcheck disable=SC2010
|
|
ls -lsh | grep zip
|
|
sudo apt-get update && sudo apt-get install -y rclone
|
|
rclone config create remote ftp env_auth true > /dev/null
|
|
rclone copy eqemu-server-linux-x64.zip remote: 2>&1
|
|
rclone ls remote: 2>&1
|