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

ARM64 Linux cross build in CD #11

Merged
merged 2 commits into from
Dec 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: ubuntu-latest
target: aarch64-unknown-linux-musl
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: macOS-latest
Expand All @@ -34,8 +36,14 @@ jobs:
- name: Setup musl
if: matrix.os == 'ubuntu-latest'
run: |
rustup target add x86_64-unknown-linux-musl
sudo apt -qq install musl-tools
rustup target add ${{ matrix.target }}
sudo apt-get -qq update # prevent 404 when the "latest" image is changed
sudo apt -qq install musl-tools gcc-aarch64-linux-gnu
mkdir -p .cargo
cat << EOS > .cargo/config.toml
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-gnu-gcc"
EOS
- name: Build
run: cargo build --all --release --target ${{ matrix.target }} --verbose
- name: Create an archive to maintain the file permission (in non-Windows environments)
Expand Down