Skip to content

CI: Release Testing#1259

Merged
xushiwei merged 27 commits intogoplus:mainfrom
luoliwoshang:test/refine
Sep 8, 2025
Merged

CI: Release Testing#1259
xushiwei merged 27 commits intogoplus:mainfrom
luoliwoshang:test/refine

Conversation

@luoliwoshang
Copy link
Member

@luoliwoshang luoliwoshang commented Sep 3, 2025

Fixes #1258

Main Objectives

  • Cache .sysroot downloads - Optimize build performance by avoiding repeated sysroot generation
  • Integrate Hello World testing into release pipeline - Ensure quality and usability of release artifacts

Implement

Reuse goreleaser setup process for both testing and release

Current Flow Limitations:

  • Testing phase: goreleaser release --snapshot → builds snapshot version of llgo
  • Release phase: goreleaser release → builds corresponding tag version of llgo
  • Must build twice: Free version of goreleaser cannot avoid duplicate builds

Ideal Flow (goreleaser pro only):
Only the paid goreleaser pro can do goreleaser release --prepare to prepare release, then later use goreleaser publish and goreleaser announce to publish. Therefore, with the current free version, the testing phase can only build --snapshot version of llgo, and to build the corresponding tag version of llgo, we must run goreleaser release again at the end.

Implemented Features

1. Multi-stage Release Pipeline

  • Sysroot caching stage: Parallel generation and caching of Darwin/Linux sysroot
  • Build stage: Cross-platform builds using cached sysroot
  • Testing stage: Test build artifacts on real target platforms
  • Release stage: Execute actual release only when tagged

2. Intelligent Caching Mechanism

  • Script hash-based cache keys: Auto-invalidation when scripts change
  • Cache validation: Ensure cache content integrity before saving
  • Conditional execution: Skip time-consuming generation on cache hit

3. Composite Action Refactoring

  • setup-goreleaser action: Consolidates environment setup logic
  • Reusable components: Shared setup process between build and release jobs
  • Standardized configuration: Unified Go version and sysroot handling

4. Cross-platform Artifact Testing

  • Real environment testing: Validate binaries on target operating systems
  • Hello World validation: Ensure basic functionality works
  • Multi-architecture support: Covers macOS(Intel/ARM64) and Linux(AMD64/ARM64)

5. CI Workflow Optimization

  • Remove duplicate workflows: Clean up outdated CI configuration files
  • Expand trigger conditions: Support complete testing on branch pushes and PRs
  • Artifact management: Automated upload and download of release artifacts

Technical Details

Cache Key Design

  • Darwin: darwin-sysroot-${script_hash}-0.0.5
  • Linux: linux-sysroot-${script_hash}-0.0.7

Results

  1. Performance improvement: Save 10+ minutes of sysroot generation time on cache hit
  2. Enhanced reliability: Early detection of ARM64 compatibility issues
  3. Test coverage: Ensure release artifacts are usable on target platforms
  4. Simplified maintenance: Unified release and testing process

release pipeline

image

current pr's ci is pending,and at my push's ci check is success

https://github.com/luoliwoshang/llgo/actions/runs/17460199687

and with the release result https://github.com/luoliwoshang/llgo/releases/tag/v0.0.1-testrefine.9

@luoliwoshang luoliwoshang marked this pull request as draft September 3, 2025 06:13
@luoliwoshang luoliwoshang force-pushed the test/refine branch 2 times, most recently from 9327eb0 to 29795ec Compare September 3, 2025 06:19
@luoliwoshang
Copy link
Member Author

some github action error
image

@luoliwoshang luoliwoshang changed the title ci:goreleaser file to artifacts ci: release testing Sep 3, 2025
@luoliwoshang luoliwoshang force-pushed the test/refine branch 2 times, most recently from c1f68ce to 95f7706 Compare September 3, 2025 13:20
@luoliwoshang luoliwoshang force-pushed the test/refine branch 2 times, most recently from 9e7fb01 to 7f42840 Compare September 4, 2025 02:42
@luoliwoshang luoliwoshang force-pushed the test/refine branch 2 times, most recently from f5fb6b7 to 6b20530 Compare September 4, 2025 04:24
@luoliwoshang luoliwoshang changed the title ci: release testing CI: Release Testing Sep 4, 2025
@luoliwoshang luoliwoshang force-pushed the test/refine branch 2 times, most recently from 5780de2 to 351869d Compare September 4, 2025 07:35
@luoliwoshang luoliwoshang marked this pull request as ready for review September 4, 2025 08:30
@luoliwoshang luoliwoshang marked this pull request as draft September 4, 2025 08:31
@luoliwoshang luoliwoshang marked this pull request as ready for review September 4, 2025 09:37
@codecov
Copy link

codecov bot commented Sep 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.28%. Comparing base (f41badd) to head (922d174).
⚠️ Report is 39 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1259   +/-   ##
=======================================
  Coverage   90.28%   90.28%           
=======================================
  Files          40       40           
  Lines       11704    11704           
=======================================
  Hits        10567    10567           
  Misses       1010     1010           
  Partials      127      127           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@luoliwoshang
Copy link
Member Author

@cpunion @xushiwei need review

@xushiwei xushiwei merged commit fb94329 into goplus:main Sep 8, 2025
36 checks passed
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.

Proposal(test) :release testing

3 participants