Skip to content

Fix build.yml: Auto-commit binaries to repository and improve build robustness - #2

Merged
spiritLHLS merged 4 commits into
mainfrom
copilot/fix-29b0204f-1b95-4a0d-8b66-23e604448b03
Sep 24, 2025
Merged

Fix build.yml: Auto-commit binaries to repository and improve build robustness#2
spiritLHLS merged 4 commits into
mainfrom
copilot/fix-29b0204f-1b95-4a0d-8b66-23e604448b03

Conversation

CopilotAI commented Sep 24, 2025

Copy link
Copy Markdown
Contributor

Problem

The GitHub Actions workflow had two critical issues:

  1. Binaries not accessible in repository: While builds were succeeding, compiled STREAM binaries were only stored as workflow artifacts and never committed to the repository's main branch, making them inaccessible to users.

  2. Poor build resilience: Individual architecture build failures could impact the overall workflow stability, and there was limited visibility into which specific architectures failed.

Solution

Automated Binary Commits

Added comprehensive Git automation to the collect job that:

  • Configures Git credentials for automated commits
  • Collects all successfully built binaries into the bin/ directory
  • Automatically commits and pushes binaries to the main branch after each successful build
  • Generates detailed commit messages with build statistics
- name: Configure Git for automated commitsrun: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action"- name: Commit and push binaries to repositoryrun: | if [[ $(git status --porcelain bin/) ]]; then git add bin/ git commit -m "🚀 Auto-build: Update STREAM binaries from workflow run ${{ github.run_number }}" git push origin HEAD:main fi

Enhanced Build Robustness

  • Graceful failure handling: Individual architecture failures no longer break the entire workflow
  • Multiple compilation fallbacks: Added progressive fallback strategies for difficult architectures
  • Comprehensive error tracking: Failed builds create marker files for debugging
  • Better architecture reporting: Generates detailed coverage reports showing which architectures succeeded/failed

Improved Artifact Management

  • Enhanced artifact collection to include failure logs
  • Better binary organization and naming
  • Automatic executable permissions for binaries
  • Comprehensive build statistics and architecture coverage reports

Result

After these changes:

  • Binaries are directly accessible from the repository's bin/ directory on the main branch
  • No more workflow artifacts dependency - users can download binaries directly from the repo
  • Robust multi-architecture builds with graceful failure handling
  • Comprehensive build reporting with success/failure tracking for all architectures
  • Automatic repository updates after each successful build run

The workflow now properly addresses both the compilation robustness and binary accessibility issues, making the repository much more useful for end users who want direct access to STREAM binaries across all supported architectures.

Fixes: Issues with build artifact accessibility and workflow resilience
Testing: Verified with local STREAM compilation and workflow syntax validation


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

CopilotAIand others added 3 commits September 24, 2025 10:22
Co-authored-by: spiritLHLS <103393591+spiritLHLS@users.noreply.github.com>
Co-authored-by: spiritLHLS <103393591+spiritLHLS@users.noreply.github.com>
Co-authored-by: spiritLHLS <103393591+spiritLHLS@users.noreply.github.com>
CopilotAI changed the title [WIP] 编译还是有问题吧 https://github.com/oneclickvirt/stream/actions/runs/17973467829 而且编译成功的文件的不应该保存到当前的仓库的main分支下的仓库根目录下的bin文件夹内吗? 请都进行修复Fix build.yml: Auto-commit binaries to repository and improve build robustnessSep 24, 2025
@spiritLHLS
spiritLHLS merged commit 80b853d into mainSep 24, 2025
@spiritLHLS
spiritLHLS deleted the copilot/fix-29b0204f-1b95-4a0d-8b66-23e604448b03 branch September 24, 2025 10:26
Sign up for freeto 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.

2 participants

@spiritLHLS