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

introduce M1 Mac #1018

Merged
merged 6 commits into from
Feb 2, 2024
Merged

introduce M1 Mac #1018

merged 6 commits into from
Feb 2, 2024

Conversation

shogo82148
Copy link
Owner

@shogo82148 shogo82148 commented Jan 30, 2024

Summary by CodeRabbit

  • Chores
    • Expanded testing to include macOS 14.
    • Updated MySQL and MariaDB build workflows for macOS 14 and ARM64 architecture.

Copy link

coderabbitai bot commented Jan 30, 2024

Warning

Rate Limit Exceeded

@shogo82148 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 5 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 5fdd0ed and bd6c248.

Walkthrough

The update involves expanding the testing environment by adding macOS 14 to the array of operating systems used for checks. This enhancement aims to ensure the software's compatibility and performance across an even broader range of environments, reflecting a commitment to supporting the latest technology platforms.

Changes

File Summary
.github/workflows/test.yml Added macos-14 to the list of operating systems for testing.
.github/build-mysql-darwin-macos14.sh Updated script to build and install MySQL on macOS, including architecture detection, OpenSSL handling, source download, patching, and installation archiving.
.github/workflows/build-mariadb.yml Added a new job build-darwin-arm64 targeting macos-14 to build and upload a specific version of MariaDB for the darwin-arm64 architecture.
.github/workflows/build-mysql.yml Added a new job build-darwin-arm64 targeting macOS 14 to install a newer version of bison and build MySQL for the ARM64 architecture. Also, renamed the build-darwin job to build-darwin-x64.

🐰✨
In the realm of code, where tests are king,
A new land emerges for exploring.
macOS 14 joins the fray,
Ensuring our code thrives, come what may.
🌟🐾

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>.
    • Generate unit-tests for this file.
  • 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 tests 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 generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@@ -36,6 +36,7 @@ jobs:
os:
- ubuntu-22.04
- ubuntu-20.04
- macos-14
Copy link
Contributor

Choose a reason for hiding this comment

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

[actionlint] reported by reviewdog 🐶
label "macos-14" is unknown. available labels are "windows-latest", "windows-2022", "windows-2019", "windows-2016", "ubuntu-latest", "ubuntu-22.04", "ubuntu-20.04", "ubuntu-18.04", "macos-latest", "macos-latest-xl", "macos-13-xl", "macos-13", "macos-13.0", "macos-12-xl", "macos-12", "macos-12.0", "macos-11", "macos-11.0", "macos-10.15", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file [runner-label]

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 8136316 and 3769c0e.
Files selected for processing (1)
  • .github/workflows/test.yml (1 hunks)
Additional comments: 1
.github/workflows/test.yml (1)
  • 39-39: The addition of macos-14 to the testing matrix is a positive step towards ensuring compatibility with the M1 Mac architecture. This change aligns with the PR's objectives and should help in identifying any platform-specific issues early in the development cycle.

@@ -83,6 +83,31 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

build-darwin-arm64:
runs-on: macos-14
Copy link
Contributor

Choose a reason for hiding this comment

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

[actionlint] reported by reviewdog 🐶
label "macos-14" is unknown. available labels are "windows-latest", "windows-2022", "windows-2019", "windows-2016", "ubuntu-latest", "ubuntu-22.04", "ubuntu-20.04", "ubuntu-18.04", "macos-latest", "macos-latest-xl", "macos-13-xl", "macos-13", "macos-13.0", "macos-12-xl", "macos-12", "macos-12.0", "macos-11", "macos-11.0", "macos-10.15", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file [runner-label]

@@ -80,6 +80,28 @@ jobs:
MARIADB_VERSION: ${{ matrix.mariadb }}
GITHUB_TOKEN: ${{ github.token }}

build-darwin-arm64:
runs-on: macos-14
Copy link
Contributor

Choose a reason for hiding this comment

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

[actionlint] reported by reviewdog 🐶
label "macos-14" is unknown. available labels are "windows-latest", "windows-2022", "windows-2019", "windows-2016", "ubuntu-latest", "ubuntu-22.04", "ubuntu-20.04", "ubuntu-18.04", "macos-latest", "macos-latest-xl", "macos-13-xl", "macos-13", "macos-13.0", "macos-12-xl", "macos-12", "macos-12.0", "macos-11", "macos-11.0", "macos-10.15", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file [runner-label]

