File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -41,17 +41,20 @@ jobs:
4141 os : ubuntu-latest
4242 artifact_name : bping
4343 gcc_package : gcc-aarch64-linux-gnu
44+ linker : aarch64-linux-gnu-gcc
4445 - target : aarch64-apple-darwin
4546 os : macos-latest
4647 artifact_name : bping
4748 - target : arm-unknown-linux-gnueabi
4849 os : ubuntu-latest
4950 artifact_name : bping
5051 gcc_package : gcc-arm-linux-gnueabi
52+ linker : arm-linux-gnueabi-gcc
5153 - target : armv7-unknown-linux-gnueabihf
5254 os : ubuntu-latest
5355 artifact_name : bping
5456 gcc_package : gcc-arm-linux-gnueabihf
57+ linker : arm-linux-gnueabihf-gcc
5558 - target : x86_64-unknown-linux-musl
5659 os : ubuntu-latest
5760 artifact_name : bping
6972 sudo apt-get install -y ${{ matrix.gcc_package }}
7073 fi
7174
75+ - name : Configure Cargo for cross-compilation
76+ if : matrix.linker != ''
77+ run : |
78+ mkdir -p ~/.cargo
79+ echo "[target.${{ matrix.target }}]" >> ~/.cargo/config.toml
80+ echo "linker = \"${{ matrix.linker }}\"" >> ~/.cargo/config.toml
81+
7282 - name : Install Rust
7383 uses : actions-rs/toolchain@v1
7484 with :
You can’t perform that action at this time.
0 commit comments