Merge pull request #150 from fokkonaut/master #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: blmapV3multistarbox | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
blmapV3multistarbox: | |
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/blmapV3multistarbox.map | |
wget -O ../old.map "https://github.com/DDNetPP/maps/raw/$old_commit/blmapV3multistarbox.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: Diff prev commit | |
run: | | |
../twmap-edit ../old.map old --mapdir | |
../twmap-edit blmapV3multistarbox.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 |