diff options
| author | Aetias <aetias@outlook.com> | 2025-03-15 16:06:44 +0100 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2025-03-15 16:06:44 +0100 |
| commit | 89d2c9ce4638779480352f25c16efc478f6cfa51 (patch) | |
| tree | c820200a703810dc432a0d675fe2e58fde11e72d | |
| parent | e0281e00fdf11c4b784ef8bd43358ee65b9cbd86 (diff) | |
ci: Provide path to extract directory
| -rw-r--r-- | .github/workflows/build.yml | 4 | ||||
| -rwxr-xr-x | tools/configure.py | 26 |
2 files changed, 17 insertions, 13 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 427a94e2..64ea7f68 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,6 +2,8 @@ name: Build on: push: + branches: + - main pull_request: jobs: @@ -20,7 +22,7 @@ jobs: - name: Build run: | - python tools/configure.py ${{ matrix.version }} -w wibo --compiler /mwccarm + python tools/configure.py ${{ matrix.version }} -w wibo --compiler /mwccarm --extract /extract ninja arm9 report check - name: Upload report diff --git a/tools/configure.py b/tools/configure.py index 056682e9..df8e8843 100755 --- a/tools/configure.py +++ b/tools/configure.py @@ -14,7 +14,8 @@ DEFAULT_WIBO_PATH = "./wibo" parser = argparse.ArgumentParser(description="Generates build.ninja") parser.add_argument('-w', type=str, default=DEFAULT_WIBO_PATH, dest="wine", required=False, help="Path to Wine/Wibo (linux only)") -parser.add_argument("--compiler", type=Path, required=False, help="Path to compiler root directory") +parser.add_argument("--compiler", type=Path, required=False, help="Path to pre-installed compiler root directory") +parser.add_argument("--extract", type=Path, required=False, help="Path to pre-made extract directory") parser.add_argument('version', help='Game version') args = parser.parse_args() @@ -70,7 +71,7 @@ config_path = root_path / "config" build_path = root_path / "build" src_path = root_path / "src" libs_path = root_path / "libs" -extract_path = root_path / "extract" +extract_path = args.extract or root_path / "extract" tools_path = root_path / "tools" mwcc_root = args.compiler or tools_path / "mwccarm" mwcc_path = mwcc_root / MWCC_VERSION @@ -328,16 +329,17 @@ def add_download_tool_builds(n: ninja_syntax.Writer): def add_extract_build(n: ninja_syntax.Writer, project: Project): - n.build( - inputs=str(project.baserom()), - implicit=DSD, - rule="extract", - outputs=str(project.baserom_config()), - variables={ - "output_path": str(project.game_extract) - } - ) - n.newline() + if args.extract is None: + n.build( + inputs=str(project.baserom()), + implicit=DSD, + rule="extract", + outputs=str(project.baserom_config()), + variables={ + "output_path": str(project.game_extract) + } + ) + n.newline() def add_mwld_and_rom_builds(n: ninja_syntax.Writer, project: Project): |
