setup-ruby-flash now tracks elapsed time for all major build and install operations, providing visibility into performance and helping identify bottlenecks.
Step: Build rv from source
Output: steps.build-rv.outputs.build-time
Includes: Git clone, checkout, Rust compilation, binary installation
When tracked: Only when rv-git-ref is set and rv is built from source
Step: Install rv from release
Output: steps.install-rv.outputs.install-time
Includes: Download, extraction, installation
When tracked: When rv is installed from a release (not building from source)
Step: Install Ruby
Output: steps.install-ruby.outputs.install-time
Includes: Cache pre-seeding, rv ruby install command (with retries)
When tracked: When Ruby is installed (not from cache)
Step: Build ore from source (sub-timing)
Output: steps.build-ore.outputs.gfgo-build-time
Includes: Git clone, checkout, go.work setup
When tracked: Only when both ore-git-ref and gfgo-git-ref are set
Step: Build ore from source
Output: steps.build-ore.outputs.build-time
Includes: Git clone, checkout, Go compilation, binary installation, gemfile-go setup (if applicable)
When tracked: Only when ore-git-ref is set and ore is built from source
Step: Install gems with ore
Output: Displayed in summary as "Gem Install Time"
Includes: ore install command execution
When tracked: Always when ore-install: true or bundler-cache: true
Steps: Start fallback timer → Setup Ruby with ruby/setup-ruby → End fallback timer
Output: steps.fallback-end.outputs.elapsed
Includes: Complete ruby/setup-ruby action execution
When tracked: Only when fallback to ruby/setup-ruby is used
All timing information is displayed in the GitHub Actions step summary:
### setup-ruby-flash Summary ⚡
| Component | Value |
|-----------|-------|
| Ruby Version | 3.4 |
| RubyGems Version | 3.5.0 |
| Bundler Version | 2.5.0 |
| rv Version | 0.4.1 |
| ore Version | 0.18.0 |
| Platform | linux-amd64 |
| Gem Cache Hit | false |
| rv Install Time | 2s |
| Ruby Install Time | 8s |
| Gem Install Time | 45s |### setup-ruby-flash Summary ⚡
| Component | Value |
|-----------|-------|
| Ruby Version | 3.4 |
| RubyGems Version | 3.5.0 |
| Bundler Version | 2.5.0 |
| rv Version | main |
| ore Version | feat/new-feature |
| Platform | linux-amd64 |
| Gem Cache Hit | false |
| rv Build Time | 180s |
| Ruby Install Time | 8s |
| gemfile-go Build Time | 12s |
| ore Build Time | 65s |
| Gem Install Time | 45s |When using fallback, the timing is captured but not displayed in a summary (since ruby/setup-ruby generates its own summary). However, the elapsed time is logged:
setup-ruby fallback completed in 35s
All timing uses Unix timestamps:
START_TIME=$(date +%s)
# ... operation ...
END_TIME=$(date +%s)
ELAPSED=$((END_TIME - START_TIME))
echo "operation-time=$ELAPSED" >> $GITHUB_OUTPUT- Each timed step has an
idto make outputs accessible - Timing is stored as step outputs for use in summaries
- Times are displayed in seconds (integer)
Timing information only appears in summaries when:
- The operation actually ran (not cached)
- The operation completed successfully
- The output is available
Example:
if [ -n "${{ steps.build-rv.outputs.build-time }}" ]; then
echo "| rv Build Time | ${{ steps.build-rv.outputs.build-time }}s |" >> $GITHUB_STEP_SUMMARY
fiWhen testing changes that might affect build times:
- uses: appraisal-rb/setup-ruby-flash@v1
with:
ruby-version: "3.4"
ore-git-ref: "feat/optimization"
gfgo-git-ref: "feat/parser-speedup"Check the summary to see:
- gemfile-go Build Time
- ore Build Time
- Total impact on workflow
First run (no cache):
rv Install Time: 2s
Ruby Install Time: 8s
ore Build Time: 65s (if building from source)
Gem Install Time: 45s
Second run (cached):
Ruby Cache Hit: true
Gem Cache Hit: true
(No install times - everything restored from cache)
If a workflow is slow, check the summary:
- High Ruby Install Time? Check network/rv issues
- High Gem Install Time? Large dependencies or compilation
- High Build Times? Consider using releases instead
| Operation | Typical Time | Notes |
|---|---|---|
| rv Install | 1-3s | Download + extract binary |
| rv Build | 150-300s | Full Rust compilation |
| Ruby Install | 5-15s | Download + extract Ruby tarball |
| ore Install | 1-2s | Download ore binary (not tracked yet) |
| ore Build | 30-90s | Go compilation |
| gemfile-go Setup | 5-20s | Clone + workspace setup |
| Gem Install | 20-120s | Depends on gem count/complexity |
| Fallback (ruby/setup-ruby) | 30-60s | Ruby compilation on first run |
All cached operations: ~1-2s (cache restore only)
- name: Report timing
run: |
echo "rv build took: ${{ steps.build-rv.outputs.build-time }}s"
echo "ore build took: ${{ steps.build-ore.outputs.build-time }}s"Timing outputs are only available within the same job. To pass to other jobs:
jobs:
setup:
outputs:
rv-build-time: ${{ steps.build-rv.outputs.build-time }}
steps:
- uses: appraisal-rb/setup-ruby-flash@v1
# ...
report:
needs: setup
steps:
- run: echo "rv built in ${{ needs.setup.outputs.rv-build-time }}s"Potential improvements:
- Track ore install from release time
- Add timing for RubyGems/Bundler installation
- Aggregate total setup time
- Add timing comparison between runs
- Detect and warn about unusually slow operations
Cause: Operation was cached or didn't run
Solution: Expected behavior - cached operations don't show timing
Cause: Includes all retries and wait times
Check: Look at the step logs for retry messages
Solution: Add additional timing blocks in the specific operation you want to measure
- Performance Visibility: See exactly where time is spent
- Optimization Opportunities: Identify slow operations
- Debugging: Diagnose slow workflows
- Comparison: Compare build-from-source vs release
- Documentation: Real data for performance claims
Elapsed time tracking provides comprehensive visibility into setup-ruby-flash performance, helping users understand, optimize, and debug their workflows. All major operations are tracked, and timing is displayed clearly in the GitHub Actions summary.