mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Add aarch64 and riscv64 cross compilation targets (#1334)
This commit is contained in:
parent
8fab3d66e2
commit
0be490f58d
1 changed files with 18 additions and 3 deletions
19
.github/workflows/test.yml
vendored
19
.github/workflows/test.yml
vendored
|
@ -199,7 +199,7 @@ jobs:
|
|||
- run: cargo check --no-default-features
|
||||
- run: cargo check
|
||||
|
||||
test-cross-arm:
|
||||
test-cross-linux:
|
||||
name: cross +${{ matrix.toolchain }} build ${{ matrix.target }}
|
||||
needs: clippy
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
@ -208,7 +208,10 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
target: [armv7-unknown-linux-gnueabihf]
|
||||
target:
|
||||
- armv7-unknown-linux-gnueabihf
|
||||
- aarch64-unknown-linux-gnu
|
||||
- riscv64gc-unknown-linux-gnu
|
||||
toolchain:
|
||||
- "1.74" # MSRV (Minimum supported rust version)
|
||||
- stable
|
||||
|
@ -242,6 +245,12 @@ jobs:
|
|||
if [ ${{ matrix.target }} = "armv7-unknown-linux-gnueabihf" ]; then
|
||||
sudo apt-get install -y gcc-arm-linux-gnueabihf
|
||||
fi
|
||||
if [ ${{ matrix.target }} = "aarch64-unknown-linux-gnu" ]; then
|
||||
sudo apt-get install -y gcc-aarch64-linux-gnu
|
||||
fi
|
||||
if [ ${{ matrix.target }} = "riscv64gc-unknown-linux-gnu" ]; then
|
||||
sudo apt-get install -y gcc-riscv64-linux-gnu
|
||||
fi
|
||||
|
||||
- name: Set target link compiler
|
||||
run: |
|
||||
|
@ -252,6 +261,12 @@ jobs:
|
|||
if [ ${{ matrix.target }} = "armv7-unknown-linux-gnueabihf" ]; then
|
||||
echo "CARGO_TARGET_${target}_LINKER=arm-linux-gnueabihf-gcc" >> $GITHUB_ENV
|
||||
fi
|
||||
if [ ${{ matrix.target }} = "aarch64-unknown-linux-gnu" ]; then
|
||||
echo "CARGO_TARGET_${target}_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
|
||||
fi
|
||||
if [ ${{ matrix.target }} = "riscv64gc-unknown-linux-gnu" ]; then
|
||||
echo "CARGO_TARGET_${target}_LINKER=riscv64-linux-gnu-gcc" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Build
|
||||
run: cargo build --verbose --target ${{ matrix.target }} --no-default-features
|
||||
|
|
Loading…
Reference in a new issue