Skip to content

Commit ee8ca55

Browse files
committed
thing
1 parent 34939a3 commit ee8ca55

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/rust-build.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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
@@ -69,6 +72,13 @@ jobs:
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:

0 commit comments

Comments
 (0)