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
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
|
@ -199,7 +199,7 @@ jobs:
|
||||||
- run: cargo check --no-default-features
|
- run: cargo check --no-default-features
|
||||||
- run: cargo check
|
- run: cargo check
|
||||||
|
|
||||||
test-cross-arm:
|
test-cross-linux:
|
||||||
name: cross +${{ matrix.toolchain }} build ${{ matrix.target }}
|
name: cross +${{ matrix.toolchain }} build ${{ matrix.target }}
|
||||||
needs: clippy
|
needs: clippy
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -208,7 +208,10 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
target: [armv7-unknown-linux-gnueabihf]
|
target:
|
||||||
|
- armv7-unknown-linux-gnueabihf
|
||||||
|
- aarch64-unknown-linux-gnu
|
||||||
|
- riscv64gc-unknown-linux-gnu
|
||||||
toolchain:
|
toolchain:
|
||||||
- "1.74" # MSRV (Minimum supported rust version)
|
- "1.74" # MSRV (Minimum supported rust version)
|
||||||
- stable
|
- stable
|
||||||
|
@ -242,6 +245,12 @@ jobs:
|
||||||
if [ ${{ matrix.target }} = "armv7-unknown-linux-gnueabihf" ]; then
|
if [ ${{ matrix.target }} = "armv7-unknown-linux-gnueabihf" ]; then
|
||||||
sudo apt-get install -y gcc-arm-linux-gnueabihf
|
sudo apt-get install -y gcc-arm-linux-gnueabihf
|
||||||
fi
|
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
|
- name: Set target link compiler
|
||||||
run: |
|
run: |
|
||||||
|
@ -252,7 +261,13 @@ jobs:
|
||||||
if [ ${{ matrix.target }} = "armv7-unknown-linux-gnueabihf" ]; then
|
if [ ${{ matrix.target }} = "armv7-unknown-linux-gnueabihf" ]; then
|
||||||
echo "CARGO_TARGET_${target}_LINKER=arm-linux-gnueabihf-gcc" >> $GITHUB_ENV
|
echo "CARGO_TARGET_${target}_LINKER=arm-linux-gnueabihf-gcc" >> $GITHUB_ENV
|
||||||
fi
|
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
|
- name: Build
|
||||||
run: cargo build --verbose --target ${{ matrix.target }} --no-default-features
|
run: cargo build --verbose --target ${{ matrix.target }} --no-default-features
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue