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: linux arm64 cross-compilation (hopefully) #653

Closed
wants to merge 7 commits into from

Conversation

tangowithfoxtrot
Copy link
Contributor

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Code changes

  • file.ext: Description of what was changed and why

Before you submit

  • Please add unit tests where it makes sense to do so

@bitwarden-bot
Copy link

bitwarden-bot commented Mar 11, 2024

Logo
Checkmarx One – Scan Summary & Details6cce8584-89e4-4b6f-9b78-47bba939695f

Fixed Issues

Severity Issue Source File / Package
MEDIUM Unpinned Actions Full Length Commit SHA /release-go.yml: 62

Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.61%. Comparing base (9d6fa34) to head (57a7591).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #653      +/-   ##
==========================================
+ Coverage   60.53%   60.61%   +0.07%     
==========================================
  Files         172      170       -2     
  Lines       10527    10387     -140     
==========================================
- Hits         6373     6296      -77     
+ Misses       4154     4091      -63     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 52 to 60
- name: Build Rust
env:
RUSTFLAGS: "-D warnings"
if: ${{ matrix.settings.target }} == aarch64-unknown-linux-gnu
run: |
sudo apt update
sudo apt install -y crossbuild-essential-arm64
cargo build --target ${{ matrix.settings.target }} --release

Copy link
Member

Choose a reason for hiding this comment

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

Use cross for this, that's what we do in the other workflows.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't been able to build with cross for that target locally. I end up getting an error from the linker that it's unable to link something, so I end up having to build in a Linux ARM64 VM.

Oddly though, I'm not even getting that far in the workflow runner with cross. It fails when trying to build the ring crate. Any idea how to get past that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, looking at this, cross apparently doesn't have the right build tools installed? I thought cross pulled a container image that was configured for whatever target you specified.

Copy link
Member

Choose a reason for hiding this comment

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

That's not running through cross, you need to swap out the cargo command for cross, look at the other workflows for examples.

@tangowithfoxtrot tangowithfoxtrot deleted the linux-arm64-bitwarden-c branch May 21, 2024 19:17
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.

3 participants