eqemu-server/utils/scripts/build/linux-build.sh
Chris Miles 6fb919a16f
[Items] Overhaul Item Hand-in System (#4593)
* [Items] Overhaul Item Hand-in System

* Edge case lua fix

* Merge fix

* I'm going to be amazed if this works first try

* Update linux-build.sh

* Update linux-build.sh

* Update linux-build.sh

* Update linux-build.sh

* Update linux-build.sh

* Update linux-build.sh

* Update linux-build.sh

* Update linux-build.sh

* Add protections against scripts that hand back items themselves

* Remove EVENT_ITEM_ScriptStopReturn

* test

* Update npc_handins.cpp

* Add Items:AlwaysReturnHandins

* Update spdat.cpp

* Bypass update prompt on CI
2025-02-03 16:51:09 -06:00

73 lines
2.0 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
# remove this eventually
cd ./quests && git checkout akkadius/item-handin-overhaul && cd ..
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