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

ci: arm builds for linux #79

Merged
merged 1 commit into from
Feb 15, 2025
Merged

ci: arm builds for linux #79

merged 1 commit into from
Feb 15, 2025

Conversation

0xbrayo
Copy link
Member

@0xbrayo 0xbrayo commented Feb 15, 2025

#73


Important

Add ARM build support for macOS and Linux in GitHub Actions workflows.

  • Build and Release Workflows:
    • Add ARM build support for macOS and Linux in build.yml and release.yml.
    • Modify matrix strategy to include macos-latest with --target aarch64-apple-darwin and ubuntu-22.04-arm.
    • Add args parameter to tauri-action step to pass target architecture.
  • Dependencies:
    • Add ARM-specific dependencies for ubuntu-22.04-arm in both workflows.

This description was created by Ellipsis for 597f06a. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 6607557 in 2 minutes and 5 seconds

More details
  • Looked at 37 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. .github/workflows/release.yml:41
  • Draft comment:
    Duplicate step name: Rename one of the "Install dependencies (ubuntu only)" steps to reflect platform differences.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. .github/workflows/release.yml:26
  • Draft comment:
    The comment for the Windows runner says 'for Arm based windows' but the args target x86_64. Clarify or update the comment to avoid confusion.
  • Reason this comment was not posted:
    Marked as duplicate.
3. .github/workflows/release.yml:34
  • Draft comment:
    Duplicate step names for installing Ubuntu dependencies can be confusing. Consider renaming one (e.g., ‘ubuntu-22.04’ vs. ‘ubuntu-22.04-arm’).
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. .github/workflows/release.yml:39
  • Draft comment:
    Inconsistent indentation in the run block (e.g., between 'sudo apt-get update' and the following install command) may affect readability. Align the indents consistently.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None

Workflow ID: wflow_bF4Ywi4hn7IPVpCI


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

args: ''
- platform: 'ubuntu-22.04-arm' # for Arm based linux.
args: ''
- platform: 'windows-latest' # for Arm based windows.
Copy link

Choose a reason for hiding this comment

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

Mismatch: comment says "for Arm based windows" but target is x86_64. Clarify or correct.

Suggested change
- platform: 'windows-latest' # for Arm based windows.
- platform: 'windows-latest' # for Intel/AMD based windows.

args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-22.04'
args: ''
- platform: 'ubuntu-22.04-arm' # for Arm based linux.
Copy link

Choose a reason for hiding this comment

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

Runner label 'ubuntu-22.04-arm' may not match a GitHub-hosted runner. Ensure a self-hosted runner is configured or use a valid label.

@@ -14,7 +14,17 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-22.04, windows-latest]
include:
Copy link

Choose a reason for hiding this comment

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

The matrix entries define an 'args' field for each platform but it's not used in any subsequent steps. Integrate it where needed or remove it if unnecessary.

@0xbrayo 0xbrayo force-pushed the aarch64 branch 3 times, most recently from dca38cd to 6a2737a Compare February 15, 2025 13:09
@0xbrayo
Copy link
Member Author

0xbrayo commented Feb 15, 2025

@ellipsis-dev review

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 6a2737a in 2 minutes and 49 seconds

More details
  • Looked at 71 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 7 drafted comments based on config settings.
1. .github/workflows/release.yml:41
  • Draft comment:
    Consider extracting this step to a reusable workflow or composite action to avoid duplication.

  • Step: Install dependencies (ubuntu-arm only) in build workflow (build.yml)

  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50%
    The comment points out real duplication between two workflow files. The suggestion to use a reusable workflow or composite action is a concrete, actionable solution. This is a legitimate code quality improvement that would reduce maintenance burden. However, this kind of cross-file refactoring suggestion violates the rule about ignoring cross-file issues.
    The suggestion requires looking at multiple files to understand and implement. The duplication might be intentional to keep the workflows independent.
    While the suggestion is valid, our rules explicitly state to ignore cross-file issues and only think about the file being reviewed.
    Due to the rule about ignoring cross-file issues, this comment should be removed despite being technically correct.

2. .github/workflows/build.yml:43
  • Draft comment:
    In the ubuntu-arm dependency block, the second command appears to have an extra leading space. Ensure consistent indentation for the multiline script.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    While the comment is technically correct about the inconsistent indentation, this is a very minor formatting issue in a GitHub Actions workflow file. The extra space won't affect the functionality of the shell commands. YAML is sensitive to indentation, but within the run: | block, the shell commands' indentation is not significant for YAML parsing.
    The inconsistent indentation could potentially indicate a copy-paste error that might hide other issues. Also, consistent formatting helps with maintainability.
    While consistency is good, this is an extremely minor issue that doesn't affect functionality or readability significantly. The CI/CD pipeline will work exactly the same either way.
    This comment should be deleted as it points out an extremely minor formatting issue that doesn't impact functionality or significantly affect readability.
3. .github/workflows/release.yml:46
  • Draft comment:
    The ubuntu-arm installation step has extra leading space on the second command line. Please fix the indentation for consistency.
  • Reason this comment was not posted:
    Marked as duplicate.
