summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2025-03-23 19:42:16 +0000
committerFedja Beader <fedja@protonmail.ch>2025-03-23 19:42:16 +0000
commitb62847c2481257511450e07c23ece6f99b8d220c (patch)
tree304e4b5a25a612285e1b7a08fce15c17c949e214
parent1d9fb2662eaea253c8fb05edcd040e40ada61718 (diff)
downloadclientdata-b62847c2481257511450e07c23ece6f99b8d220c.tar.gz
clientdata-b62847c2481257511450e07c23ece6f99b8d220c.tar.bz2
clientdata-b62847c2481257511450e07c23ece6f99b8d220c.tar.xz
clientdata-b62847c2481257511450e07c23ece6f99b8d220c.zip
Introduce ancient manaplus CI job
...corresponding to oldest supported packet version (24). * There's no need to have two script files, really (for now). * Apply new updates from "Complain if client log is not found" * Deduplicate further + touch up the script a tad * Okay, manaplus needs updating for changes to "libdownload" * Oops, forgot to revert the actual manaplus job This reverts commit 25fbf2d068737d8e2970a89794e0bfb961ffae82. * Split the job out * Un-hardcode * Print version, too * Hardcode for testing purposes %%R * Update job name - this will probably break because branch is different, probably in downloadlib, but let's see * Update (downdate?) log file names * Match builder OS Squash this job, too **** ml/clientdata!185
-rw-r--r--.gitlab-ci.yml15
-rwxr-xr-x.tools/downloadlib.sh7
-rwxr-xr-x.tools/manaplus.sh21
3 files changed, 30 insertions, 13 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1c5d115a..d14cdc84 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,9 +25,20 @@ imagemagiccheck:
manaplus:
stage: test
- script:
- - ./.tools/manaplus.sh
image: debian:unstable
+ script:
+ - ./.tools/manaplus.sh manaplus master manaverse.log
+ artifacts:
+ paths:
+ - shared
+ when: always
+ expire_in: 3 week
+
+old_manaplus:
+ stage: test
+ image: debian:buster
+ script:
+ - ./.tools/manaplus.sh packetver24 s20180215 manaplus.log
artifacts:
paths:
- shared
diff --git a/.tools/downloadlib.sh b/.tools/downloadlib.sh
index ce034c89..67a5ab50 100755
--- a/.tools/downloadlib.sh
+++ b/.tools/downloadlib.sh
@@ -1,7 +1,8 @@
#!/bin/bash
export zipname="lib.zip"
-export libname="$1_$2"
+export branch="$1"
+export libname="$2_$3"
rm -rf libdownload
mkdir libdownload
@@ -10,7 +11,7 @@ cd libdownload
wget --retry-connrefused --retry-on-host-error --tries=10 --waitretry=5 \
-O "$zipname" \
--progress=dot:mega \
- "https://git.themanaworld.org/mana/spm/builds/artifacts/$1/download?job=${libname}"
+ "https://git.themanaworld.org/mana/spm/builds/artifacts/$branch/download?job=$libname"
unzip "${zipname}"
cp -r "bin/${libname}" ..
@@ -22,6 +23,6 @@ mkdir -p /usr/local/spm/bin
cp -r libdownload/bin/${libname} /usr/local/spm/bin/
ls /usr/local/spm/bin/${libname}
if [ "$?" != 0 ]; then
- echo "Library $1 $2 unpack failed"
+ printf "Library %s %s %s unpack failed" "$1" "$2" "$3"
exit 1
fi
diff --git a/.tools/manaplus.sh b/.tools/manaplus.sh
index a69c72c2..dc80e543 100755
--- a/.tools/manaplus.sh
+++ b/.tools/manaplus.sh
@@ -1,5 +1,9 @@
#!/bin/bash
+spm_branch="$1"
+client_branch="$2"
+logfile="$3"
+
source ./.tools/init.sh
clientdata_init
@@ -14,25 +18,26 @@ aptget_install \
pwd
ls
-./clientdata/.tools/downloadlib.sh manaplus master || exit 1
+./clientdata/.tools/downloadlib.sh "$spm_branch" manaplus "$client_branch" || exit 1
-export HOME=`pwd`/clientdata/shared
+export HOME="$PWD/clientdata/shared"
-cd manaplus_master || exit 1
+pushd "manaplus_$client_branch" || exit 1
export SDL_VIDEODRIVER=dummy
+./bin/manaplus --version || exit 1
./bin/manaplus --validate -u -d ../clientdata || exit 1
-logfile="${HOME}/.local/share/mana/manaverse.log"
-if [[ ! -f "$logfile" ]]; then
- printf "Error: logfile %s not found\n" "$logfile"
+log_path="$HOME/.local/share/mana/$logfile"
+if [[ ! -f "$log_path" ]]; then
+ printf "Error: logfile %s not found\n" "$log_path"
exit 1
fi
-grep -A 10 "Assert:" "$logfile"
+grep -A 10 "Assert:" "$log_path"
if [ "$?" == 0 ]; then
echo "Asserts found"
exit 1
fi
-cd ..
+popd