Protocol for Instrumentation of Emulators
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.5 KiB

# organize folders
cd ..
rm -rf release
rm -rf build
mkdir -p release/example
cp -rf src/pcsx2_ipc.h release/
cp -rf src/ release/example/
cp -rf bindings/ release/
# generate docs
mkdir -p release/docs
cp -rf html release/docs
cd latex && make
cd ..
cp -rf latex/refman.pdf release/docs
# remove build artifacts
find release -type d -name build -prune -exec rm -rf {} \;
find release -type d -name bin -prune -exec rm -rf {} \;
find release -type d -name obj -prune -exec rm -rf {} \;
find release -type d -name -prune -exec rm -rf {} \;
find release -type d -name target -prune -exec rm -rf {} \;
# we restart our virtual X server for test cases, our test cases kill it.
killall Xvfb
Xvfb :99 &
# test cases, to see if we've broken something between releases
meson build -Db_coverage=true
cd build
if meson test; then
echo "Tests ran successfully, time to build the release!"
NC='\033[0m' # No Color
echo -e "${RED}TESTS FAILED!!!\nYou broke it, PEBKAC${NC}"
# make sure i don't forget to read the logs
rm -rf ../release
rm -rf ../
exit 1
# we build the coverage report and finish the release folder
ninja coverage-html
mkdir -p ../release/tests
cp -rf meson-logs/coveragereport/ ../release/tests
python ../utils/ meson-logs/testlog.json > ../release/tests/result.txt
cp -rf ../LICENSE ../release/
cp -rf ../ ../release/
cd ..
# make the release zip
zip -r release &> /dev/null