diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a2e40d9..22469fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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