Skip to content

ci: add --no-system-deps flag to setup script and use in jobs#234

Merged
sudip-mondal-2002 merged 7 commits into
sudip-mondal-2002:mainfrom
ArjunKalirana:main
May 29, 2026
Merged

ci: add --no-system-deps flag to setup script and use in jobs#234
sudip-mondal-2002 merged 7 commits into
sudip-mondal-2002:mainfrom
ArjunKalirana:main

Conversation

@ArjunKalirana

@ArjunKalirana ArjunKalirana commented May 25, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR adds an explicit --no-system-deps flag to scripts/setup_dependencies.sh to allow skipping the interactive system package installation block. It also updates all 6 "Setup External Dependencies" steps in the CI workflow (.github/workflows/ci.yml) to use this flag, ensuring robust non-interactive builds across all platforms (Linux, macOS, Windows, Web, Android, and iOS).

Related Issue

Fixes #144

Type of Change

  • 🔧 Build / CI / Configuration

How Was This Tested?

  • Platform(s) tested on: Windows (Git Bash).
  • Test command run: bash ./scripts/setup_dependencies.sh --no-system-deps
  • Manual test steps: Validated that the script correctly skips the install_deps prompt when the flag is present and continues to fetch the external/ folder components (ImGui, kiss_fft, etc.).

Checklist

  • Code compiles and builds successfully on my platform
  • All existing tests pass (./amplitron-tests)
  • New tests added for new functionality (if applicable)
  • Documentation updated (behavior documented in script comments)
  • No blocking calls on the audio thread
  • Tested on: Windows 11

Screenshots / Demo

(N/A - This is a backend/CI optimization change)

Summary by CodeRabbit

  • Chores
    • CI updated to invoke the dependency setup more directly and allow skipping system dependency installation across build environments.
    • Setup script adds a flag to bypass system dependency installation and suppresses interactive prompts in non-interactive runs.
  • Tests
    • Added an automated test to verify the skip-flag behavior and ensure consistent messaging when system dependencies are bypassed.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Add a --no-system-deps flag to scripts/setup_dependencies.sh to skip interactive system-package installs, update six CI "Setup External Dependencies" steps to make the script executable and run it with that flag, and add a Bash test that verifies the skip message.

Changes

Centralize external dependency setup

Layer / File(s) Summary
Add --no-system-deps flag & control flow
scripts/setup_dependencies.sh
Adds SKIP_SYSTEM_DEPS=false, parses --no-system-deps to set it true, documents install_deps, and changes gating so the script skips installation when the flag is set, prompts only in interactive shells, and prints a skip message in non-interactive shells.
Test: verify --no-system-deps skip message
tests/scripts/test_setup_dependencies.sh
New executable Bash test runs scripts/setup_dependencies.sh --no-system-deps, captures combined output, asserts the exact skip message Skipping system dependency installation (--no-system-deps flag set). is present, reports pass/fail, and cleans temporary state.
Update CI jobs to use setup script
.github/workflows/ci.yml
Six "Setup External Dependencies" steps (Linux, macOS, Emscripten web, Windows MSYS2, Android, iOS) now chmod +x scripts/setup_dependencies.sh and invoke ./scripts/setup_dependencies.sh --no-system-deps instead of bash ./scripts/setup_dependencies.sh.

🎯 3 (Moderate) | ⏱️ ~20 minutes

🐰
I dug a patch beneath the trees,
One script now feeds six CI bees.
No prompts in the runner light,
Skip-system flag hops into sight. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a --no-system-deps flag to the setup script and using it in CI jobs across multiple platforms.
Linked Issues check ✅ Passed The PR addresses all primary coding objectives from issue #144: adds the --no-system-deps flag, replaces inline setup in six CI jobs, maintains local make setup compatibility, and includes tests validating the flag.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #144 requirements. The three modified files (CI workflow, setup script, and new test file) are essential to centralizing dependency setup and eliminating duplication.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
scripts/setup_dependencies.sh (1)

107-107: 💤 Low value

Consider using consistent bracket syntax.

Line 8 uses [[ ]] with ==, while line 107 uses [ ] with =. Both are valid, but consistency improves readability.

