mirror of
https://github.com/MonsterDruide1/OdysseyDecomp
synced 2026-04-23 17:14:27 +00:00
55 lines
1.9 KiB
YAML
55 lines
1.9 KiB
YAML
name: progress
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
publish_progress:
|
|
if: github.repository == 'MonsterDruide1/OdysseyDecomp'
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Check out project
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
- name: Set up dependencies
|
|
run: |
|
|
sudo apt update && sudo apt install -y ninja-build cmake ccache clang curl
|
|
wget http://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2_amd64.deb && sudo dpkg -i libtinfo5_6.3-2_amd64.deb && rm -f libtinfo5_6.3-2_amd64.deb
|
|
- name: Set up python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
cache: 'pip'
|
|
- name: Set up python package dependencies
|
|
run: pip install toml colorama cxxfilt
|
|
- name: Set up cache for clang
|
|
uses: actions/cache@v4
|
|
with:
|
|
key: clang391-401
|
|
path: |
|
|
toolchain/clang-3.9.1
|
|
toolchain/clang-4.0.1
|
|
- name: Run simplified setup
|
|
run: tools/setup.py --project
|
|
- name: Build project
|
|
run: tools/build.py
|
|
- name: Upload progress state
|
|
run: |
|
|
full_ansi="$(tools/common/progress.py)"
|
|
full=`echo $full_ansi | sed -e 's/\x1b\[[0-9;]*m//g'`
|
|
echo $full
|
|
MATCHING=`echo $full | sed -n "s/^.*matching\s(\([0-9]\+\.[0-9]\+\)%.*$/\1/p"`
|
|
MINOR=`echo $full | sed -n "s/^.*non-matching (minor issues)\s(\([0-9]\+\.[0-9]\+\)%.*$/\1/p"`
|
|
MAJOR=`echo $full | sed -n "s/^.*non-matching (major issues)\s(\([0-9]\+\.[0-9]\+\)%.*$/\1/p"`
|
|
var=`curl "https://monsterdruide.one/OdysseyDecomp/save_progress.php?matching=$MATCHING&minor=$MINOR&major=$MAJOR&pw=$PROGRESS_PASS"`
|
|
if [[ "$var" == "OK" ]]; then
|
|
exit 0
|
|
else
|
|
echo $var;
|
|
exit 1
|
|
fi
|
|
env:
|
|
PROGRESS_PASS: ${{ secrets.PROGRESS_PASS }}
|