From 72b895d38483b2e153c296c7317ffdd070df6c82 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 | 34 ++++++++++++++++++++++++++++++++++ tools/setup.py | 7 +++++-- 2 files changed, 39 insertions(+), 2 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..5c5cf33ce --- /dev/null +++ b/.github/workflows/progress.yml @@ -0,0 +1,34 @@ +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 + - name: Set up python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + cache: 'pip' + - name: Set up cache for clang + - 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 + 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..7750b89c8 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", action="store_false", + help="Disable viking and original NSO setup", nargs="?") args = parser.parse_args() - setup.install_viking() - prepare_executable(args.original_nso) + if not args.project: + 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)