♻️ Proposed consistency fix
-if [ "$SKIP_SYSTEM_DEPS" = true ]; then
+if [[ "$SKIP_SYSTEM_DEPS" == true ]]; then
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/setup_dependencies.sh` at line 107, The conditional using
single-bracket test for SKIP_SYSTEM_DEPS is inconsistent with the earlier
double-bracket style; change the line that currently reads using [
"$SKIP_SYSTEM_DEPS" = true ] to use the same double-bracket form and operator as
the earlier check (use [[ "$SKIP_SYSTEM_DEPS" == true ]]) while keeping the
variable quoted, so replace the single-bracket check for SKIP_SYSTEM_DEPS with a
double-bracket equality check for consistency.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@scripts/setup_dependencies.sh`:
- Line 107: The conditional using single-bracket test for SKIP_SYSTEM_DEPS is
inconsistent with the earlier double-bracket style; change the line that
currently reads using [ "$SKIP_SYSTEM_DEPS" = true ] to use the same
double-bracket form and operator as the earlier check (use [[
"$SKIP_SYSTEM_DEPS" == true ]]) while keeping the variable quoted, so replace
the single-bracket check for SKIP_SYSTEM_DEPS with a double-bracket equality
check for consistency.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0cd96ee1-ba71-417d-a90e-e01b4aa192c8

📥 Commits

Reviewing files that changed from the base of the PR and between 70011b1 and 016ddc5.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • scripts/setup_dependencies.sh

@sudip-mondal-2002

Copy link
Copy Markdown
Owner

@ArjunKalirana please check the CI failures

@github-actions github-actions Bot added level:beginner Easy task · 10 GSSoC points type:refactor type:testing Unit tests, integration tests, or test coverage labels May 29, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

402-408: 💤 Low value

Optional: pin the action to a commit SHA (flagged by zizmor).

zizmor reports actions/upload-artifact@v7 as unpinned per a blanket pinning policy. Note this is consistent with the rest of the file, which uses floating @vN tags throughout, so fixing only this new step is inconsistent — consider addressing pinning repo-wide in a separate change if the policy is intended to be enforced.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 402 - 408, The workflow step named
"Upload Playwright test results" uses the floating tag
actions/upload-artifact@v7; replace that floating tag with a specific commit SHA
for the actions/upload-artifact repository (e.g.,
actions/upload-artifact@<commit-sha>) so the step is pinned; update the uses
line in that step to the chosen full commit SHA while keeping the step name,
with the same inputs (name, path, retention-days) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 402-408: The workflow step named "Upload Playwright test results"
uses the floating tag actions/upload-artifact@v7; replace that floating tag with
a specific commit SHA for the actions/upload-artifact repository (e.g.,
actions/upload-artifact@<commit-sha>) so the step is pinned; update the uses
line in that step to the chosen full commit SHA while keeping the step name,
with the same inputs (name, path, retention-days) unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9c26435d-5752-4cdb-ab25-fc612dcf86b0

📥 Commits

Reviewing files that changed from the base of the PR and between 016ddc5 and 97dbd15.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • scripts/setup_dependencies.sh
  • tests/scripts/test_setup_dependencies.sh
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/scripts/test_setup_dependencies.sh
  • scripts/setup_dependencies.sh

@github-actions

github-actions Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Report 📊

Line Coverage: 80.7%

✅ Coverage meets threshold: 80.7% >= 60%

Full Coverage Summary
Summary coverage rate:
  lines......: 80.7% (6816 of 8442 lines)
  functions..: 92.1% (746 of 810 functions)
  branches...: no data found

@github-actions

github-actions Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

PR Preview Removed

The GitHub Pages preview for this PR has been removed because the PR was closed.

@sudip-mondal-2002 sudip-mondal-2002 added the gssoc:approved GSSoC 2026 contribution label May 29, 2026

@sudip-mondal-2002 sudip-mondal-2002 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sudip-mondal-2002 sudip-mondal-2002 merged commit 5775096 into sudip-mondal-2002:main May 29, 2026
9 checks passed
github-actions Bot added a commit that referenced this pull request May 29, 2026
akira-616 pushed a commit to akira-616/Amplitron that referenced this pull request May 30, 2026
…mondal-2002#234)

* ci: add --no-system-deps flag to setup script and use in jobs

* checkout: temporary commit for worktree checkout

* style: use consistent double bracket syntax in setup script

* docs: add docstring to setup script and unit test for flag detection

* fix: replace C-style block comment with shell comments in setup script

* Delete tests/scripts/test_setup_dependencies.sh

---------

Co-authored-by: SUDIP MONDAL <sudipmondal.2002@rediffmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC 2026 contribution level:beginner Easy task · 10 GSSoC points mentor:sudip-mondal-2002 type:refactor type:testing Unit tests, integration tests, or test coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: replace duplicated "Setup External Dependencies" inline scripts with scripts/setup_dependencies.sh

2 participants