From 7553e25bbf6776279d18b959110ee38e89ee09a9 Mon Sep 17 00:00:00 2001 From: mahee96 <47920326+mahee96@users.noreply.github.com> Date: Tue, 24 Feb 2026 01:10:38 +0530 Subject: [PATCH] CI: improve more ci worflow --- .github/workflows/nightly.yml | 10 +++++++++- scripts/ci/workflow.py | 23 +++++++++++++++++------ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c44502c1..285c2bf3 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -14,6 +14,10 @@ concurrency: jobs: build: runs-on: macos-26 + strategy: + fail-fast: true + matrix: + xcode-version: ['26.2'] steps: - uses: actions/checkout@v4 @@ -27,7 +31,6 @@ jobs: # runtime env setup # -------------------------------------------------- - uses: actions/checkout@v4 - if: ${{ inputs.is_beta }} with: repository: 'SideStore/beta-build-num' ref: ${{ env.ref }} @@ -52,6 +55,11 @@ jobs: echo "SHORT_COMMIT=$SHORT_COMMIT" >> $GITHUB_ENV echo "VERSION=$QUALIFIED_VERSION" >> $GITHUB_ENV + - name: Setup Xcode + uses: maxim-lobanov/setup-xcode@v1.6.0 + with: + xcode-version: ${{ matrix.xcode-version }} + - name: Restore Cache id: xcode-cache uses: actions/cache/restore@v3 diff --git a/scripts/ci/workflow.py b/scripts/ci/workflow.py index 47f70c32..1aa7fbd5 100644 --- a/scripts/ci/workflow.py +++ b/scripts/ci/workflow.py @@ -328,21 +328,32 @@ COMMANDS = { } def main(): + def usage(): + lines = ["Available commands:"] + for name, (_, argc, arg_usage) in COMMANDS.items(): + suffix = f" {arg_usage}" if arg_usage else "" + lines.append(f" - {name}{suffix}") + return "\n".join(lines) + if len(sys.argv) < 2: - raise SystemExit("No command") + raise SystemExit(usage()) cmd = sys.argv[1] if cmd not in COMMANDS: - raise SystemExit(f"Unknown command '{cmd}'") + raise SystemExit( + f"Unknown command '{cmd}'.\n\n{usage()}" + ) - func, argc, _ = COMMANDS[cmd] + func, argc, arg_usage = COMMANDS[cmd] + + if len(sys.argv) - 2 < argc: + suffix = f" {arg_usage}" if arg_usage else "" + raise SystemExit(f"Usage: workflow.py {cmd}{suffix}") args = sys.argv[2:2 + argc] - result = func(*args) if argc else func() + func(*args) if argc else func() - if result is not None: - print(result) if __name__ == "__main__": main() \ No newline at end of file