@shogo82148
Copy link
Owner Author

building MySQL fails with the following error:

2024-01-31T03:59:30.6174550Z ld: archive member '/' not a mach-o file in '/Users/runner/work/_temp/build/router/src/harness/include/libharness_net_ts.a'
2024-01-31T03:59:30.6280730Z clang-15: error: linker command failed with exit code 1 (use -v to see invocation)

pyenv/pyenv#2862

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.

Review Status

Actionable comments generated: 3

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 3769c0e and 5fdd0ed.
Files selected for processing (3)
  • .github/build-mysql-darwin-macos14.sh (1 hunks)
  • .github/workflows/build-mariadb.yml (2 hunks)
  • .github/workflows/build-mysql.yml (2 hunks)
Additional comments: 3
.github/build-mysql-darwin-macos14.sh (3)
  • 12-23: The architecture detection logic is clear and straightforward. However, it's essential to ensure that the script is only intended to run on architectures that are explicitly supported (x86_64 and arm64).
  • 37-95: The conditional logic for building OpenSSL based on the MySQL version is well-implemented. However, ensure that the OpenSSL versions specified (OPENSSL_VERSION1_1_1 and OPENSSL_VERSION3) are compatible with the MySQL versions being built.

Consider verifying the compatibility of OpenSSL versions with the MySQL versions to ensure there are no runtime issues due to OpenSSL version mismatches.

  • 98-163: The steps for downloading, extracting, patching, and building MySQL are well-structured. However, it's crucial to ensure that the patches applied ($ROOT/../patches/mysql/$MYSQL_VERSION and $ROOT/../patches/mysql/$MYSQL_VERSION/darwin) exist and are relevant to the MySQL version being built.

Verify the existence and relevance of the patches for the specific MySQL versions to ensure they apply correctly and do not introduce issues.

@@ -80,6 +80,28 @@ jobs:
MARIADB_VERSION: ${{ matrix.mariadb }}
GITHUB_TOKEN: ${{ github.token }}

build-darwin-arm64:
runs-on: macos-14
Copy link

@coderabbitai coderabbitai bot Feb 1, 2024

Choose a reason for hiding this comment

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

The runs-on value macos-14 is specified for the build-darwin-arm64 job. However, according to the existing comments from the actionlint bot, macos-14 is not a recognized label. This could potentially cause the workflow to fail at runtime.

-    runs-on: macos-14
+    runs-on: macos-latest # Adjust to the correct version if macos-14 is not yet supported

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.

Suggested change
runs-on: macos-14
runs-on: macos-latest # Adjust to the correct version if macos-14 is not yet supported

Copy link
Owner Author

Choose a reason for hiding this comment

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

macos-14 is valid.
actionlint is issuing warnings based on the outdated label list.

https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/

Copy link

Choose a reason for hiding this comment

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

@shogo82148, thank you for the clarification and for providing the link to the GitHub blog post. I understand now that macos-14 is indeed a valid label for GitHub Actions runners. I appreciate your patience and the additional information.

@@ -83,6 +83,31 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

build-darwin-arm64:
runs-on: macos-14
Copy link

Choose a reason for hiding this comment

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

Similar to the previous file, the runs-on value macos-14 is specified for the build-darwin-arm64 job in .github/workflows/build-mysql.yml. Given the actionlint bot's feedback, macos-14 is not recognized, which could lead to workflow execution issues.

-    runs-on: macos-14
+    runs-on: macos-latest # Update this to the correct macOS version if macos-14 is unsupported

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.

Suggested change
runs-on: macos-14
runs-on: macos-latest # Update this to the correct macOS version if macos-14 is unsupported


set -e

MYSQL_VERSION=$1
Copy link

Choose a reason for hiding this comment

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

Ensure that the script validates the provided MySQL version format to prevent potential issues with unexpected or malformed input.

Consider adding a regex check for the MySQL version format to ensure it's valid before proceeding with the build process.

@shogo82148 shogo82148 merged commit 9e917b4 into main Feb 2, 2024
230 checks passed
@shogo82148 shogo82148 deleted the introduce-m1-mac branch February 2, 2024 01:35
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.

None yet

1 participant