-
Notifications
You must be signed in to change notification settings - Fork 0
Cross-compile binaries for aarch64-unknown-linux-gnu #172
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
Conversation
cross_compile_os: linux | ||
cross_compile_target: aarch64-unknown-linux-gnu | ||
- name: ubuntu-latest | ||
cross_compile_os: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we need to specify those... If we don't, surely ${{ }}
expressions referencing those fields will fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I don't think we need to specify this. Can't say for sure though.
source rustc.vars | ||
if [ -z "${CROSS_COMPILE_TARGET}" ]; then | ||
# normal build targetting the CPU architecture and the OS of the host | ||
rustc --print cfg | grep = > rustc.vars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we can get rid of calling rustc
to set target_os
and target_arch
, and specify the values for both statically in the config.
GitHub does not provide a aarch64-unknown-linux-gnu runner that we would need to compile binaries for Raspberry Pi, but we can use `cross` to build those on the amd64 Ubuntu runner.
cross_compile_os: linux | ||
cross_compile_target: aarch64-unknown-linux-gnu | ||
- name: ubuntu-latest | ||
cross_compile_os: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I don't think we need to specify this. Can't say for sure though.
|
||
runs-on: ${{ matrix.os }} | ||
- name: ubuntu-latest | ||
cross_compile_os: linux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we somehow infer this from matrix.os? maybe using uname
or something?
GitHub does not provide a aarch64-unknown-linux-gnu runner that we would need to compile binaries for Raspberry Pi, but we can use
cross
to build those on the amd64 Ubuntu runner.