4. .github/workflows/build.yml:43
  • Draft comment:
    Inconsistent indentation in the run block for installing ubuntu-arm dependencies; align command lines to avoid accidental whitespace.
  • Reason this comment was not posted:
    Marked as duplicate.
5. .github/workflows/release.yml:26
  • Draft comment:
    The comment for 'windows-latest' is misleading: it says 'for Arm based windows' while the args target x86_64. Update the comment or target for consistency.
  • Reason this comment was not posted:
    Marked as duplicate.
6. .github/workflows/release.yml:39
  • Draft comment:
    Inconsistent indentation in the run block for installing Ubuntu dependencies; ensure consistent alignment of all command lines.
  • Reason this comment was not posted:
    Marked as duplicate.
7. .github/workflows/release.yml:68
  • Draft comment:
    Matrix 'args' is defined in the strategy but not used in the tauri-action build step. Consider passing ${{ matrix.args }} if it's needed.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_N01yBv2WHIb0ueM0


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

args: ''
- platform: 'ubuntu-22.04-arm' # for Arm based linux.
args: ''
- platform: 'windows-latest' # for Arm based windows.
Copy link

Choose a reason for hiding this comment

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

The comment '# for Arm based windows' is misleading since the args target is x86_64. Update comment or verify the intended target.

Suggested change
- platform: 'windows-latest' # for Arm based windows.
- platform: 'windows-latest' # for x86_64 based windows.

platform: [macos-latest, ubuntu-22.04, windows-latest]
include:
- platform: 'macos-latest' # for Arm based macs
args: '--target aarch64-apple-darwin'
Copy link

Choose a reason for hiding this comment

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

Matrix 'args' is defined but not used later. Consider passing ${{ matrix.args }} to the tauri-action step if needed.

@0xbrayo
Copy link
Member Author

0xbrayo commented Feb 15, 2025

@ellipsis-dev review

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 597f06a in 1 minute and 47 seconds

More details
  • Looked at 82 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 drafted comments based on config settings.
1. .github/workflows/build.yml:42
  • Draft comment:
    The indentation for the second command in the ubuntu-arm dependency installation appears off. Please fix the indentation so that both commands align correctly.
  • Reason this comment was not posted:
    Marked as duplicate.
2. .github/workflows/release.yml:39
  • Draft comment:
    There’s an indentation issue in the ubuntu-arm dependency installation block. Adjust the indentation for the 'sudo apt-get install' command.
  • Reason this comment was not posted:
    Marked as duplicate.
3. .github/workflows/build.yml:21
  • Draft comment:
    Explicitly set an empty args value for the 'ubuntu-22.04' entry for consistency.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    The lack of args for ubuntu-22.04 is intentional - it means use default target. Adding empty args would be purely cosmetic and wouldn't change behavior. The current format is clear and follows common YAML practices. Having explicit empty values could actually reduce readability.
    Perhaps having consistent structure across all matrix entries would make it easier to add new targets in the future? Maybe explicit empty values are preferred in some style guides?
    The current format is perfectly valid YAML and common practice. Adding empty values would be purely cosmetic with no functional benefit and could make the config harder to read.
    This comment should be deleted as it suggests a purely cosmetic change that doesn't improve code quality or functionality.
4. .github/workflows/build.yml:43
  • Draft comment:
    Fix indentation in the ubuntu-arm dependency install step; the 'sudo apt-get install' line is misaligned.
  • Reason this comment was not posted:
    Marked as duplicate.
5. .github/workflows/release.yml:46
  • Draft comment:
    Correct the YAML indentation in the ubuntu-arm dependency block; ensure consistent spacing for all command lines.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
6. .github/workflows/release.yml:27
  • Draft comment:
    Update the comment for the 'windows-latest' matrix entry; the args indicate an x86_64 target, so the comment should reflect that.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_Vojjq02L08wVqHc1


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

args: ''
- platform: 'ubuntu-22.04-arm' # for Arm based linux.
args: ''
- platform: 'windows-latest' # for Arm based windows.
Copy link

Choose a reason for hiding this comment

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

The comment for the 'windows-latest' platform suggests it's for Arm based Windows, but the target argument '--target x86_64-pc-windows-msvc' is for x86_64 builds. Please clarify this inconsistency.

Suggested change
- platform: 'windows-latest' # for Arm based windows.
- platform: 'windows-latest' # for x86_64 based windows.

@0xbrayo 0xbrayo force-pushed the aarch64 branch 5 times, most recently from 1780e07 to f3fbff8 Compare February 15, 2025 14:04
@0xbrayo 0xbrayo changed the title ci: arm builds for macOS and linux ci: arm builds for linux Feb 15, 2025
@0xbrayo
Copy link
Member Author

0xbrayo commented Feb 15, 2025

@ellipsis-dev review

@0xbrayo 0xbrayo merged commit b9c5795 into ActivityWatch:master Feb 15, 2025
6 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.

1 participant