From 6a4dc900c7621355e9efed6076ae9e103e85c9e6 Mon Sep 17 00:00:00 2001 From: MonsterDruide1 <5958456@gmail.com> Date: Fri, 6 Oct 2023 22:24:05 +0200 Subject: [PATCH] Add workflow for progress --- .github/workflows/progress.yml | 49 ++++++++++++++++++++++++++++++++++ tools/setup.py | 9 ++++--- 2 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/progress.yml diff --git a/.github/workflows/progress.yml b/.github/workflows/progress.yml new file mode 100644 index 000000000..2d98381bd --- /dev/null +++ b/.github/workflows/progress.yml @@ -0,0 +1,49 @@ +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="$(tools/common/progress.py)" + echo "full" + echo $full + MATCHING="$(echo $full | sed -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 }} diff --git a/tools/setup.py b/tools/setup.py index 43524f554..2abcdbfc0 100755 --- a/tools/setup.py +++ b/tools/setup.py @@ -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)