Skip to content

Commit

Permalink
Add workflow for progress
Browse files Browse the repository at this point in the history
  • Loading branch information
MonsterDruide1 committed Oct 6, 2023
1 parent 53fe6e9 commit d04e546
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 3 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/progress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: progress
on:
push:
branches:
- master
- progress-workflow # FIXME remove this

jobs:
publish_progress:
runs-on: ubuntu-latest
steps:
- name: Check out project
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up dependencies
run: sudo apt install -y ninja-build cmake ccache clang curl libncurses5
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Set up python package dependencies
run: pip install toml colorama cxxfilt
- name: Set up cache for clang
uses: actions/cache@v3
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"
echo $full
MATCHING=`echo $full | sed --debug -n "s/^.*matching\s[(]\(\d+\.\d+\)%.*$/\1/p"`
echo "MATCHING"
echo $MATCHING
#MINOR=`echo $full | sed -n \"s/^.*non-matching \\(minor issues\\)\s\\(\(\d+\.\d+\)%.*$/\1/p"`
echo "MINOR"
echo $MINOR
#var=`curl "\""https://monsterdruide.one/OdysseyDecomp/save_progress.php?matching=$MATCHING&minor=$MINOR&major=$MAJOR&pw=$PROGRESS_PASS"\""`
env:
PROGRESS_PASS: ${{ secrets.PROGRESS_PASS }}
9 changes: 6 additions & 3 deletions tools/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ def main():
help="Path to the original NSO (1.0, compressed or not)", nargs="?")
parser.add_argument("--cmake_backend", type=str,
help="CMake backend to use (Ninja, Unix Makefiles, etc.)", nargs="?", default="Ninja")
parser.add_argument("--project-only", action="store_true",
help="Disable viking and original NSO setup")
args = parser.parse_args()

setup.install_viking()
prepare_executable(args.original_nso)

if not args.project_only:
setup.install_viking()
prepare_executable(args.original_nso)
setup.set_up_compiler("3.9.1")
setup.set_up_compiler("4.0.1")
create_build_dir(Version.VER_100, args.cmake_backend)
Expand Down

0 comments on commit d04e546

Please sign in to comment.