Skip to content

Update to BlmapChill v0193 (extend viproom/reduce redirect tp) (#148) #240

Update to BlmapChill v0193 (extend viproom/reduce redirect tp) (#148)

Update to BlmapChill v0193 (extend viproom/reduce redirect tp) (#148) #240

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
BlmapChill:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Setup
run: |
old_commit="$(git log -3 --pretty=format:"%H" | tail -n1)"
wget -O ../master.map https://github.com/DDNetPP/maps/raw/master/BlmapChill.map
wget -O ../old.map "https://github.com/DDNetPP/maps/raw/$old_commit/BlmapChill.map"
wget -O ../twmap-edit https://zillyhuhn.com/tmp/twmap-edit && chmod +x ../twmap-edit
chmod +x ../twmap-edit
wget -O ../diff.sh https://raw.githubusercontent.com/lib-crash/lib-teeworlds/ffd36e74cc55dfd6f49ab08122d4a09a6a090ead/misc/mapdir_git_diff.sh
chmod +x ../diff.sh
python -m pip install --upgrade pip
pip install twmap
pip install numpy
git clone https://github.com/DDNetPP/maps-scripts ~/scripts
- name: Check BlmpaChill version bump
run: |
old="$(python ~/scripts/BlmapChill/print_version.py ../old.map)"
new="$(python ~/scripts/BlmapChill/print_version.py BlmapChill.map)"
expected="$((old+1))"
printf 'old version '%s'\n' "$old"
printf 'expected version '%s'\n' "$expected"
printf 'new version '%s'\n' "$new"
if [ "$new" != "$expected" ]
then
printf 'WRONG VERSION NUMBER IN THE TOP LEFT!\n'
printf ' expected: '%s'\n' "$expected"
printf ' got: '%s'\n' "$new"
exit 1
fi
- name: Diff prev commit
run: |
../twmap-edit ../old.map old --mapdir
../twmap-edit BlmapChill.map new --mapdir
cd old || exit 1
{
git config --global init.defaultBranch main
git init
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global color.ui auto
git add . && git commit -m "init";
} >/dev/null
rm -rf *
cp -r ../new/* .
git --no-pager diff
- name: Preview diff prev commit
run: |
cd old
TERM=screen-256color ../../diff.sh 155 50 --buffer
- name: Status prev commit
run: cd old && git status
- name: Diff master
run: |
../twmap-edit ../master.map master --mapdir
cd master || exit 1
{
git config --global init.defaultBranch main
git init
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global color.ui auto
git add . && git commit -m "init";
} >/dev/null
rm -rf *
cp -r ../new/* .
git --no-pager diff
- name: Preview diff master
run: |
cd old
TERM=screen-256color ../../diff.sh 155 50 --buffer
- name: Status master
run: cd old && git status