Skip to content

Fix/ci init and workflow - #1

Closed
DUptain1993 wants to merge 2 commits into
mainfrom
fix/ci-init-and-workflow
Closed

Fix/ci init and workflow#1
DUptain1993 wants to merge 2 commits into
mainfrom
fix/ci-init-and-workflow

Conversation

@DUptain1993

@DUptain1993 DUptain1993 commented Nov 5, 2025

Copy link
Copy Markdown
Owner

High-level PR Summary

This PR simplifies the CI initialization process by replacing a complex repository synchronization script with a minimal, idempotent initialization template and adds a basic GitHub Actions workflow that runs the simplified init script on pushes and pull requests to the main branch.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 ci/init_repo.sh
2 .github/workflows/ci.yml

Need help? Join our Discord

Removed old usage instructions and branch selection logic. Added basic initialization and ensured necessary directories and tools are present.
@DUptain1993 DUptain1993 closed this Nov 5, 2025

@recurseml recurseml Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review by RecurseML

🔍 Review performed on 3b09158..89e6c9d

  Severity     Location     Issue     Delete  
High ci/init_repo.sh:22 Breaking API change causes workflow crash
✅ Files analyzed, no issues (1)

.github/workflows/ci.yml

Comment thread ci/init_repo.sh

echo "repo sync failed after $MAX_ATTEMPTS attempts"
exit 5
echo "Init complete."

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

BREAKING CHANGE: The init_repo.sh script has been gutted, removing all repository initialization logic (repo tool installation, repo init, repo sync) that existing workflows depend on. The unchanged workflow file .github/workflows/build-twrp.yml at lines 81-85 calls this script with 4 parameters expecting it to initialize a TWRP build environment by syncing source code to ~/twrp/. However, the modified script now only creates ~/bin and exports PATH, then exits claiming "Init complete."

This will cause build-twrp.yml to CRASH with the following sequence:

  1. Line 81-85: Calls init_repo.sh successfully, but no source code is synced
  2. Line 96: Executes 'source build/envsetup.sh' which will FAIL with error: "bash: build/envsetup.sh: No such file or directory" because the TWRP source tree was never initialized
  3. The workflow will terminate with a non-zero exit code

The old script accepted parameters: <manifest_url> [desired_branch] [workdir] [jobs] and performed:

  • Repo tool installation to $HOME/bin/repo
  • Git ls-remote to query available branches
  • Branch selection logic
  • repo init --depth=1 -u $MANIFEST_URL -b $BRANCH
  • repo sync with retry logic (up to 5 attempts)
  • Created and populated the working directory (~/twrp by default)

The new script ignores all parameters and performs none of these operations, making build-twrp.yml fail at the 'Setup Build Environment' step when it tries to source the non-existent build/envsetup.sh file.

Affected unchanged code locations:

  • .github/workflows/build-twrp.yml:81-85 (script invocation with 4 parameters)
  • .github/workflows/build-twrp.yml:96 (source build/envsetup.sh - will fail)
  • .github/workflows/build-twrp.yml:103 (source build/envsetup.sh - will fail)
  • .github/workflows/build-twrp.yml:106-107 (lunch and mka commands - will fail due to missing environment)

React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant