Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/ci #127

Merged
merged 24 commits into from
Sep 19, 2024
Merged

Fix/ci #127

merged 24 commits into from
Sep 19, 2024

Conversation

beer-1
Copy link
Member

@beer-1 beer-1 commented Sep 19, 2024

Description

Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • New Features

    • Enhanced build process for Rust and Go environments, improving clarity and structure.
    • Expanded compatibility for various Linux and macOS configurations through updated build constraints.
  • Bug Fixes

    • Addressed potential shared library resolution issues during the build process.
  • Chores

    • Removed unnecessary cleanup steps in the build process for shared libraries.
    • Eliminated the link_system.go file, streamlining system-level operations.

@beer-1 beer-1 requested a review from a team as a code owner September 19, 2024 13:22
Copy link

coderabbitai bot commented Sep 19, 2024

Walkthrough

The pull request introduces several modifications to the GitHub Actions workflow and related files, primarily focusing on the build process for Rust and Go environments. Key changes include the reordering of installation steps for toolchains, adjustments to build constraints for Go files, and the removal of a file related to the movevm library. These alterations aim to clarify the workflow and broaden the applicability of the code across different environments.

Changes

File Path Change Summary
.github/workflows/test.yml Reordered installation steps for Rust and Go; added comment on shared library resolution issue.
Makefile Removed cleanup commands before copying shared libraries, streamlining the build process.
api/link_linux_glibc_aarch64.go Simplified build constraint by removing !sys_movevm, broadening build applicability.
api/link_linux_glibc_x86_64.go Simplified build constraint by removing !sys_movevm, broadening build applicability.
api/link_macos.go Simplified build constraint by removing !sys_movevm, allowing broader applicability on macOS.
api/link_muslc.go Simplified build constraint by removing !sys_movevm, broadening build applicability.
api/link_system.go Removed the entire file, eliminating functionality related to movevm system interactions.

Possibly related PRs

  • feat: update gas meter #117: Updates to the Cargo.toml file and introduction of the move-coverage dependency, potentially related to the Rust environment setup changes in this PR.

🐇 In the meadow, changes bloom,
Rust and Go find more room.
Libraries shared, constraints unwind,
A clearer path for all to find.
With every hop, new builds arise,
In code's embrace, our future lies! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8462f81 and 7b582ce.

Files selected for processing (7)
  • .github/workflows/test.yml (1 hunks)
  • Makefile (1 hunks)
  • api/link_linux_glibc_aarch64.go (1 hunks)
  • api/link_linux_glibc_x86_64.go (1 hunks)
  • api/link_macos.go (1 hunks)
  • api/link_muslc.go (1 hunks)
  • api/link_system.go (0 hunks)
Files not reviewed due to no reviewable changes (1)
  • api/link_system.go
Files skipped from review due to trivial changes (3)
  • api/link_linux_glibc_x86_64.go
  • api/link_macos.go
  • api/link_muslc.go
Additional context used
actionlint
.github/workflows/test.yml

47-47: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

Additional comments not posted (3)
api/link_linux_glibc_aarch64.go (1)

1-1: Verify the intentional removal of the !sys_movevm condition.

The build constraint has been modified to remove the !sys_movevm condition, potentially broadening the contexts in which this file can be built and executed.

Please confirm that this change is intentional and consider the following:

  • Are there any compatibility or functionality implications in environments where the sys_movevm condition was previously a limiting factor?
  • Have the potential consequences of this change been thoroughly assessed?

To verify the usage of the sys_movevm build tag across the codebase, run the following script:

Verification successful

Removal of !sys_movevm condition is confirmed and appears intentional.

The sys_movevm build tag is not present anywhere in the codebase, confirming that its removal from api/link_linux_glibc_aarch64.go is intentional. This change aligns the build constraints with other platform-specific files in the project.

Implications:

  • The file will now be included in builds for Linux on ARM64 without any additional conditions.
  • This change simplifies the build process and maintains consistency with other architecture-specific files.

No further action is required regarding this change.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of the `sys_movevm` build tag.

# Test: Search for the build tag usage. Expect: Occurrences in relevant files.
rg --type go $'//go:build .*sys_movevm'

Length of output: 40


Script:

#!/bin/bash
# Description: Verify the existence of Go files and search for related build tags

# Test 1: Check if there are any Go files in the repository
echo "Checking for Go files:"
fd -e go

# Test 2: Search for any occurrences of "movevm" in Go files
echo -e "\nSearching for 'movevm' in Go files:"
rg --type go "movevm"

# Test 3: Check for other common build tags to verify search functionality
echo -e "\nSearching for other common build tags:"
rg --type go "//go:build (linux|darwin|windows)"

Length of output: 2974

.github/workflows/test.yml (2)

50-51: LGTM!

Explicitly labeling the step as "Build Rust" improves the clarity and readability of the workflow. The make build-rust command is correctly used to build the Rust code.


52-54: LGTM!

Moving the Go setup step after the Rust build step ensures that the sequential dependency is maintained, where Rust is built before Go is set up. The actions/setup-go@v4 action is correctly used to set up Go version 1.22.

Comment on lines +57 to +61
# TODO - If we do not run "make build-linux", golang succeeds to find the shared libraries.
# However, if we run "make build-linux", golang fails to find the shared libraries because
# it tries to find libmovevm.so and libcompiler.so which is not present.
cp api/libmovevm.x86_64.so api/libmovevm.so
cp api/libcompiler.x86_64.so api/libcompiler.so
Copy link

Choose a reason for hiding this comment

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

Investigate and address the shared library resolution issue.

The copying of shared library files (libmovevm.x86_64.so and libcompiler.x86_64.so) to libmovevm.so and libcompiler.so is a workaround for a potential issue with shared library resolution when running the make build-linux command. While this workaround allows the CI pipeline to proceed, it's important to investigate and address the underlying issue to ensure a more robust and maintainable solution.

Do you want me to investigate the shared library resolution issue further and propose a more robust solution? I can help analyze the root cause and suggest alternative approaches to avoid relying on the workaround in the long run. Please let me know if you'd like me to open a GitHub issue to track this investigation and improvement.

run: |
make build-rust
- name: Install latest rust
uses: actions-rs/toolchain@v1
Copy link

Choose a reason for hiding this comment

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

Update the actions-rs/toolchain action to a newer version.

The static analysis tool actionlint has identified that the runner of the actions-rs/toolchain@v1 action is too old to run on GitHub Actions. Please update the action's version to ensure compatibility and avoid potential issues in the CI pipeline.

Apply this diff to update the action version:

-uses: actions-rs/toolchain@v1
+uses: actions-rs/toolchain@v2
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: actions-rs/toolchain@v1
uses: actions-rs/toolchain@v2
Tools
actionlint

47-47: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

@beer-1 beer-1 merged commit 44a7cff into main Sep 19, 2024
5 checks passed
@beer-1 beer-1 deleted the fix/ci branch September 19, 2024 13:46
@coderabbitai coderabbitai bot mentioned this pull request Oct 18, 2024
11 tasks
@coderabbitai coderabbitai bot mentioned this pull request Dec 11, 2024
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