Skip to content

Commit

Permalink
Create cargo config for linux builds
Browse files Browse the repository at this point in the history
  • Loading branch information
pshenmic committed Oct 17, 2024
1 parent 953cb8b commit 58c66de
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,19 @@ jobs:
echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV
export PATH="${PATH}:${HOME}/.local/bin"
- name: Create Cargo multiarch config
run: |
touch ~/.cargo/config.toml
echo "
[target.x86_64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
" > ~/.cargo/config.toml
cat ~/.cargo/config.toml
- name: Add Rust targets
run: rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu x86_64-apple-darwin aarch64-apple-darwin
run: rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu

- name: Build for Linux x86
run: cargo build -r --target=x86_64-unknown-linux-gnu --verbose && mv target/x86_64-unknown-linux-gnu/release/platform-cli ./platform-cli-gnu-x86_64
Expand Down

0 comments on commit 58c66de

Please sign in to comment.