Skip to content

fix(ci): update GitHub Actions and optimize CI configuration with code quality improvements#390

Closed
cici0602 wants to merge 1 commit into
apache:masterfrom
cici0602:ci-v1-final
Closed

fix(ci): update GitHub Actions and optimize CI configuration with code quality improvements#390
cici0602 wants to merge 1 commit into
apache:masterfrom
cici0602:ci-v1-final

Conversation

@cici0602
Copy link
Copy Markdown
Contributor

CI and Code Improvements

This PR implements a series of CI workflow improvements and code fixes to enhance build reliability, address deprecation warnings, and maintain code quality.

GitHub Actions Updates

  • Updated actions/cache from v1/v2 to v4 across all workflow files for better caching performance
  • Updated actions/checkout to v4/v5 in all workflows
  • Updated codecov/codecov-action from v1 to v4
  • Replaced deprecated smrpn/criterion-compare-action with boa-dev/criterion-compare-action@v3.2.4 and explicitly passed branchName: ${{ github.base_ref }} for correct PR baseline comparison
  • Pinned smrpn/criterion-compare-action to appropriate versions

CI Configuration Optimizations

  • Corrected macOS runner name to macos-latest
  • Enhanced GNU tar installation robustness on macOS and properly set PATH for Homebrew paths
  • Fixed YAML matrix indentation errors
  • Added fallback for cache key suffix using github.run_id when secrets.CACHE_VERSION is unavailable
  • Split toolchain installation and conditional components install to avoid beta channel failures
  • Added fetch-depth: 0 to checkout action to ensure all branches are available for benchmark comparison
  • Updated cache configuration to use v4 with restore-keys for better cache compatibility

Code Quality Fixes

  • Install clippy on all toolchains (stable and beta) to prevent build failures
  • Addressed clippy lints:
    • Used std::io::Error::other(...) instead of io::Error::new(..., ErrorKind::Other)
    • Added explicit lifetime to Cow return type in escape_eval
    • Removed related unused imports
  • Fixed code formatting issues with cargo fmt

These changes improve the overall CI pipeline reliability, address deprecation warnings, and maintain high code quality standards for the project.





chore: update GitHub Actions to latest versions

- Update actions/cache from v1/v2 to v4 in all workflow files
- Update actions/checkout to v4 in all workflow files
- Update codecov/codecov-action from v1 to v4

ci: optimize configuration and fix several issues

Correct macOS runner name to macos-latest
Enhance GNU tar installation robustness and set PATH via  for Homebrew paths
Fix YAML matrix indentation errors
Add fallback for cache key suffix (use github.run_id when secrets.CACHE_VERSION is unavailable)
Split toolchain installation and conditional components install to avoid beta channel failures
Pin smrpn/criterion-compare-action to @v1 in pull_request.yml

fix(ci): install clippy on all toolchains to prevent beta build failures

Remove conditional installation that only installed clippy on stable toolchain,
ensuring clippy checks work consistently across both stable and beta toolchains.
Fixes 'cargo-clippy is not installed' error on macOS beta toolchain.

fix: address clippy lints (io-other-error, mismatched-lifetime-syntaxes)

- use std::io::Error::other(...) instead of io::Error::new(..., ErrorKind::Other)
- add explicit lifetime to Cow return type in escape_eval
- remove related unused imports

fix: resolve io_other_error clippy warnings

style: fix code formatting issues for cargo fmt

Replace deprecated smrpn action with boa-dev/criterion-compare-action@v3.2.4

Explicitly pass branchName: ${{ github.base_ref }} to ensure correct PR baseline comparison.

fix(github-actions): update cache configuration to use v4 and add restore-keys

Resolve deprecated actions/cache v2.1.4 error by updating path configuration
and adding restore-keys fallback mechanism for better cache compatibility.

 checkout v4->v5

ci: use pull_request trigger so PR branch workflow (actions/cache@v4) is used

criterion-compare-action v1 -> master

Added fetch-depth: 0 to checkout action to ensure all branches
are available for criterion-compare-action
@cici0602 cici0602 closed this Sep 17, 2025
@cici0602 cici0602 deleted the ci-v1-final branch September 17, 2025 07:36
@cici0602 cici0602 restored the ci-v1-final branch September 17, 2025 07:37
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